|Enum Constant and Description|
The transaction has been aborted.
The transaction has been committed and is locally durable according to the
The transaction has been invalidated by an exception and cannot be committed.
The transaction has not been committed or aborted, and can be used for performing operations.
An exception was thrown by the
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final Transaction.State OPEN
public static final Transaction.State POSSIBLY_COMMITTED
commitmethod 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
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.
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
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
OperationFailureExceptionfor a description of how a transaction can become invalid. The application is responsible for aborting the transaction.
public static final Transaction.State ABORTED
public static Transaction.State values()
for (Transaction.State c : Transaction.State.values()) System.out.println(c);
public static Transaction.State valueOf(String name)
Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.