Class AnyLiveNodeLocatorForReplication
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.LiveNodeLocator
-
- org.apache.activemq.artemis.core.server.impl.AnyLiveNodeLocatorForReplication
-
- All Implemented Interfaces:
ClusterTopologyListener
public class AnyLiveNodeLocatorForReplication extends LiveNodeLocator
This implementation looks for any available live node, once tried with no success it is marked as tried and the next available is used.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.activemq.artemis.core.server.LiveNodeLocator
LiveNodeLocator.BackupRegistrationListener
-
-
Constructor Summary
Constructors Constructor Description AnyLiveNodeLocatorForReplication(LiveNodeLocator.BackupRegistrationListener backupRegistrationListener, ActiveMQServerImpl server, long retryReplicationWait)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<TransportConfiguration,TransportConfiguration>getLiveConfiguration()Returns the current connectorStringgetNodeID()Returns the node id for the current connectorvoidlocateNode()Locates a possible live server in a clustervoidlocateNode(long timeout)Locates a possible live server in a cluster with a timeoutvoidnodeDown(long eventUID, String nodeID)if a node goes down we try all the connectors again as one may now be available for replicationvoidnodeUP(TopologyMember topologyMember, boolean last)voidnotifyRegistrationFailed(boolean alreadyReplicating)tells the locator the the current connector has failed.-
Methods inherited from class org.apache.activemq.artemis.core.server.LiveNodeLocator
connectToCluster
-
-
-
-
Constructor Detail
-
AnyLiveNodeLocatorForReplication
public AnyLiveNodeLocatorForReplication(LiveNodeLocator.BackupRegistrationListener backupRegistrationListener, ActiveMQServerImpl server, long retryReplicationWait)
-
-
Method Detail
-
locateNode
public void locateNode() throws ActiveMQExceptionDescription copied from class:LiveNodeLocatorLocates a possible live server in a cluster- Specified by:
locateNodein classLiveNodeLocator- Throws:
ActiveMQException
-
locateNode
public void locateNode(long timeout) throws ActiveMQExceptionDescription copied from class:LiveNodeLocatorLocates a possible live server in a cluster with a timeout- Specified by:
locateNodein classLiveNodeLocator- Throws:
ActiveMQException
-
nodeUP
public void nodeUP(TopologyMember topologyMember, boolean last)
-
nodeDown
public void nodeDown(long eventUID, String nodeID)if a node goes down we try all the connectors again as one may now be available for replicationTODO: there will be a better way to do this by finding which nodes backup has gone down.
-
getNodeID
public String getNodeID()
Description copied from class:LiveNodeLocatorReturns the node id for the current connector- Specified by:
getNodeIDin classLiveNodeLocator
-
getLiveConfiguration
public Pair<TransportConfiguration,TransportConfiguration> getLiveConfiguration()
Description copied from class:LiveNodeLocatorReturns the current connector- Specified by:
getLiveConfigurationin classLiveNodeLocator
-
notifyRegistrationFailed
public void notifyRegistrationFailed(boolean alreadyReplicating)
Description copied from class:LiveNodeLocatortells the locator the the current connector has failed.- Overrides:
notifyRegistrationFailedin classLiveNodeLocator
-
-