BackendTransaction#
- public abstract class BackendTransaction implements Undoable#
Abstract class for backend transactions.
This class is the glue between the Transaction layer and the actual implementation of the communication with the back end.
This class also acts as a registry which stores which implementation is being used for which backend transaction interface.
- Author:
Timm Fitschen
See also:
{@linkTransaction}
Methods#
addMeasurement#
cleanUp#
- public final void cleanUp()#
execute#
- protected abstract void execute()#
execute#
- protected <K extends BackendTransaction> K execute(K t)#
Execute this BackendTransaction, using the implementation given as an argument.
The implementation’s benchmark is set to the corresponding sub-benchmark of this object’s benchmark.
- Parameters:
t – This BackendTransaction’s execute() method will be called.
- Returns:
The BackendTransaction which was passed as an argument.
executeTransaction#
- public final void executeTransaction()#
Like execute(), but with benchmarking measurement.
getImplementation#
getUndoHandler#
- protected UndoHandler getUndoHandler()#
init#
- public static void init()#
Initialize the adapters to the database backend.
Currently this is hard-coded to the MySQL-Backend but the architecture of this class is designed to make it easy in the future to choose other implementations (i.e. other back-ends)
setAccess#
setImpl#
setTransactionBenchmark#
- public void setTransactionBenchmark(TransactionBenchmark b)#
Set the benchmark object for this AbstractTransaction.
toString#
undo#
- public final void undo()#
useCache#
- boolean useCache()#