Class CuratorDistributedPrimitiveManager

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.apache.activemq.artemis.quorum.DistributedPrimitiveManager, org.apache.curator.framework.state.ConnectionStateListener

    public class CuratorDistributedPrimitiveManager
    extends java.lang.Object
    implements org.apache.activemq.artemis.quorum.DistributedPrimitiveManager, org.apache.curator.framework.state.ConnectionStateListener
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager

        org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addUnavailableManagerListener​(org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener listener)  
      protected void checkHandlingEvents()  
      protected void completeHandlingEvents()  
      org.apache.curator.framework.CuratorFramework getCurator()
      Used for testing purposes
      org.apache.activemq.artemis.quorum.DistributedLock getDistributedLock​(java.lang.String lockId)  
      org.apache.activemq.artemis.quorum.MutableLong getMutableLong​(java.lang.String mutableLongId)  
      boolean isStarted()  
      void remove​(CuratorDistributedPrimitive primitive)  
      void removeUnavailableManagerListener​(org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener listener)  
      void start()  
      boolean start​(long timeout, java.util.concurrent.TimeUnit unit)  
      protected void startHandlingEvents()  
      void stateChanged​(org.apache.curator.framework.CuratorFramework client, org.apache.curator.framework.state.ConnectionState newState)  
      void stop()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.curator.framework.state.ConnectionStateListener

        doNotProxy
      • Methods inherited from interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager

        close
    • Constructor Detail

      • CuratorDistributedPrimitiveManager

        public CuratorDistributedPrimitiveManager​(java.util.Map<java.lang.String,​java.lang.String> config)
    • Method Detail

      • isStarted

        public boolean isStarted()
        Specified by:
        isStarted in interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager
      • addUnavailableManagerListener

        public void addUnavailableManagerListener​(org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener listener)
        Specified by:
        addUnavailableManagerListener in interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager
      • removeUnavailableManagerListener

        public void removeUnavailableManagerListener​(org.apache.activemq.artemis.quorum.DistributedPrimitiveManager.UnavailableManagerListener listener)
        Specified by:
        removeUnavailableManagerListener in interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager
      • start

        public boolean start​(long timeout,
                             java.util.concurrent.TimeUnit unit)
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Specified by:
        start in interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • start

        public void start()
                   throws java.lang.InterruptedException,
                          java.util.concurrent.ExecutionException
        Specified by:
        start in interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • stop

        public void stop()
        Specified by:
        stop in interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager
      • getDistributedLock

        public org.apache.activemq.artemis.quorum.DistributedLock getDistributedLock​(java.lang.String lockId)
        Specified by:
        getDistributedLock in interface org.apache.activemq.artemis.quorum.DistributedPrimitiveManager
      • getMutableLong

        public org.apache.activemq.artemis.quorum.MutableLong getMutableLong​(java.lang.String mutableLongId)
        Specified by:
        getMutableLong in interface org.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:
        stateChanged in interface org.apache.curator.framework.state.ConnectionStateListener
      • getCurator

        public org.apache.curator.framework.CuratorFramework getCurator()
        Used for testing purposes