Class BackupManager
java.lang.Object
org.apache.activemq.artemis.core.server.cluster.BackupManager
- All Implemented Interfaces:
ActiveMQComponent
This takes care of updating the cluster with a backups transport configuration which is based on each cluster
connection.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA backup connector will connect to the cluster and announce that we are a backup server ready to fail over. -
Constructor Summary
ConstructorsConstructorDescriptionBackupManager(ActiveMQServer server, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutor, NodeManager nodeManager, Configuration configuration, ClusterManager clusterManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidcalled to notify us that we have been activated so the connectors are no longer needed.voidannounce the fact that we are a backup server ready to fail over if required.This is meant for testing and assertions, please don't do anything stupid with it!booleanbooleanvoidstart()Start the backup manager if not already started.voidstop()stop all the connectorsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStop
-
Constructor Details
-
BackupManager
public BackupManager(ActiveMQServer server, ExecutorFactory executorFactory, ScheduledExecutorService scheduledExecutor, NodeManager nodeManager, Configuration configuration, ClusterManager clusterManager)
-
-
Method Details
-
getBackupConnectors
This is meant for testing and assertions, please don't do anything stupid with it! I mean, please don't use it outside of testing context -
start
Start the backup manager if not already started. This entails deploying a backup connector based on a cluster configuration, informing the cluster manager so that it can add it to its topology and announce itself to the cluster.- Specified by:
startin interfaceActiveMQComponent- Throws:
Exception
-
stop
public void stop()stop all the connectors- Specified by:
stopin interfaceActiveMQComponent
-
announceBackup
public void announceBackup()announce the fact that we are a backup server ready to fail over if required. -
activated
public void activated()called to notify us that we have been activated so the connectors are no longer needed. -
isStarted
public boolean isStarted()- Specified by:
isStartedin interfaceActiveMQComponent
-
isBackupAnnounced
public boolean isBackupAnnounced()
-