org.mapdb
Class TxMaker
- java.lang.Object
-
- org.mapdb.TxMaker
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable
public class TxMaker extends java.lang.Object implements java.io.CloseableTransaction factory
-
-
Constructor Summary
Constructors Constructor and Description TxMaker(Engine engine)TxMaker(Engine engine, boolean strictDBGet, java.util.concurrent.ScheduledExecutorService executor, Fun.Function1<java.lang.Class,java.lang.String> serializerClassLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()<A> Aexecute(Fun.Function1<A,DB> txBlock)Executes given block withing single transaction.voidexecute(TxBlock txBlock)Executes given block withing single transaction.DBmakeTx()
-
-
-
Constructor Detail
-
TxMaker
public TxMaker(Engine engine)
-
TxMaker
public TxMaker(Engine engine, boolean strictDBGet, java.util.concurrent.ScheduledExecutorService executor, Fun.Function1<java.lang.Class,java.lang.String> serializerClassLoader)
-
-
Method Detail
-
makeTx
public DB makeTx()
-
close
public void close()
- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable
-
execute
public void execute(TxBlock txBlock)
Executes given block withing single transaction. If block throwsTxRollbackExceptionexecution is repeated until it does not fail.- Parameters:
txBlock-
-
execute
public <A> A execute(Fun.Function1<A,DB> txBlock)
Executes given block withing single transaction. If block throwsTxRollbackExceptionexecution is repeated until it does not fail. This method returns result returned by txBlock.- Parameters:
txBlock-
-
-
DataMelt 3.0 © DataMelt by jWork.ORG