public class TxMaker extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected Engine |
engine
parent engine under which modifications are stored
|
protected ScheduledExecutorService |
executor |
protected Fun.Function1<Class,String> |
serializerClassLoader |
| Constructor and Description |
|---|
TxMaker(Engine engine) |
TxMaker(Engine engine,
boolean strictDBGet,
ScheduledExecutorService executor,
Fun.Function1<Class,String> serializerClassLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
<A> A |
execute(Fun.Function1<A,DB> txBlock)
Executes given block withing single transaction.
|
void |
execute(TxBlock txBlock)
Executes given block withing single transaction.
|
Engine |
getGlobalEngine() |
DB |
makeTx() |
protected ScheduledExecutorService executor
protected Engine engine
protected final Fun.Function1<Class,String> serializerClassLoader
public TxMaker(Engine engine)
public TxMaker(Engine engine, boolean strictDBGet, ScheduledExecutorService executor, Fun.Function1<Class,String> serializerClassLoader)
public Engine getGlobalEngine()
public DB makeTx()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic void execute(TxBlock txBlock)
TxRollbackException execution is repeated until it does not fail.txBlock - public <A> A execute(Fun.Function1<A,DB> txBlock)
TxRollbackException execution is repeated until it does not fail.
This method returns result returned by txBlock.txBlock - Copyright © 2015. All Rights Reserved.