Enum TransactionStatus
- java.lang.Object
-
- java.lang.Enum<TransactionStatus>
-
- net.sf.jkniv.whinstone.transaction.TransactionStatus
-
- All Implemented Interfaces:
Serializable,Comparable<TransactionStatus>
public enum TransactionStatus extends Enum<TransactionStatus>
The Status interface defines static variables used for transaction status codes.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVEA transaction is associated with the target object and it is in the active state.COMMITTEDA transaction is associated with the target object and it has been committed.COMMITTINGA transaction is associated with the target object and it is in the process of committing.MARKED_ROLLBACKA transaction is associated with the target object and it has been marked for rollback, perhaps as a result of a setRollbackOnly operation.NO_TRANSACTIONNo transaction is currently associated with the target object.PREPAREDA transaction is associated with the target object and it has been prepared.PREPARINGA transaction is associated with the target object and it is in the process of preparing.ROLLEDBACKA transaction is associated with the target object and the outcome has been determined to be rollback.ROLLING_BACKA transaction is associated with the target object and it is in the process of rolling back.UNKNOWNA transaction is associated with the target object but its current status cannot be determined.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intvalue()The javax.transaction.Status constant code.static TransactionStatusvalueOf(String name)Returns the enum constant of this type with the specified name.static TransactionStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ACTIVE
public static final TransactionStatus ACTIVE
A transaction is associated with the target object and it is in the active state. An implementation returns this status after a transaction has been started and prior to a Coordinator issuing any prepares, unless the transaction has been marked for rollback.
-
MARKED_ROLLBACK
public static final TransactionStatus MARKED_ROLLBACK
A transaction is associated with the target object and it has been marked for rollback, perhaps as a result of a setRollbackOnly operation.
-
PREPARED
public static final TransactionStatus PREPARED
A transaction is associated with the target object and it has been prepared. That is, all subordinates have agreed to commit. The target object may be waiting for instructions from a superior as to how to proceed.
-
COMMITTED
public static final TransactionStatus COMMITTED
A transaction is associated with the target object and it has been committed. It is likely that heuristics exist; otherwise, the transaction would have been destroyed and NoTransaction returned.
-
ROLLEDBACK
public static final TransactionStatus ROLLEDBACK
A transaction is associated with the target object and the outcome has been determined to be rollback. It is likely that heuristics exist; otherwise, the transaction would have been destroyed and NoTransaction returned.
-
UNKNOWN
public static final TransactionStatus UNKNOWN
A transaction is associated with the target object but its current status cannot be determined. This is a transient condition and a subsequent invocation will ultimately return a different status.
-
NO_TRANSACTION
public static final TransactionStatus NO_TRANSACTION
No transaction is currently associated with the target object. This will occur after a transaction has completed.
-
PREPARING
public static final TransactionStatus PREPARING
A transaction is associated with the target object and it is in the process of preparing. An implementation returns this status if it has started preparing, but has not yet completed the process. The likely reason for this is that the implementation is probably waiting for responses to prepare from one or more Resources.
-
COMMITTING
public static final TransactionStatus COMMITTING
A transaction is associated with the target object and it is in the process of committing. An implementation returns this status if it has decided to commit but has not yet completed the committing process. This occurs because the implementation is probably waiting for responses from one or more Resources.
-
ROLLING_BACK
public static final TransactionStatus ROLLING_BACK
A transaction is associated with the target object and it is in the process of rolling back. An implementation returns this status if it has decided to rollback but has not yet completed the process. The implementation is probably waiting for responses from one or more Resources.
-
-
Method Detail
-
values
public static TransactionStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TransactionStatus c : TransactionStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransactionStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
value
public abstract int value()
The javax.transaction.Status constant code.- Returns:
- Return the javax.transaction.Status code.
-
-