public final class ClusterConnectionImpl extends Object implements ClusterConnection, AfterConnectInternalListener
| Constructor and Description |
|---|
ClusterConnectionImpl(ClusterManager manager,
DiscoveryGroupConfiguration dg,
TransportConfiguration connector,
SimpleString name,
SimpleString address,
int minLargeMessageSize,
long clientFailureCheckPeriod,
long connectionTTL,
long retryInterval,
double retryIntervalMultiplier,
long maxRetryInterval,
int initialConnectAttempts,
int reconnectAttempts,
long callTimeout,
long callFailoverTimeout,
boolean useDuplicateDetection,
MessageLoadBalancingType messageLoadBalancingType,
int confirmationWindowSize,
int producerWindowSize,
ExecutorFactory executorFactory,
ActiveMQServer server,
PostOffice postOffice,
ManagementService managementService,
ScheduledExecutorService scheduledExecutor,
int maxHops,
NodeManager nodeManager,
String clusterUser,
String clusterPassword,
boolean allowDirectConnectionsOnly,
long clusterNotificationInterval,
int clusterNotificationAttempts) |
ClusterConnectionImpl(ClusterManager manager,
TransportConfiguration[] staticTranspConfigs,
TransportConfiguration connector,
SimpleString name,
SimpleString address,
int minLargeMessageSize,
long clientFailureCheckPeriod,
long connectionTTL,
long retryInterval,
double retryIntervalMultiplier,
long maxRetryInterval,
int initialConnectAttempts,
int reconnectAttempts,
long callTimeout,
long callFailoverTimeout,
boolean useDuplicateDetection,
MessageLoadBalancingType messageLoadBalancingType,
int confirmationWindowSize,
int producerWindowSize,
ExecutorFactory executorFactory,
ActiveMQServer server,
PostOffice postOffice,
ManagementService managementService,
ScheduledExecutorService scheduledExecutor,
int maxHops,
NodeManager nodeManager,
String clusterUser,
String clusterPassword,
boolean allowDirectConnectionsOnly,
long clusterNotificationInterval,
int clusterNotificationAttempts) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClusterTopologyListener(ClusterTopologyListener listener) |
String |
describe() |
void |
disconnectRecord(String targetNodeID) |
void |
flushExecutor() |
long |
getCallTimeout() |
TransportConfiguration |
getConnector() |
SimpleString |
getName() |
String |
getNodeID() |
Map<String,String> |
getNodes()
Only used for tests?
|
Map<String,MessageFlowRecord> |
getRecords() |
ActiveMQServer |
getServer() |
Topology |
getTopology() |
void |
informClusterOfBackup() |
boolean |
isNodeActive(String nodeId) |
boolean |
isStarted() |
void |
nodeAnnounced(long uniqueEventID,
String nodeID,
String backupGroupName,
String scaleDownGroupName,
Pair<TransportConfiguration,TransportConfiguration> connectorPair,
boolean backup) |
void |
nodeDown(long eventUID,
String nodeID)
Triggered when a node leaves the cluster.
|
void |
nodeUP(TopologyMember topologyMember,
boolean last)
Triggered when a node joins the cluster.
|
void |
onConnection(ClientSessionFactoryInternal sf) |
void |
removeClusterTopologyListener(ClusterTopologyListener listener) |
void |
removeRecord(String targetNodeID) |
void |
start() |
void |
stop() |
String |
toString() |
boolean |
verify(String clusterUser0,
String clusterPassword0)
Verifies whether user and password match the ones configured for this ClusterConnection.
|
public ClusterConnectionImpl(ClusterManager manager, TransportConfiguration[] staticTranspConfigs, TransportConfiguration connector, SimpleString name, SimpleString address, int minLargeMessageSize, long clientFailureCheckPeriod, long connectionTTL, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int initialConnectAttempts, int reconnectAttempts, long callTimeout, long callFailoverTimeout, boolean useDuplicateDetection, MessageLoadBalancingType messageLoadBalancingType, int confirmationWindowSize, int producerWindowSize, ExecutorFactory executorFactory, ActiveMQServer server, PostOffice postOffice, ManagementService managementService, ScheduledExecutorService scheduledExecutor, int maxHops, NodeManager nodeManager, String clusterUser, String clusterPassword, boolean allowDirectConnectionsOnly, long clusterNotificationInterval, int clusterNotificationAttempts) throws Exception
Exceptionpublic ClusterConnectionImpl(ClusterManager manager, DiscoveryGroupConfiguration dg, TransportConfiguration connector, SimpleString name, SimpleString address, int minLargeMessageSize, long clientFailureCheckPeriod, long connectionTTL, long retryInterval, double retryIntervalMultiplier, long maxRetryInterval, int initialConnectAttempts, int reconnectAttempts, long callTimeout, long callFailoverTimeout, boolean useDuplicateDetection, MessageLoadBalancingType messageLoadBalancingType, int confirmationWindowSize, int producerWindowSize, ExecutorFactory executorFactory, ActiveMQServer server, PostOffice postOffice, ManagementService managementService, ScheduledExecutorService scheduledExecutor, int maxHops, NodeManager nodeManager, String clusterUser, String clusterPassword, boolean allowDirectConnectionsOnly, long clusterNotificationInterval, int clusterNotificationAttempts) throws Exception
Exceptionpublic void start()
throws Exception
start in interface ActiveMQComponentExceptionpublic void flushExecutor()
flushExecutor in interface ClusterConnectionpublic void stop()
throws Exception
stop in interface ActiveMQComponentExceptionpublic void addClusterTopologyListener(ClusterTopologyListener listener)
addClusterTopologyListener in interface ClusterConnectionpublic void removeClusterTopologyListener(ClusterTopologyListener listener)
removeClusterTopologyListener in interface ClusterConnectionpublic Topology getTopology()
getTopology in interface ClusterConnectionpublic void nodeAnnounced(long uniqueEventID,
String nodeID,
String backupGroupName,
String scaleDownGroupName,
Pair<TransportConfiguration,TransportConfiguration> connectorPair,
boolean backup)
nodeAnnounced in interface ClusterConnectionpublic void onConnection(ClientSessionFactoryInternal sf)
onConnection in interface AfterConnectInternalListenerpublic boolean isStarted()
isStarted in interface ActiveMQComponentpublic SimpleString getName()
getName in interface ClusterConnectionpublic String getNodeID()
getNodeID in interface ClusterConnectionpublic ActiveMQServer getServer()
getServer in interface ClusterConnectionpublic boolean isNodeActive(String nodeId)
isNodeActive in interface ClusterConnectionpublic long getCallTimeout()
getCallTimeout in interface ClusterConnectionpublic Map<String,String> getNodes()
ClusterConnectiongetNodes in interface ClusterConnectionpublic TransportConfiguration getConnector()
getConnector in interface ClusterConnectionpublic void nodeDown(long eventUID,
String nodeID)
ClusterTopologyListenernodeDown in interface ClusterTopologyListenernodeID - the id of the node leaving the clusterpublic void nodeUP(TopologyMember topologyMember, boolean last)
ClusterTopologyListenernodeUP in interface ClusterTopologyListenerlast - if the whole cluster topology is being transmitted (after adding the listener to
the cluster connection) this parameter will be true for the last topology
member.public void informClusterOfBackup()
informClusterOfBackup in interface ClusterConnectionpublic Map<String,MessageFlowRecord> getRecords()
public String describe()
describe in interface ClusterConnectionpublic boolean verify(String clusterUser0, String clusterPassword0)
ClusterConnectionverify in interface ClusterConnectiontrue if username and password match, false otherwise.public void removeRecord(String targetNodeID)
removeRecord in interface ClusterConnectionpublic void disconnectRecord(String targetNodeID)
disconnectRecord in interface ClusterConnectionCopyright © 2018 JBoss by Red Hat. All rights reserved.