public class InsufficientAcksException extends OperationFailureException
This exception is thrown at the time of a commit in a Master, if the Master
could not obtain transaction commit acknowledgments from its Replicas in
accordance with the Durability.ReplicaAckPolicy
currently in effect and within
the requested timeout interval. This exception will never be thrown when the
ReplicaAckPolicy
of NONE
is in effect.
Note that an InsufficientAcksException
means the transaction has
already committed at the master. The transaction may also have been
committed at one or more Replicas, but the lack of replica acknowledgments
means that the number of replicas that committed could not be
established. If the transaction was in fact committed by less than a simple
majority of the nodes, it could result in a RollbackException
when
the node subsequently attempts to rejoin the group as a Replica.
The application can handle the exception and choose to respond in a number of ways. For example, it can
Durability
,
Serialized FormConstructor and Description |
---|
InsufficientAcksException(com.sleepycat.je.rep.txn.MasterTxn txn,
int acksPending,
int ackTimeoutMs,
String feederState) |
InsufficientAcksException(String message)
For testing only.
|
Modifier and Type | Method and Description |
---|---|
int |
acksPending()
It returns the number of Replicas that did not respond with an
acknowledgment within the Replica commit timeout period.
|
int |
acksRequired()
It returns the number of acknowledgments required by the commit policy.
|
int |
ackTimeout()
Returns the acknowledgment timeout that was in effect at the time of the
exception.
|
OperationFailureException |
wrapSelf(String msg)
For internal use only.
|
addErrorMessage, addRethrownStackTrace, getMessage, getVersionHeader
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InsufficientAcksException(com.sleepycat.je.rep.txn.MasterTxn txn, int acksPending, int ackTimeoutMs, String feederState)
acksPending
- the number of missing acknowledgmentsackTimeoutMs
- the current acknowledgment timeout value in
millisecondspublic InsufficientAcksException(String message)
public OperationFailureException wrapSelf(String msg)
wrapSelf
in class OperationFailureException
public int acksPending()
public int acksRequired()
public int ackTimeout()
Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.