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
Exception
public 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
Exception
public void start() throws Exception
start
in interface ActiveMQComponent
Exception
public void flushExecutor()
flushExecutor
in interface ClusterConnection
public void stop() throws Exception
stop
in interface ActiveMQComponent
Exception
public void addClusterTopologyListener(ClusterTopologyListener listener)
addClusterTopologyListener
in interface ClusterConnection
public void removeClusterTopologyListener(ClusterTopologyListener listener)
removeClusterTopologyListener
in interface ClusterConnection
public Topology getTopology()
getTopology
in interface ClusterConnection
public void nodeAnnounced(long uniqueEventID, String nodeID, String backupGroupName, String scaleDownGroupName, Pair<TransportConfiguration,TransportConfiguration> connectorPair, boolean backup)
nodeAnnounced
in interface ClusterConnection
public void onConnection(ClientSessionFactoryInternal sf)
onConnection
in interface AfterConnectInternalListener
public boolean isStarted()
isStarted
in interface ActiveMQComponent
public SimpleString getName()
getName
in interface ClusterConnection
public String getNodeID()
getNodeID
in interface ClusterConnection
public ActiveMQServer getServer()
getServer
in interface ClusterConnection
public boolean isNodeActive(String nodeId)
isNodeActive
in interface ClusterConnection
public long getCallTimeout()
getCallTimeout
in interface ClusterConnection
public Map<String,String> getNodes()
ClusterConnection
getNodes
in interface ClusterConnection
public TransportConfiguration getConnector()
getConnector
in interface ClusterConnection
public void nodeDown(long eventUID, String nodeID)
ClusterTopologyListener
nodeDown
in interface ClusterTopologyListener
nodeID
- the id of the node leaving the clusterpublic void nodeUP(TopologyMember topologyMember, boolean last)
ClusterTopologyListener
nodeUP
in interface ClusterTopologyListener
last
- 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 ClusterConnection
public Map<String,MessageFlowRecord> getRecords()
public String describe()
describe
in interface ClusterConnection
public boolean verify(String clusterUser0, String clusterPassword0)
ClusterConnection
verify
in interface ClusterConnection
true
if username and password match, false
otherwise.public void removeRecord(String targetNodeID)
removeRecord
in interface ClusterConnection
public void disconnectRecord(String targetNodeID)
disconnectRecord
in interface ClusterConnection
Copyright © 2018 JBoss by Red Hat. All rights reserved.