Class ColocatedHAManager
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.cluster.ha.ColocatedHAManager
-
- All Implemented Interfaces:
ActiveMQComponent,HAManager
public class ColocatedHAManager extends Object implements HAManager
-
-
Constructor Summary
Constructors Constructor Description ColocatedHAManager(ColocatedPolicy haPolicy, ActiveMQServer activeMQServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanactivateBackup(int backupSize, String journalDirectory, String bindingsDirectory, String largeMessagesDirectory, String pagingDirectory, SimpleString nodeID)Map<String,ActiveMQServer>getBackupServers()return the current backup serversbooleanisStarted()booleanrequestBackup(Pair<TransportConfiguration,TransportConfiguration> connectorPair, int backupSize, boolean replicated)send a request to a live server to start a backup for usvoidstart()starts the HA manager.voidstop()stop any backups-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStop
-
-
-
-
Constructor Detail
-
ColocatedHAManager
public ColocatedHAManager(ColocatedPolicy haPolicy, ActiveMQServer activeMQServer)
-
-
Method Detail
-
start
public void start()
starts the HA manager.- Specified by:
startin interfaceActiveMQComponent
-
stop
public void stop()
stop any backups- Specified by:
stopin interfaceActiveMQComponent
-
isStarted
public boolean isStarted()
- Specified by:
isStartedin interfaceActiveMQComponent
-
activateBackup
public boolean activateBackup(int backupSize, String journalDirectory, String bindingsDirectory, String largeMessagesDirectory, String pagingDirectory, SimpleString nodeID) throws Exception- Throws:
Exception
-
getBackupServers
public Map<String,ActiveMQServer> getBackupServers()
return the current backup servers- Specified by:
getBackupServersin interfaceHAManager- Returns:
- the backups
-
requestBackup
public boolean requestBackup(Pair<TransportConfiguration,TransportConfiguration> connectorPair, int backupSize, boolean replicated) throws Exception
send a request to a live server to start a backup for us- Parameters:
connectorPair- the connector for the node to request a backup frombackupSize- the current size of the requested nodes backupsreplicated-- Returns:
- true if the request wa successful.
- Throws:
Exception
-
-