Class CuratorDistributedPrimitiveManager
- java.lang.Object
-
- org.apache.activemq.artemis.quorum.zookeeper.CuratorDistributedPrimitiveManager
-
- All Implemented Interfaces:
AutoCloseable,org.apache.activemq.artemis.quorum.DistributedPrimitiveManager,org.apache.curator.framework.state.ConnectionStateListener
public class CuratorDistributedPrimitiveManager extends Object implements org.apache.activemq.artemis.quorum.DistributedPrimitiveManager, org.apache.curator.framework.state.ConnectionStateListener
-
-
Constructor Summary
Constructors Constructor Description CuratorDistributedPrimitiveManager(Map<String,String> config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUnavailableManagerListener(org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener listener)protected voidcheckHandlingEvents()protected voidcompleteHandlingEvents()org.apache.curator.framework.CuratorFrameworkgetCurator()Used for testing purposesorg.apache.activemq.artemis.quorum.DistributedLockgetDistributedLock(String lockId)org.apache.activemq.artemis.quorum.MutableLonggetMutableLong(String mutableLongId)booleanisStarted()voidremove(CuratorDistributedPrimitive primitive)voidremoveUnavailableManagerListener(org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener listener)voidstart()booleanstart(long timeout, TimeUnit unit)protected voidstartHandlingEvents()voidstateChanged(org.apache.curator.framework.CuratorFramework client, org.apache.curator.framework.state.ConnectionState newState)voidstop()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
isStarted
public boolean isStarted()
- Specified by:
isStartedin interfaceorg.apache.activemq.artemis.quorum.DistributedPrimitiveManager
-
addUnavailableManagerListener
public void addUnavailableManagerListener(org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener listener)
- Specified by:
addUnavailableManagerListenerin interfaceorg.apache.activemq.artemis.quorum.DistributedPrimitiveManager
-
removeUnavailableManagerListener
public void removeUnavailableManagerListener(org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener listener)
- Specified by:
removeUnavailableManagerListenerin interfaceorg.apache.activemq.artemis.quorum.DistributedPrimitiveManager
-
start
public boolean start(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException- Specified by:
startin interfaceorg.apache.activemq.artemis.quorum.DistributedPrimitiveManager- Throws:
InterruptedExceptionExecutionException
-
start
public void start() throws InterruptedException, ExecutionException- Specified by:
startin interfaceorg.apache.activemq.artemis.quorum.DistributedPrimitiveManager- Throws:
InterruptedExceptionExecutionException
-
stop
public void stop()
- Specified by:
stopin interfaceorg.apache.activemq.artemis.quorum.DistributedPrimitiveManager
-
getDistributedLock
public org.apache.activemq.artemis.quorum.DistributedLock getDistributedLock(String lockId)
- Specified by:
getDistributedLockin interfaceorg.apache.activemq.artemis.quorum.DistributedPrimitiveManager
-
getMutableLong
public org.apache.activemq.artemis.quorum.MutableLong getMutableLong(String mutableLongId)
- Specified by:
getMutableLongin interfaceorg.apache.activemq.artemis.quorum.DistributedPrimitiveManager
-
startHandlingEvents
protected void startHandlingEvents()
-
completeHandlingEvents
protected void completeHandlingEvents()
-
checkHandlingEvents
protected void checkHandlingEvents()
-
stateChanged
public void stateChanged(org.apache.curator.framework.CuratorFramework client, org.apache.curator.framework.state.ConnectionState newState)- Specified by:
stateChangedin interfaceorg.apache.curator.framework.state.ConnectionStateListener
-
getCurator
public org.apache.curator.framework.CuratorFramework getCurator()
Used for testing purposes
-
remove
public void remove(CuratorDistributedPrimitive primitive)
-
-