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,
boolean routeWhenNoConsumers,
int confirmationWindowSize,
ExecutorFactory executorFactory,
HornetQServer 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,
boolean routeWhenNoConsumers,
int confirmationWindowSize,
ExecutorFactory executorFactory,
HornetQServer 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, boolean routeWhenNoConsumers, int confirmationWindowSize, ExecutorFactory executorFactory, HornetQServer server, PostOffice postOffice, ManagementService managementService, ScheduledExecutorService scheduledExecutor, int maxHops, NodeManager nodeManager, String clusterUser, String clusterPassword, boolean allowDirectConnectionsOnly, long clusterNotificationInterval, int clusterNotificationAttempts) throws Exception
staticTranspConfigs
- notice if null
this is a cluster which won't connect to
anyone, but that can still accept incoming connections.clusterNotificationInterval
- 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, boolean routeWhenNoConsumers, int confirmationWindowSize, ExecutorFactory executorFactory, HornetQServer server, PostOffice postOffice, ManagementService managementService, ScheduledExecutorService scheduledExecutor, int maxHops, NodeManager nodeManager, String clusterUser, String clusterPassword, boolean allowDirectConnectionsOnly, long clusterNotificationInterval, int clusterNotificationAttempts) throws Exception
dg
- discovery group, notice if null
this is a cluster which won't connect to
anyone, but that can still accept incoming connections.clusterNotificationInterval
- Exception
public void start() throws Exception
start
in interface HornetQComponent
Exception
public void flushExecutor()
flushExecutor
in interface ClusterConnection
public void stop() throws Exception
stop
in interface HornetQComponent
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 nodeName, 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 HornetQComponent
public SimpleString getName()
getName
in interface ClusterConnection
public String getNodeID()
getNodeID
in interface ClusterConnection
public HornetQServer getServer()
getServer
in interface ClusterConnection
public boolean isNodeActive(String nodeId)
isNodeActive
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.Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.