Interface DistributedLockManager
-
- All Superinterfaces:
AutoCloseable
public interface DistributedLockManager extends AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDistributedLockManager.UnavailableManagerListener
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddUnavailableManagerListener(DistributedLockManager.UnavailableManagerListener listener)default voidclose()DistributedLockgetDistributedLock(String lockId)MutableLonggetMutableLong(String mutableLongId)booleanisStarted()static DistributedLockManagernewInstanceOf(String className, Map<String,String> properties)voidremoveUnavailableManagerListener(DistributedLockManager.UnavailableManagerListener listener)voidstart()booleanstart(long timeout, TimeUnit unit)voidstop()
-
-
-
Method Detail
-
newInstanceOf
static DistributedLockManager newInstanceOf(String className, Map<String,String> properties) throws Exception
- Throws:
Exception
-
addUnavailableManagerListener
void addUnavailableManagerListener(DistributedLockManager.UnavailableManagerListener listener)
-
removeUnavailableManagerListener
void removeUnavailableManagerListener(DistributedLockManager.UnavailableManagerListener listener)
-
start
boolean start(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException
-
start
void start() throws InterruptedException, ExecutionException
-
isStarted
boolean isStarted()
-
stop
void stop()
-
getDistributedLock
DistributedLock getDistributedLock(String lockId) throws InterruptedException, ExecutionException, TimeoutException
-
getMutableLong
MutableLong getMutableLong(String mutableLongId) throws InterruptedException, ExecutionException, TimeoutException
-
close
default void close()
- Specified by:
closein interfaceAutoCloseable
-
-