public class ClusterController extends Object implements ActiveMQComponent
| Constructor and Description |
|---|
ClusterController(ActiveMQServer server,
ScheduledExecutorService scheduledExecutor) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClusterChannelHandler(Channel channel,
Acceptor acceptorUsed,
CoreRemotingConnection remotingConnection,
Activation activation)
used to set a channel handler on the connection that can be used by the cluster control
|
void |
addClusterConnection(SimpleString name,
DiscoveryGroupConfiguration dg,
ClusterConnectionConfiguration config)
add a locator for a cluster connection.
|
void |
addClusterConnection(SimpleString name,
TransportConfiguration[] tcConfigs,
ClusterConnectionConfiguration config)
add a locator for a cluster connection.
|
void |
addClusterTopologyListenerForReplication(ClusterTopologyListener listener)
add a cluster listener
|
void |
addIncomingInterceptorForReplication(Interceptor interceptor)
add an interceptor
|
void |
awaitConnectionToReplicationCluster()
wait until we have connected to the cluster.
|
ClusterControl |
connectToNode(TransportConfiguration transportConfiguration)
connect to a specific node in the cluster used for replication
|
ClusterControl |
connectToNodeInCluster(ClientSessionFactoryInternal sf)
connect to an already defined node in the cluster
|
ClusterControl |
connectToNodeInReplicatedCluster(TransportConfiguration transportConfiguration)
connect to a specific node in the cluster used for replication
|
int |
getDefaultClusterSize() |
Topology |
getDefaultClusterTopology() |
String |
getIdentity() |
SimpleString |
getNodeID() |
QuorumManager |
getQuorumManager() |
ServerLocator |
getReplicationLocator() |
long |
getRetryIntervalForReplicatedCluster()
retry interval for connecting to the cluster
|
boolean |
isStarted() |
void |
setDefaultClusterConnectionName(SimpleString defaultClusterConnection) |
void |
setReplicatedClusterName(String replicatedClusterName) |
void |
start() |
void |
stop() |
public ClusterController(ActiveMQServer server, ScheduledExecutorService scheduledExecutor)
public void start()
throws Exception
start in interface ActiveMQComponentExceptionpublic void stop()
throws Exception
stop in interface ActiveMQComponentExceptionpublic boolean isStarted()
isStarted in interface ActiveMQComponentpublic QuorumManager getQuorumManager()
public void setDefaultClusterConnectionName(SimpleString defaultClusterConnection)
public void addClusterConnection(SimpleString name, DiscoveryGroupConfiguration dg, ClusterConnectionConfiguration config)
name - the cluster connection namedg - the discovery group to useconfig - the cluster connection configpublic void addClusterConnection(SimpleString name, TransportConfiguration[] tcConfigs, ClusterConnectionConfiguration config)
name - the cluster connection nametcConfigs - the transport configurations to usepublic void addClusterTopologyListenerForReplication(ClusterTopologyListener listener)
listener - public void addIncomingInterceptorForReplication(Interceptor interceptor)
interceptor - public ClusterControl connectToNode(TransportConfiguration transportConfiguration) throws Exception
transportConfiguration - the configuration of the node to connect to.Exceptionpublic ClusterControl connectToNodeInReplicatedCluster(TransportConfiguration transportConfiguration) throws Exception
transportConfiguration - the configuration of the node to connect to.Exceptionpublic ClusterControl connectToNodeInCluster(ClientSessionFactoryInternal sf)
sf - the session factorypublic long getRetryIntervalForReplicatedCluster()
public void awaitConnectionToReplicationCluster()
throws InterruptedException
InterruptedExceptionpublic void addClusterChannelHandler(Channel channel, Acceptor acceptorUsed, CoreRemotingConnection remotingConnection, Activation activation)
channel - the channel to set the handleracceptorUsed - the acceptor used for connectionremotingConnection - the connection itselfactivation - public int getDefaultClusterSize()
public Topology getDefaultClusterTopology()
public SimpleString getNodeID()
public String getIdentity()
public void setReplicatedClusterName(String replicatedClusterName)
public ServerLocator getReplicationLocator()
Copyright © 2016 JBoss by Red Hat. All rights reserved.