TransactionState (enum)

Represents the state of the current transaction.

Obtainable from TransactionService#currentTransactionState() .

API

TransactionState.java
enum TransactionState {
  NONE     (1)
  IN_PROGRESS     (2)
  MUST_ABORT     (3)
  COMMITTED     (4)
  ABORTED     (5)
  boolean canFlush()     (6)
  boolean canCommit()     (7)
  boolean canAbort()     (8)
  boolean isComplete()     (9)
  boolean isInProgress()     (10)
  boolean mustAbort()     (11)
}
1 NONE

No transaction exists.

2 IN_PROGRESS

Started, still in progress.

3 MUST_ABORT

Started, but has hit an exception.

4 COMMITTED

Completed, having successfully committed.

5 ABORTED

Completed, having aborted.

6 canFlush()

Whether it is valid to flush the transaction (specifically if the transaction is #IN_PROGRESS in progress .

7 canCommit()

Whether it is valid to commit the transaction (specifically if the transaction is #IN_PROGRESS in progress .

8 canAbort()

Whether it is valid to mark as aborted this transaction.

9 isComplete()

Whether the transaction is complete (that is, is either #COMMITTED committed or #ABORTED aborted ), and so a new transaction can be started.

10 isInProgress()

Whether the transaction is #IN_PROGRESS in progress .

11 mustAbort()

Whether the transaction #MUST_ABORT must abort .

Members

NONE

No transaction exists.

IN_PROGRESS

Started, still in progress.

May flush, commit or abort.

MUST_ABORT

Started, but has hit an exception.

May not flush or commit (will throw an IllegalStateException ), can only abort.

COMMITTED

Completed, having successfully committed.

May not flush or abort or commit (will throw IllegalStateException ).

ABORTED

Completed, having aborted.

May not flush, commit or abort (will throw IllegalStateException ).

canFlush()

Whether it is valid to flush the transaction (specifically if the transaction is #IN_PROGRESS in progress .

canCommit()

Whether it is valid to commit the transaction (specifically if the transaction is #IN_PROGRESS in progress .

canAbort()

Whether it is valid to mark as aborted this transaction.

This is the case if the transaction is either currently #IN_PROGRESS in progress or has already been marked as #MUST_ABORT must abort .

isComplete()

Whether the transaction is complete (that is, is either #COMMITTED committed or #ABORTED aborted ), and so a new transaction can be started.

isInProgress()

Whether the transaction is #IN_PROGRESS in progress .

mustAbort()

Whether the transaction #MUST_ABORT must abort .