|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.rep.impl.node.Feeder
public final class Feeder
There is an instance of a Feeder for each client that needs a replication stream. Either a master, or replica (providing feeder services) may establish a feeder. A feeder is created in response to a request from a Replica, and is shutdown either upon loss of connectivity, or upon a change in mastership. The protocol used to validate and negotiate a connection is synchronous, but once this phase has been completed, the communication between the feeder and replica is asynchronous. To handle the async communications, the feeder has two threads associated with it: 1) An output thread whose sole purpose is to pump log records (and if necessary heart beat requests) down to the replica as fast as the network will allow it 2) An input thread that listens for responses to transaction commits and heart beat responses.
Nested Class Summary | |
---|---|
static class |
Feeder.ExitException
A marker exception that wraps the real exception. |
Constructor Summary | |
---|---|
Feeder()
|
|
Feeder(FeederManager feederManager,
SocketChannel socketChannel)
|
Method Summary | |
---|---|
(package private) void |
adviseMasterTransferProgress()
|
String |
dumpState()
For debugging and exception messages. |
StatGroup |
getProtocolStats(StatsConfig config)
|
NameIdPair |
getReplicaNameIdPair()
|
VLSN |
getReplicaTxnEndVLSN()
Returns the latest commit VLSN that was acked by the replica, or NULL_VLSN if no commit was acked since the time the feeder was established. |
RepNode |
getRepNode()
|
boolean |
isShutdown()
|
(package private) void |
resetStats()
|
(package private) void |
setMasterTransfer(MasterTransfer mt)
|
static void |
setSprayAfterNMessagesCount(long sANMC)
|
(package private) void |
shutdown(Exception shutdownException)
Shutdown the feeder, closing its channel and releasing its threads. |
(package private) void |
startFeederThreads()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
Feeder(FeederManager feederManager, SocketChannel socketChannel) throws DatabaseException, IOException
DatabaseException
IOException
public Feeder()
Method Detail |
---|
void startFeederThreads()
public StatGroup getProtocolStats(StatsConfig config)
void resetStats()
void setMasterTransfer(MasterTransfer mt)
void adviseMasterTransferProgress()
public RepNode getRepNode()
public NameIdPair getReplicaNameIdPair()
public VLSN getReplicaTxnEndVLSN()
void shutdown(Exception shutdownException)
public boolean isShutdown()
public static void setSprayAfterNMessagesCount(long sANMC)
public String dumpState()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |