|
Berkeley DB Java Edition version 4.1.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sleepycat.je.DatabaseException
com.sleepycat.je.RunRecoveryException
com.sleepycat.je.EnvironmentFailureException
com.sleepycat.je.rep.RestartRequiredException
com.sleepycat.je.rep.RollbackException
public class RollbackException
This asynchronous exception indicates that a new master has been selected,
this Replica
's log is ahead of the current Master
,
and in this case, the Replica
was unable to rollback without a
recovery. As a consequence, it is possible that one or more of the most
recently committed transactions may need to be rolled back, before the
Replica
can synchronize its state with that of the current
Master
.
Existing ReplicatedEnvironment
, and consequently Database
handles, are invalidated as a result of this exception. The application must
close all old handles and create new handles before it can proceed. The
actual rollback of any recently committed transactions is done when the
application re-instantiates and thereby reopens the ReplicatedEnvironment
. The application is responsible for discarding and
recreating any transient state that may be associated with the committed
transactions that were rolled back. getEarliestTransactionId()
and
getEarliestTransactionCommitTime()
provide information to help
determine which transactions might be rolled back. Note that it is possible
that no committed transactions have been rolled back and that the
application need do no adjustments, in which case
getEarliestTransactionCommitTime()
will return null.
This exception should be encountered relatively infrequently in practice,
since the election mechanism favors nodes with the most advanced log when
deciding upon a master. The exception, due to its nature, can only be
encountered when the node is in the Replica
state, or the node
is trying to transition to the Replica
state.
Use of weak durability requirements like
Durability.ReplicaAckPolicy.NONE
or a
ReplicationMutableConfig.NODE_PRIORITY
of zero
increases the likelihood of this exception.
RollbackProhibitedException
,
Serialized FormMethod Summary | |
---|---|
Long |
getEarliestTransactionCommitTime()
Return the time in milliseconds of the earliest transaction commit that has been rolled back. |
long |
getEarliestTransactionId()
Return the id of the earliest transaction commit that has been rolled back. |
String |
getMessage()
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public String getMessage()
getMessage
in class EnvironmentFailureException
public Long getEarliestTransactionCommitTime()
public long getEarliestTransactionId()
|
Berkeley DB Java Edition version 4.1.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |