public interface DistributedLock extends DistributedPrimitive
DistributedPrimitive.Status, DistributedPrimitive.TypeDEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description | 
|---|---|
Version | 
lock()
Acquires the lock, blocking until it's available. 
 | 
default DistributedPrimitive.Type | 
primitiveType()
Returns the type of primitive. 
 | 
Optional<Version> | 
tryLock()
Attempts to acquire the lock. 
 | 
Optional<Version> | 
tryLock(Duration timeout)
Attempts to acquire the lock for a specified amount of time. 
 | 
void | 
unlock()
Unlocks the lock. 
 | 
addStatusChangeListener, applicationId, destroy, name, removeStatusChangeListener, statusChangeListenersdefault DistributedPrimitive.Type primitiveType()
DistributedPrimitiveprimitiveType in interface DistributedPrimitiveVersion lock()
Optional<Version> tryLock()
Optional<Version> tryLock(Duration timeout)
timeout - the timeout after which to give up attempting to acquire the lockvoid unlock()