org.mapdb
Class TxMaker

java.lang.Object
  extended by org.mapdb.TxMaker

public class TxMaker
extends Object

Transaction factory

Author:
Jan Kotek

Field Summary
protected static Object DELETED
          marker for deleted records
protected  Engine engine
          parent engine under which modifications are stored
 
Constructor Summary
TxMaker(Engine engine)
           
TxMaker(Engine engine, boolean strictDBGet, boolean txSnapshotsEnabled)
           
 
Method Summary
 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.
 DB makeTx()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELETED

protected static final Object DELETED
marker for deleted records


engine

protected Engine engine
parent engine under which modifications are stored

Constructor Detail

TxMaker

public TxMaker(Engine engine)

TxMaker

public TxMaker(Engine engine,
               boolean strictDBGet,
               boolean txSnapshotsEnabled)
Method Detail

makeTx

public DB makeTx()

close

public void close()

execute

public void execute(TxBlock txBlock)
Executes given block withing single transaction. If block throws TxRollbackException execution 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 throws TxRollbackException execution is repeated until it does not fail. This method returns result returned by txBlock.

Parameters:
txBlock -


Copyright © 2014. All Rights Reserved.