public class FeederTxns extends Object
The lastCommitVLSN, lastCommitTimestamp, and vlsnRate statistics provide general information about committed transactions on the master, but are also intended to be used programmatically along with other statistics for the feeder to provide information about how up-to-date the replicas are. See the Feeder class for more details.
| Modifier and Type | Class and Description |
|---|---|
class |
FeederTxns.TxnInfo
Used to track the latch and the transaction information associated with
a transaction needing an acknowledgment.
|
| Constructor and Description |
|---|
FeederTxns(RepImpl repImpl) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitReplicaAcks(MasterTxn txn,
int timeoutMs)
Waits for the required number of replica acks to come through.
|
void |
clearTransactionAcks(Txn txn) |
MasterTxn |
getAckTxn(long txnId)
Returns the transaction if it's waiting for acknowledgments.
|
AtomicLongStat |
getLastCommitTimestamp() |
AtomicLongStat |
getLastCommitVLSN() |
StatGroup |
getStats() |
StatGroup |
getStats(StatsConfig config) |
LongAvgRateStat |
getVLSNRate() |
FeederTxns.TxnInfo |
noteReplicaAck(RepNodeImpl replica,
long txnId)
Notes that an acknowledgment was received from a replica.
|
void |
resetStats() |
void |
setupForAcks(MasterTxn txn)
Create a new TxnInfo so that transaction commit can wait on the latch it
sets up.
|
public FeederTxns(RepImpl repImpl)
public AtomicLongStat getLastCommitVLSN()
public AtomicLongStat getLastCommitTimestamp()
public LongAvgRateStat getVLSNRate()
public void setupForAcks(MasterTxn txn)
txn - identifies the transaction.public MasterTxn getAckTxn(long txnId)
public void clearTransactionAcks(Txn txn)
public FeederTxns.TxnInfo noteReplicaAck(RepNodeImpl replica, long txnId)
replica - the replica nodetxnId - the locally committed transaction that was acknowledged.public void awaitReplicaAcks(MasterTxn txn, int timeoutMs) throws InterruptedException
txn - identifies the transaction to wait for.timeoutMs - the amount of time to wait for the acknowledgments
before giving up.InsufficientAcksException - if the ack requirements were not metInterruptedExceptionpublic StatGroup getStats()
public void resetStats()
public StatGroup getStats(StatsConfig config)
Copyright © 2024. All rights reserved.