Class ClusterControl

java.lang.Object
org.apache.activemq.artemis.core.server.cluster.ClusterControl
All Implemented Interfaces:
AutoCloseable

public class ClusterControl extends Object implements AutoCloseable
handles the communication between a cluster node and the cluster, either the whole cluster or a specific node in the cluster such as a replicating node.
  • Constructor Details

  • Method Details

    • getClusterChannel

      public Optional<Channel> getClusterChannel()
    • authorize

      public void authorize() throws ActiveMQException
      authorise this cluster control so it can communicate with the cluster, it will set the cluster channel on a successful authentication.
      Throws:
      ActiveMQException - if authorisation wasn't successful.
    • announceReplicatingBackupToPrimary

      public void announceReplicatingBackupToPrimary(boolean attemptingFailBack, String replicationClusterName) throws ActiveMQException
      Announce replicating backup to primary server.
      Parameters:
      attemptingFailBack - if true then this server wants to trigger a fail-back when up-to-date, that is it wants to take over the role of 'live' from the current 'live' server.
      Throws:
      ActiveMQException
    • sendNodeAnnounce

      public void sendNodeAnnounce(long currentEventID, String nodeID, String backupGroupName, String scaleDownGroupName, boolean isBackup, TransportConfiguration config, TransportConfiguration backupConfig)
      Announce this node to the cluster.
      Parameters:
      currentEventID - used if multiple announcements about this node are made.
      nodeID - the node id if the announcing node
      backupGroupName - the backup group name.
      scaleDownGroupName - the scaledown group name
      isBackup - are we a backup
      config - the transports config
      backupConfig - the transports backup config
    • createReplicationChannel

      public Channel createReplicationChannel()
    • getSessionFactory

      public ClientSessionFactoryInternal getSessionFactory()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • requestReplicatedBackup

      public boolean requestReplicatedBackup(int backupSize, SimpleString nodeID)
    • requestSharedStoreBackup

      public boolean requestSharedStoreBackup(int backupSize, String journalDirectory, String bindingsDirectory, String largeMessagesDirectory, String pagingDirectory)
    • announceScaleDown

      public void announceScaleDown(SimpleString targetNodeId, SimpleString scaledDownNodeId)
    • getClusterUser

      public String getClusterUser()
    • getClusterPassword

      public String getClusterPassword()