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