public interface ITransactionManager
Modifier and Type | Method and Description |
---|---|
void |
add(lombok.Actions.Action0 action)
Adds an action without a corresponding rollback action.
|
void |
add(lombok.Actions.Action0 action,
lombok.Actions.Action0 rollbackAction)
Adds an action and the corresponding rollback action.
|
void |
clear()
Re-initializes the manager to allow for re-use
|
void |
commit()
Executes all actions, starting at the beginning.
|
void |
commitWithRollback()
Executes all actions, starting at the beginning.
|
java.util.List<lombok.Actions.Action0> |
getActions()
A list of actions, executed in a way that guarantees complete success or complete failure.
|
int |
getExecutionIndex()
The index of the action that is executing.
|
java.util.List<lombok.Actions.Action0> |
getRollbackActions()
If an action fails, the corresponding rollback actions are executed in FIFO or FILO order, as configured by the caller.
|
void |
resumeCommit()
Executes all actions, starting at the execution index until the end.
|
void |
resumeRollback()
Rolls back all actions, starting at the last failed action index until the first action.
|
void |
rollback()
Rolls back transactions from the point where they were left.
|
void |
skipCommitStep()
Skips the next commit step.
|
void |
skipRollbackStep()
Skips the next rollback step.
|
java.util.List<lombok.Actions.Action0> getActions()
java.util.List<lombok.Actions.Action0> getRollbackActions()
int getExecutionIndex()
void clear()
void add(lombok.Actions.Action0 action)
void add(lombok.Actions.Action0 action, lombok.Actions.Action0 rollbackAction)
void commit() throws java.lang.Throwable
java.lang.Throwable
- If an exception occurs during the commit stage.void rollback() throws java.lang.Throwable
java.lang.Throwable
- If an exception occurs during the commit stage.void commitWithRollback() throws java.lang.Throwable
java.lang.Throwable
void skipCommitStep()
java.lang.IllegalStateException
- When there is no other commit step to skipvoid skipRollbackStep()
java.lang.IllegalStateException
- When there is no other rollback step to skipvoid resumeCommit() throws java.lang.Throwable
java.lang.IndexOutOfBoundsException
- When the execution index is out of rangejava.lang.Throwable
- If an exception occurs during transactionsvoid resumeRollback() throws java.lang.Throwable
java.lang.IndexOutOfBoundsException
- When the execution index is out of rangejava.lang.Throwable
- If an exception occurs during rollback