org.springframework.transaction.TransactionStatus interface.
Pre-implements the handling of local rollback-only and completed flags, and
delegation to an underlying org..
Also offers the option of a holding a savepoint within the transaction.
Does not assume any specific internal transaction handling, such as an underlying transaction object, and no transaction synchronization mechanism.
setRollbackOnly(), isRollbackOnly(), setCompleted(), isCompleted(), getSavepointManager(), SimpleTransactionStatus, DefaultTransactionStatus
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private Object |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Object | createSavepoint()
Implements org. This implementation delegates to a SavepointManager for the underlying transaction, if possible. |
| protected Object | |
| protected SavepointManager | |
| public boolean | hasSavepoint()
Overrides default org. Return whether this transaction internally carries a savepoint, that is, has been created as nested transaction based on a savepoint. |
| public boolean | isCompleted()
Overrides default org. Return whether this transaction is completed, that is, whether it has already been committed or rolled back. |
| public boolean | isGlobalRollbackOnly()
Template method for determining the global rollback-only flag of the underlying transaction, if any. |
| public boolean | |
| public boolean | isRollbackOnly()
Overrides default org. Determine the rollback-only flag via checking both the local rollback-only flag of this TransactionStatus and the global rollback-only flag of the underlying transaction, if any. |
| public void | |
| public void | releaseSavepoint(Object
the savepoint to release savepoint)Implements org. This implementation delegates to a SavepointManager for the underlying transaction, if possible. |
| public void | rollbackToHeldSavepoint()
Roll back to the savepoint that is held for the transaction and release the savepoint right afterwards. |
| public void | rollbackToSavepoint(Object
the savepoint to roll back to savepoint)Implements org. This implementation delegates to a SavepointManager for the underlying transaction, if possible. |
| public void | |
| public void | setRollbackOnly()
Overrides default org. Set the transaction rollback-only. |
| protected void |
| completed | back to summary |
|---|---|
| private boolean completed | |
| rollbackOnly | back to summary |
|---|---|
| private boolean rollbackOnly | |
| savepoint | back to summary |
|---|---|
| private Object savepoint
| |
| AbstractTransactionStatus | back to summary |
|---|---|
| public AbstractTransactionStatus() | |
| createAndHoldSavepoint | back to summary |
|---|---|
| public void createAndHoldSavepoint() throws TransactionException Create a savepoint and hold it for the transaction.
| |
| createSavepoint | back to summary |
|---|---|
| public Object createSavepoint() throws TransactionException Implements org. This implementation delegates to a SavepointManager for the underlying transaction, if possible.
| |
| getSavepoint | back to summary |
|---|---|
| protected Object getSavepoint() Get the savepoint for this transaction, if any.
| |
| getSavepointManager | back to summary |
|---|---|
| protected SavepointManager getSavepointManager() Return a SavepointManager for the underlying transaction, if possible. Default implementation always throws a NestedTransactionNotSupportedException.
| |
| hasSavepoint | back to summary |
|---|---|
| public boolean hasSavepoint() Overrides default org. Doc from org. Return whether this transaction internally carries a savepoint, that is, has been created as nested transaction based on a savepoint. This method is mainly here for diagnostic purposes, alongside
The default implementation returns
| |
| isCompleted | back to summary |
|---|---|
| public boolean isCompleted() Overrides default org. Doc from org. Return whether this transaction is completed, that is, whether it has already been committed or rolled back. The default implementation returns
| |
| isGlobalRollbackOnly | back to summary |
|---|---|
| public boolean isGlobalRollbackOnly() Template method for determining the global rollback-only flag of the underlying transaction, if any. This implementation always returns | |
| isLocalRollbackOnly | back to summary |
|---|---|
| public boolean isLocalRollbackOnly() Determine the rollback-only flag via checking this TransactionStatus. Will only return "true" if the application called | |
| isRollbackOnly | back to summary |
|---|---|
| public boolean isRollbackOnly() Overrides default org. Determine the rollback-only flag via checking both the local rollback-only flag of this TransactionStatus and the global rollback-only flag of the underlying transaction, if any.
| |
| releaseHeldSavepoint | back to summary |
|---|---|
| public void releaseHeldSavepoint() throws TransactionException Release the savepoint that is held for the transaction. | |
| releaseSavepoint | back to summary |
|---|---|
| public void releaseSavepoint(Object savepoint) throws TransactionException Implements org. This implementation delegates to a SavepointManager for the underlying transaction, if possible.
| |
| rollbackToHeldSavepoint | back to summary |
|---|---|
| public void rollbackToHeldSavepoint() throws TransactionException Roll back to the savepoint that is held for the transaction and release the savepoint right afterwards. | |
| rollbackToSavepoint | back to summary |
|---|---|
| public void rollbackToSavepoint(Object savepoint) throws TransactionException Implements org. This implementation delegates to a SavepointManager for the underlying transaction, if possible.
| |
| setCompleted | back to summary |
|---|---|
| public void setCompleted() Mark this transaction as completed, that is, committed or rolled back. | |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() Overrides default org. Doc from org. Set the transaction rollback-only. This instructs the transaction manager that the only possible outcome of the transaction may be a rollback, as alternative to throwing an exception which would in turn trigger a rollback. The default implementation throws an UnsupportedOperationException.
| |
| setSavepoint | back to summary |
|---|---|
| protected void setSavepoint(Object savepoint) Set a savepoint for this transaction. Useful for PROPAGATION_NESTED. | |