| java.lang.Object org.apache.james.util.Lock
Lock | public class Lock (Code) | | Provides Lock functionality
|
Method Summary | |
public boolean | canI(Object key) Check to see if we can lock on a given object. | public boolean | isLocked(Object key) | public boolean | lock(Object key) Lock on a given object. | public boolean | unlock(Object key) Release the lock on a given object. |
canI | public boolean canI(Object key)(Code) | | Check to see if we can lock on a given object.
Parameters: key - the Object on which to lock true if the calling thread can lock, false otherwise |
isLocked | public boolean isLocked(Object key)(Code) | | Check to see if the object is locked
Parameters: key - the Object on which to check the lock true if the object is locked, false otherwise |
lock | public boolean lock(Object key)(Code) | | Lock on a given object.
Parameters: key - the Object on which to lock true if the locking was successful, false otherwise |
unlock | public boolean unlock(Object key)(Code) | | Release the lock on a given object.
Parameters: key - the Object on which the lock is held true if the unlocking was successful, false otherwise |
|
|