public final class FeederManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FEEDER_SERVICE |
static int |
MASTER_CHANGE_CHECK_TIMEOUT |
(package private) java.util.concurrent.atomic.AtomicBoolean |
shutdown |
Constructor and Description |
---|
FeederManager(RepNode repNode) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
activateFeeder(Feeder feeder)
Transitions a Feeder to being active, so that it can be used in
considerations relating to commit acknowledgments.
|
int |
activeReplicaCount()
The numbers of Replicas currently "active" with this feeder.
|
java.util.Set<java.lang.String> |
activeReplicas()
Returns the set of Replicas that are currently active with this feeder.
|
java.util.Map<java.lang.String,Feeder> |
activeReplicasMap() |
java.lang.String |
dumpState() |
void |
ensureReplicasForCommit(MasterTxn txn,
Durability.ReplicaAckPolicy ackPolicy,
int requiredReplicaCount,
int insufficientReplicasTimeout)
Ensures that the required number of replicas are active if the node is
currently the master.
|
Feeder |
getFeeder(java.lang.String nodeName)
Returns the Feeder associated with the node, if such a feeder is
currently active.
|
StatGroup |
getFeederManagerStats(StatsConfig config)
Returns the statistics associated with the FeederManager.
|
LongMaxZeroStat |
getnMaxReplicaLag() |
StringStat |
getnMaxReplicaLagName() |
int |
getNumCurrentAckFeeders(VLSN commitVLSN)
Returns a count of the number of feeders whose replicas have
acknowledged txn-end VLSNs >= the commitVLSN argument.
|
StatGroup |
getProtocolStats(StatsConfig config) |
int |
getTestDelayMs() |
(package private) void |
incStats(StatGroup feederStats)
Accumulates statistics from a terminating feeder.
|
Feeder |
putFeeder(java.lang.String nodeName,
Feeder feeder) |
(package private) void |
removeFeeder(Feeder feeder)
Remove the feeder from the sets used to track it.
|
(package private) RepNode |
repNode()
Returns the RepNode associated with the FeederManager
|
void |
resetStats() |
(package private) void |
runFeeders()
The core feeder listener loop that is run either in a Master node, or in
a Replica that is serving as a Feeder to other Replica nodes.
|
(package private) void |
setRepNodeShutdownException(java.lang.RuntimeException rNSE) |
void |
setTestDelayMs(int testDelayMs) |
void |
shutdownFeeder(RepNodeImpl node)
Shuts down a specific feeder.
|
(package private) void |
shutdownQueue()
Clears and shuts down the runFeeders by inserting a special EOF marker
value into the queue.
|
java.util.concurrent.atomic.AtomicBoolean shutdown
public static final int MASTER_CHANGE_CHECK_TIMEOUT
public static final java.lang.String FEEDER_SERVICE
FeederManager(RepNode repNode)
public StatGroup getFeederManagerStats(StatsConfig config)
public StatGroup getProtocolStats(StatsConfig config)
public void resetStats()
void incStats(StatGroup feederStats)
stats
- public int getTestDelayMs()
public void setTestDelayMs(int testDelayMs)
RepNode repNode()
public Feeder getFeeder(java.lang.String nodeName)
public LongMaxZeroStat getnMaxReplicaLag()
public StringStat getnMaxReplicaLagName()
void setRepNodeShutdownException(java.lang.RuntimeException rNSE)
public int activeReplicaCount()
public java.util.Set<java.lang.String> activeReplicas()
public java.util.Map<java.lang.String,Feeder> activeReplicasMap()
void activateFeeder(Feeder feeder) throws java.lang.InterruptedException
feeder
- the feeder being transitioned.DuplicateReplicaException
- if the Feeder is already active.java.lang.InterruptedException
void removeFeeder(Feeder feeder)
feeder
- void shutdownQueue()
void runFeeders() throws DatabaseException
DatabaseException
public void shutdownFeeder(RepNodeImpl node)
public void ensureReplicasForCommit(MasterTxn txn, Durability.ReplicaAckPolicy ackPolicy, int requiredReplicaCount, int insufficientReplicasTimeout) throws java.lang.InterruptedException, DatabaseException
requiredReplicaCount
- the total nodes required by the transactioninsufficientReplicasTimeout
- the amount of time (in ms) that the
Feeder will wait for the requiredReplicaCountjava.lang.InterruptedException
DatabaseException
- if the wait timed out.public java.lang.String dumpState()
public int getNumCurrentAckFeeders(VLSN commitVLSN)
commitVLSN
- the commitVLSN being checkedCopyright (c) 2004-2012 Oracle. All rights reserved.