Interface DistributedLock
- All Superinterfaces:
Lock
-
Method Summary
Methods inherited from interface java.util.concurrent.locks.Lock
lock, lockInterruptibly, newCondition, tryLock, tryLock, unlock
-
Method Details
-
lock
Attempt to acquire a lock with a specific time-to-live- Parameters:
ttl- the specific time-to-live for the lock status data
-
tryLock
Attempt to acquire a lock with a specific time-to-live- Parameters:
waitTime- the maximum time to wait for the lockttl- the specific time-to-live for the lock status data- Returns:
trueif the lock was acquired andfalseif the waiting time elapsed before the lock was acquired- Throws:
InterruptedException- if the current thread is interrupted while acquiring the lock (and interruption of lock acquisition is supported)
-