Package com.coditory.sherlock
Interface DistributedLock
-
- All Known Implementing Classes:
DistributedLockMock
public interface DistributedLock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanacquire()booleanacquire(Duration duration)default booleanacquireAndExecute(Runnable action)default booleanacquireAndExecute(Duration duration, Runnable action)booleanacquireForever()default booleanacquireForeverAndExecute(Runnable action)StringgetId()booleanrelease()default booleanreleaseAndExecute(Runnable action)
-
-
-
Method Detail
-
getId
String getId()
-
acquire
boolean acquire()
-
acquire
boolean acquire(Duration duration)
-
acquireForever
boolean acquireForever()
-
release
boolean release()
-
acquireAndExecute
default boolean acquireAndExecute(Runnable action)
-
acquireForeverAndExecute
default boolean acquireForeverAndExecute(Runnable action)
-
releaseAndExecute
default boolean releaseAndExecute(Runnable action)
-
-