public final class ClusterConnectionImpl extends Object implements ClusterConnection, org.apache.activemq.artemis.core.client.impl.AfterConnectInternalListener
| Constructor and Description |
|---|
ClusterConnectionImpl(ClusterManager manager,
org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration dg,
org.apache.activemq.artemis.api.core.TransportConfiguration connector,
org.apache.activemq.artemis.api.core.SimpleString name,
org.apache.activemq.artemis.api.core.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,
org.apache.activemq.artemis.utils.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,
org.apache.activemq.artemis.api.core.TransportConfiguration[] staticTranspConfigs,
org.apache.activemq.artemis.api.core.TransportConfiguration connector,
org.apache.activemq.artemis.api.core.SimpleString name,
org.apache.activemq.artemis.api.core.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,
org.apache.activemq.artemis.utils.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(org.apache.activemq.artemis.api.core.client.ClusterTopologyListener listener) |
String |
describe() |
void |
disconnectRecord(String targetNodeID) |
void |
flushExecutor() |
long |
getCallTimeout() |
org.apache.activemq.artemis.api.core.TransportConfiguration |
getConnector() |
org.apache.activemq.artemis.api.core.SimpleString |
getName() |
String |
getNodeID() |
Map<String,String> |
getNodes()
Only used for tests?
|
Map<String,MessageFlowRecord> |
getRecords() |
ActiveMQServer |
getServer() |
org.apache.activemq.artemis.core.client.impl.Topology |
getTopology() |
void |
informClusterOfBackup() |
boolean |
isNodeActive(String nodeId) |
boolean |
isStarted() |
void |
nodeAnnounced(long uniqueEventID,
String nodeID,
String backupGroupName,
String scaleDownGroupName,
org.apache.activemq.artemis.api.core.Pair<org.apache.activemq.artemis.api.core.TransportConfiguration,org.apache.activemq.artemis.api.core.TransportConfiguration> connectorPair,
boolean backup) |
void |
nodeDown(long eventUID,
String nodeID) |
void |
nodeUP(org.apache.activemq.artemis.api.core.client.TopologyMember topologyMember,
boolean last) |
void |
onConnection(org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryInternal sf) |
void |
removeClusterTopologyListener(org.apache.activemq.artemis.api.core.client.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, org.apache.activemq.artemis.api.core.TransportConfiguration[] staticTranspConfigs, org.apache.activemq.artemis.api.core.TransportConfiguration connector, org.apache.activemq.artemis.api.core.SimpleString name, org.apache.activemq.artemis.api.core.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, org.apache.activemq.artemis.utils.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, org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration dg, org.apache.activemq.artemis.api.core.TransportConfiguration connector, org.apache.activemq.artemis.api.core.SimpleString name, org.apache.activemq.artemis.api.core.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, org.apache.activemq.artemis.utils.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 org.apache.activemq.artemis.core.server.ActiveMQComponentExceptionpublic void flushExecutor()
flushExecutor in interface ClusterConnectionpublic void stop()
throws Exception
stop in interface org.apache.activemq.artemis.core.server.ActiveMQComponentExceptionpublic void addClusterTopologyListener(org.apache.activemq.artemis.api.core.client.ClusterTopologyListener listener)
addClusterTopologyListener in interface ClusterConnectionpublic void removeClusterTopologyListener(org.apache.activemq.artemis.api.core.client.ClusterTopologyListener listener)
removeClusterTopologyListener in interface ClusterConnectionpublic org.apache.activemq.artemis.core.client.impl.Topology getTopology()
getTopology in interface ClusterConnectionpublic void nodeAnnounced(long uniqueEventID,
String nodeID,
String backupGroupName,
String scaleDownGroupName,
org.apache.activemq.artemis.api.core.Pair<org.apache.activemq.artemis.api.core.TransportConfiguration,org.apache.activemq.artemis.api.core.TransportConfiguration> connectorPair,
boolean backup)
nodeAnnounced in interface ClusterConnectionpublic void onConnection(org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryInternal sf)
onConnection in interface org.apache.activemq.artemis.core.client.impl.AfterConnectInternalListenerpublic boolean isStarted()
isStarted in interface org.apache.activemq.artemis.core.server.ActiveMQComponentpublic org.apache.activemq.artemis.api.core.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 org.apache.activemq.artemis.api.core.TransportConfiguration getConnector()
getConnector in interface ClusterConnectionpublic void nodeDown(long eventUID,
String nodeID)
nodeDown in interface org.apache.activemq.artemis.api.core.client.ClusterTopologyListenerpublic void nodeUP(org.apache.activemq.artemis.api.core.client.TopologyMember topologyMember,
boolean last)
nodeUP in interface org.apache.activemq.artemis.api.core.client.ClusterTopologyListenerpublic 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 © 2023 The Apache Software Foundation. All rights reserved.