com.deftlabs.lock.mongo
Interface DistributedLock

All Superinterfaces:
Lock

public interface DistributedLock
extends Lock

The distributed lock interface.


Method Summary
 org.bson.types.ObjectId getLockId()
          Returns the lock id if current locked (null if not).
 String getName()
          Returns the lock name.
 DistributedLockOptions getOptions()
          Returns the options used to configure this lock.
 boolean isLocked()
          Returns true if the lock is currently locked by the local process.
 void wakeupBlocked()
          Wakeup any blocked threads.
 
Methods inherited from interface java.util.concurrent.locks.Lock
lock, lockInterruptibly, newCondition, tryLock, tryLock, unlock
 

Method Detail

isLocked

boolean isLocked()
Returns true if the lock is currently locked by the local process.


getName

String getName()
Returns the lock name.


getLockId

org.bson.types.ObjectId getLockId()
Returns the lock id if current locked (null if not).


getOptions

DistributedLockOptions getOptions()
Returns the options used to configure this lock.


wakeupBlocked

void wakeupBlocked()
Wakeup any blocked threads. This should ONLY be used by the lock service, not the user.