|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.rep.impl.node.Replica
public class Replica
The Replica class is the locus of the replay operations and replica transaction consistency tracking and management operations at a replica node. A single instance of this class is created when the replication node is created and exists for the lifetime of the replication node, although it is only really used when the node is operating as a Replica. Note that the Replica (like the FeederManager) does not have its own independent thread of control; it runs in the RepNode's thread.
Nested Class Summary | |
---|---|
(package private) static class |
Replica.ConnectRetryException
|
class |
Replica.ConsistencyTracker
Tracks the consistency of this replica wrt the Master. |
static class |
Replica.HardRecoveryElectionException
Indicates that an election is needed before the hard recovery can proceed. |
(package private) static class |
Replica.RetryException
Thrown to indicate that the Replica must retry connecting to the same master, after some period of time. |
Constructor Summary | |
---|---|
Replica(RepNode repNode,
Replay replay)
|
Method Summary | |
---|---|
(package private) void |
clearDbTreeCache()
|
protected void |
doRunReplicaLoopInternalWork()
|
Replica.ConsistencyTracker |
getConsistencyTracker()
|
(package private) Map<DatabaseId,DatabaseImpl> |
getDbCache()
|
(package private) long |
getMasterCommitVLSN()
Returns the last commit VLSN at the master, as known at the replica. |
(package private) Protocol |
getProtocol()
|
StatGroup |
getProtocolStats(StatsConfig config)
|
StatGroup |
getReplayStats(StatsConfig config)
Returns the replay statistics associated with the Replica. |
(package private) SocketChannel |
getReplicaFeederChannel()
|
ReplicaFeederSyncup.TestHook<Object> |
getReplicaFeederSyncupHook()
|
StatGroup |
getTrackerStats(StatsConfig config)
|
(package private) void |
masterTransitionCleanup()
Invoked when this node transitions to the master state. |
Replay |
replay()
|
void |
resetStats()
|
(package private) void |
runReplicaLoop()
The core control loop when the node is serving as a Replica. |
void |
setDontProcessStream()
For unit testing only! |
void |
setReplicaFeederSyncupHook(ReplicaFeederSyncup.TestHook<Object> syncupHook)
Set a test hook which is executed when the ReplicaFeederSyncup finishes. |
void |
setTestDelayMs(int testDelayMs)
For unit testing only! |
void |
shutdown()
Shutdown the Replica, free any threads that may have been waiting for the replica to reach some degree of consistency. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
Replica(RepNode repNode, Replay replay)
Method Detail |
---|
public void shutdown()
public void setTestDelayMs(int testDelayMs)
public void setDontProcessStream()
public Replay replay()
Map<DatabaseId,DatabaseImpl> getDbCache()
public Replica.ConsistencyTracker getConsistencyTracker()
SocketChannel getReplicaFeederChannel()
Protocol getProtocol()
long getMasterCommitVLSN()
void runReplicaLoop() throws InterruptedException, DatabaseException, GroupShutdownException
InterruptedException
RestoreFailedException
DatabaseException
- if the environment cannot be closed/for a
re-init
GroupShutdownException
protected void doRunReplicaLoopInternalWork() throws Exception
Exception
void clearDbTreeCache()
void masterTransitionCleanup() throws DatabaseException
DatabaseException
public StatGroup getReplayStats(StatsConfig config)
public StatGroup getProtocolStats(StatsConfig config)
public StatGroup getTrackerStats(StatsConfig config)
public void resetStats()
public void setReplicaFeederSyncupHook(ReplicaFeederSyncup.TestHook<Object> syncupHook)
public ReplicaFeederSyncup.TestHook<Object> getReplicaFeederSyncupHook()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |