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) |
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)
nodeDown
in interface ClusterTopologyListener
public void nodeUP(TopologyMember topologyMember, boolean last)
nodeUP
in interface ClusterTopologyListener
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 The Apache Software Foundation. All Rights Reserved.