public class Lock extends Object
| Constructor and Description |
|---|
Lock() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canI(Object key)
Check to see if we can lock on a given object.
|
boolean |
isLocked(Object key)
Check to see if the object is locked
|
boolean |
lock(Object key)
Lock on a given object.
|
boolean |
unlock(Object key)
Release the lock on a given object.
|
public boolean isLocked(Object key)
key - the Object on which to check the lockpublic boolean canI(Object key)
key - the Object on which to lockpublic boolean lock(Object key)
key - the Object on which to lockpublic boolean unlock(Object key)
key - the Object on which the lock is heldCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.