接口 TransactionExecution
- 所有已知子接口:
ReactiveTransaction
,TransactionStatus
- 所有已知实现类:
AbstractTransactionStatus
,DefaultTransactionStatus
,GenericReactiveTransaction
,SimpleTransactionStatus
public interface TransactionExecution
Common representation of the current state of a transaction. Serves as base interface forTransactionStatus
as well asReactiveTransaction
.- 从以下版本开始:
- 5.2
- 作者:
- Juergen Hoeller
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 boolean
isCompleted()
Return whether this transaction is completed, that is, whether it has already been committed or rolled back.boolean
isNewTransaction()
Return whether the present transaction is new; otherwise participating in an existing transaction, or potentially not running in an actual transaction in the first place.boolean
isRollbackOnly()
Return whether the transaction has been marked as rollback-only (either by the application or by the transaction infrastructure).void
setRollbackOnly()
Set the transaction rollback-only.
方法详细资料
isNewTransaction
boolean isNewTransaction()
Return whether the present transaction is new; otherwise participating in an existing transaction, or potentially not running in an actual transaction in the first place.
setRollbackOnly
void setRollbackOnly()
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.
isRollbackOnly
boolean isRollbackOnly()
Return whether the transaction has been marked as rollback-only (either by the application or by the transaction infrastructure).
isCompleted
boolean isCompleted()
Return whether this transaction is completed, that is, whether it has already been committed or rolled back.