public class DurabilityQuorum extends Object
| Constructor and Description |
|---|
DurabilityQuorum(RepImpl repImpl) |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureReplicasForCommit(MasterTxn txn,
int insufficientReplicasTimeout)
See if there are a sufficient number of replicas alive to support
the commit for this transaction.
|
void |
ensureSufficientAcks(FeederTxns.TxnInfo txnInfo,
int timeoutMs)
Determine if this transaction has been adequately acknowledged.
|
int |
getCurrentRequiredAckCount(Durability.ReplicaAckPolicy ackPolicy)
Returns the minimum number of acknowledgments required to satisfy the
ReplicaAckPolicy for a given group size.
|
boolean |
replicaAcksQualify(RepNodeImpl replica)
Determine whether acknowledgments from the specified replica should be
counted against transaction durability requirements.
|
public DurabilityQuorum(RepImpl repImpl)
public void ensureReplicasForCommit(MasterTxn txn, int insufficientReplicasTimeout) throws DatabaseException, InterruptedException, InsufficientReplicasException
insufficientReplicasTimeout - timeout in msInsufficientReplicasException - if there are not enough replicas
connected to this feeder to be able to commit the transaction.DatabaseExceptionInterruptedExceptionpublic boolean replicaAcksQualify(RepNodeImpl replica)
replica - the replica nodepublic void ensureSufficientAcks(FeederTxns.TxnInfo txnInfo, int timeoutMs) throws InsufficientAcksException
InsufficientAcksException - if the transaction's durability
requirements have not been met.public int getCurrentRequiredAckCount(Durability.ReplicaAckPolicy ackPolicy)
replicaAcksQualify(com.sleepycat.je.rep.impl.RepNodeImpl) will only
count qualified acks against the required count. That does mean that
getCurrentRequiredAckCount and noteReplicaAcks for a transaction must be
kept consistent.Copyright © 2024. All rights reserved.