public class TransactionManager extends java.lang.Object implements ITransactionManager
Constructor and Description |
---|
TransactionManager()
Default constructor
|
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
|
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.
|
public void clear()
clear
in interface ITransactionManager
public void add(lombok.Actions.Action0 action)
add
in interface ITransactionManager
public void add(lombok.Actions.Action0 action, lombok.Actions.Action0 rollbackAction)
add
in interface ITransactionManager
public void commit()
commit
in interface ITransactionManager
public void rollback()
rollback
in interface ITransactionManager
public void commitWithRollback() throws java.lang.Throwable
commitWithRollback
in interface ITransactionManager
java.lang.Throwable
public void skipCommitStep()
skipCommitStep
in interface ITransactionManager
public void skipRollbackStep()
skipRollbackStep
in interface ITransactionManager
public void resumeCommit()
resumeCommit
in interface ITransactionManager
public void resumeRollback()
resumeRollback
in interface ITransactionManager
public java.util.List<lombok.Actions.Action0> getActions()
getActions
in interface ITransactionManager
public java.util.List<lombok.Actions.Action0> getRollbackActions()
getRollbackActions
in interface ITransactionManager
public int getExecutionIndex()
getExecutionIndex
in interface ITransactionManager