org.jwarp.util
Class ObjectLock

java.lang.Object
  |
  +--org.jwarp.util.ObjectLock

public class ObjectLock
extends java.lang.Object

Class implementing the methods for locking object for gaining exclusive object access.

Author:
Anatole Tresch

Constructor Summary
ObjectLock()
           
 
Method Summary
 boolean canI(java.lang.Object key)
          Can the object be locked.
 boolean isLocked(java.lang.Object key)
          Is the object locked.
 boolean lock(java.lang.Object key)
          Tries to lock the given object.
 boolean unlock(java.lang.Object key)
          Unlock the given key
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectLock

public ObjectLock()
Method Detail

isLocked

public boolean isLocked(java.lang.Object key)
Is the object locked.
Parameters:
key - The key

canI

public boolean canI(java.lang.Object key)
Can the object be locked.
Parameters:
key - The key

lock

public boolean lock(java.lang.Object key)
Tries to lock the given object.
Parameters:
key - The object key

unlock

public boolean unlock(java.lang.Object key)
Unlock the given key
Parameters:
key -  

©   O R C A   S y s t e m s