Class ClusterPool
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.routing.pools.AbstractPool
-
- org.apache.activemq.artemis.core.server.routing.pools.ClusterPool
-
- All Implemented Interfaces:
ClusterTopologyListener,ActiveMQComponent,Pool
public class ClusterPool extends AbstractPool implements ClusterTopologyListener
-
-
Constructor Summary
Constructors Constructor Description ClusterPool(TargetFactory targetFactory, ScheduledExecutorService scheduledExecutor, int checkPeriod, ClusterConnection clusterConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnodeDown(long eventUID, String nodeID)Triggered when a node leaves the cluster.voidnodeUP(TopologyMember member, boolean last)Triggered when a node joins the cluster.voidstart()voidstop()-
Methods inherited from class org.apache.activemq.artemis.core.server.routing.pools.AbstractPool
addTarget, addTarget, addTargetProbe, getAllTargets, getCheckPeriod, getPassword, getQuorumSize, getQuorumTimeout, getReadyTarget, getTarget, getTargetProbes, getTargets, getUsername, isStarted, isTargetReady, removeTarget, removeTargetProbe, setPassword, setQuorumSize, setQuorumTimeout, setUsername
-
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
-
ClusterPool
public ClusterPool(TargetFactory targetFactory, ScheduledExecutorService scheduledExecutor, int checkPeriod, ClusterConnection clusterConnection)
-
-
Method Detail
-
start
public void start() throws Exception- Specified by:
startin interfaceActiveMQComponent- Overrides:
startin classAbstractPool- Throws:
Exception
-
stop
public void stop() throws Exception- Specified by:
stopin interfaceActiveMQComponent- Overrides:
stopin classAbstractPool- Throws:
Exception
-
nodeUP
public void nodeUP(TopologyMember member, boolean last)
Description copied from interface:ClusterTopologyListenerTriggered when a node joins the cluster.- Specified by:
nodeUPin interfaceClusterTopologyListenerlast- if the whole cluster topology is being transmitted (after adding the listener to the cluster connection) this parameter will betruefor the last topology member.
-
nodeDown
public void nodeDown(long eventUID, String nodeID)Description copied from interface:ClusterTopologyListenerTriggered when a node leaves the cluster.- Specified by:
nodeDownin interfaceClusterTopologyListenernodeID- the id of the node leaving the cluster
-
-