Class 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.
    • Method Detail

      • 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.
      • announceReplicatingBackupToLive

        public void announceReplicatingBackupToLive​(boolean attemptingFailBack,
                                                    String replicationClusterName)
                                             throws ActiveMQException
        XXX HORNETQ-720
        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()
        create a replication channel
        Returns:
        the replication channel
      • getSessionFactory

        public ClientSessionFactoryInternal getSessionFactory()
        get the session factory used to connect to the cluster
        Returns:
        the session factory
      • close

        public void close()
        close this cluster control and its resources
        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)
      • getClusterUser

        public String getClusterUser()
      • getClusterPassword

        public String getClusterPassword()