public final class QuorumManager extends Object implements SessionFailureListener, ClusterTopologyListener
#failOver(boolean)
.
In case of
FailureListener#connectionFailed(HornetQException, boolean)
. This is affected by the TTL
configuration.Modifier and Type | Field and Description |
---|---|
static int |
WAIT_TIME_AFTER_FIRST_LIVE_STOPPING_MSG
This is a safety net in case the live sends the first
ReplicationLiveIsStoppingMessage
with code ReplicationLiveIsStoppingMessage.LiveStopping.STOP_CALLED and crashes before sending the second with
ReplicationLiveIsStoppingMessage.LiveStopping.FAIL_OVER . |
Constructor and Description |
---|
QuorumManager(ServerLocator serverLocator,
ExecutorService executor,
ScheduledExecutorService scheduledPool,
String identity,
NodeManager nodeManager,
NetworkHealthCheck networkHealthCheck) |
Modifier and Type | Method and Description |
---|---|
void |
addAsFailureListenerOf(CoreRemotingConnection liveConnection) |
void |
beforeReconnect(HornetQException exception)
Notifies that a connection has failed due to the specified exception.
|
void |
causeExit(org.hornetq.core.server.impl.QuorumManager.BACKUP_ACTIVATION explicitSignal)
Cause the Activation thread to exit and the server to be stopped.
|
void |
connectionFailed(HornetQException exception,
boolean failedOver)
Notifies that a connection has failed due to the specified exception.
|
void |
failOver(ReplicationLiveIsStoppingMessage.LiveStopping finalMessage)
Releases the latch, causing the backup activation thread to fail-over.
|
void |
nodeDown(long eventUID,
String nodeID)
Triggered when a node leaves the cluster.
|
void |
nodeUP(TopologyMember topologyMember,
boolean last)
Triggered when a node joins the cluster.
|
void |
notifyAlreadyReplicating() |
void |
notifyRegistrationFailed() |
void |
reset() |
void |
setLiveID(String liveID) |
void |
setSessionFactory(ClientSessionFactoryInternal sessionFactory) |
String |
toString() |
org.hornetq.core.server.impl.QuorumManager.BACKUP_ACTIVATION |
waitForStatusChange()
Called by the replicating backup (i.e.
|
public static final int WAIT_TIME_AFTER_FIRST_LIVE_STOPPING_MSG
ReplicationLiveIsStoppingMessage
with code ReplicationLiveIsStoppingMessage.LiveStopping.STOP_CALLED
and crashes before sending the second with
ReplicationLiveIsStoppingMessage.LiveStopping.FAIL_OVER
.
If the second message does come within this dead line, we fail over anyway.public QuorumManager(ServerLocator serverLocator, ExecutorService executor, ScheduledExecutorService scheduledPool, String identity, NodeManager nodeManager, NetworkHealthCheck networkHealthCheck)
public void nodeUP(TopologyMember topologyMember, boolean last)
ClusterTopologyListener
nodeUP
in interface ClusterTopologyListener
last
- if the whole cluster topology is being transmitted (after adding the listener to
the cluster connection) this parameter will be true
for the last topology
member.public void nodeDown(long eventUID, String nodeID)
ClusterTopologyListener
nodeDown
in interface ClusterTopologyListener
nodeID
- the id of the node leaving the clusterpublic void setLiveID(String liveID)
public void notifyRegistrationFailed()
public void notifyAlreadyReplicating()
public void beforeReconnect(HornetQException exception)
SessionFailureListener
beforeReconnect
in interface SessionFailureListener
exception
- exception which has caused the connection to failpublic void connectionFailed(HornetQException exception, boolean failedOver)
FailureListener
connectionFailed
in interface FailureListener
exception
- exception which has caused the connection to failpublic org.hornetq.core.server.impl.QuorumManager.BACKUP_ACTIVATION waitForStatusChange()
public void causeExit(org.hornetq.core.server.impl.QuorumManager.BACKUP_ACTIVATION explicitSignal)
explicitSignal
- the state we want to set the quorum manager to returnpublic void failOver(ReplicationLiveIsStoppingMessage.LiveStopping finalMessage)
public void setSessionFactory(ClientSessionFactoryInternal sessionFactory)
sessionFactory
- the session factory used to connect to the live serverpublic void addAsFailureListenerOf(CoreRemotingConnection liveConnection)
liveConnection
- public void reset()
Copyright © 2018 JBoss by Red Hat. All rights reserved.