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) |
Modifier and Type | Method and Description |
---|---|
void |
addAsFailureListenerOf(CoreRemotingConnection liveConnection) |
void |
beforeReconnect(HornetQException 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) |
void |
failOver(ReplicationLiveIsStoppingMessage.LiveStopping finalMessage)
Releases the latch, causing the backup activation thread to fail-over.
|
void |
nodeDown(long eventUID,
String nodeID) |
void |
nodeUP(TopologyMember topologyMember,
boolean last) |
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)
public void nodeUP(TopologyMember topologyMember, boolean last)
nodeUP
in interface ClusterTopologyListener
public void nodeDown(long eventUID, String nodeID)
nodeDown
in interface ClusterTopologyListener
public void setLiveID(String liveID)
public void notifyRegistrationFailed()
public void notifyAlreadyReplicating()
public void beforeReconnect(HornetQException exception)
beforeReconnect
in interface SessionFailureListener
public void connectionFailed(HornetQException exception, boolean failedOver)
connectionFailed
in interface FailureListener
public 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 © 2017 JBoss, a division of Red Hat. All Rights Reserved.