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