|
Berkeley DB Java Edition version 5.0.58 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Transaction.State>
com.sleepycat.je.Transaction.State
public static enum Transaction.State
The current state of the transaction.
Enum Constant Summary | |
---|---|
ABORTED
The transaction has been aborted. |
|
COMMITTED
The transaction has been committed and is locally durable according to the local SyncPolicy requested. |
|
MUST_ABORT
The transaction has been invalidated by an exception and cannot be committed. |
|
OPEN
The transaction has not been committed or aborted, and can be used for performing operations. |
|
POSSIBLY_COMMITTED
An exception was thrown by the commit method due to an error
that occurred while attempting to make the transaction durable. |
Method Summary | |
---|---|
static Transaction.State |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Transaction.State[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Transaction.State OPEN
Transaction.isValid()
returns true. For all other states, Transaction.isValid()
will
return false.
public static final Transaction.State POSSIBLY_COMMITTED
commit
method due to an error
that occurred while attempting to make the transaction durable. The
transaction may or may not be locally durable, according to the
local SyncPolicy
requested.
This is an unusual situation and is normally due to a system
failure, storage device failure, disk full condition, thread
interrupt, or a bug of some kind. When a transaction is in this
state, the Environment will have been invalidated
by the error.
In a replicated environment, a transaction in this state is not transferred to replicas. If it turns out that the transaction is indeed durable, it will be transferred to replicas via normal replication mechanisms when the Environment is re-opened.
When the commit
method throws an exception and the
transaction is in the POSSIBLY_COMMITTED
state, some
applications may wish to perform a data query to determine whether
the transaction is durable or not. Note that in the event of a
system level failure, the reads themselves may be unreliable, e.g.
the data may be in the file system cache but not on disk. Other
applications may wish to repeat the transaction unconditionally,
after resolving the error condition, particularly when the set of
operations in the transaction is designed to be idempotent.
public static final Transaction.State COMMITTED
local SyncPolicy
requested.
Note that a transaction may be in this state even when an exception
is thrown by the commit
method. For example, in a
replicated environment, an InsufficientAcksException
may be thrown after
the transaction is committed locally.
public static final Transaction.State MUST_ABORT
OperationFailureException
for a description
of how a transaction can become invalid. The application is
responsible for aborting the transaction.
public static final Transaction.State ABORTED
Method Detail |
---|
public static Transaction.State[] values()
for (Transaction.State c : Transaction.State.values()) System.out.println(c);
public static Transaction.State valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
Berkeley DB Java Edition version 5.0.58 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |