com.sun.sgs.impl.util.lock
Class LockRequest<K>

java.lang.Object
  extended by com.sun.sgs.impl.util.lock.LockRequest<K>
Type Parameters:
K - the type of key

public class LockRequest<K>
extends Object

A class representing a request for a lock made to a LockManager.


Constructor Summary
LockRequest(Locker<K> locker, K key, boolean forWrite, boolean upgrade)
          Creates a lock request.
 
Method Summary
 boolean getForWrite()
          Returns whether the request was for write.
 K getKey()
          Returns the key identifying the lock.
 Locker<K> getLocker()
          Returns the locker that requested the lock.
 boolean getUpgrade()
          Returns whether the request was for an upgrade.
 String toString()
          Print fields, for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockRequest

public LockRequest(Locker<K> locker,
                   K key,
                   boolean forWrite,
                   boolean upgrade)
Creates a lock request.

Parameters:
locker - the locker that requested the lock
key - the key identifying the lock
forWrite - whether a write lock was requested
upgrade - whether an upgrade was requested
Method Detail

toString

public String toString()
Print fields, for debugging.

Overrides:
toString in class Object
Returns:
a string representation of this instance

getLocker

public Locker<K> getLocker()
Returns the locker that requested the lock.

Returns:
the locker that requested the lock.

getKey

public K getKey()
Returns the key identifying the lock.

Returns:
the key identifying the lock

getForWrite

public boolean getForWrite()
Returns whether the request was for write.

Returns:
whether the request was for write

getUpgrade

public boolean getUpgrade()
Returns whether the request was for an upgrade.

Returns:
whether the request was for an upgrade

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved