org.infinispan.loaders.bdbje
Class PreparableTransactionRunner

java.lang.Object
  extended by com.sleepycat.collections.TransactionRunner
      extended by org.infinispan.loaders.bdbje.PreparableTransactionRunner

public class PreparableTransactionRunner
extends com.sleepycat.collections.TransactionRunner

Adapted version of TransactionRunner, which allows us to prepare a transaction without committing it.

The transaction prepared is accessible via CurrentTransaction.getTransaction()

Since:
4.0
Author:
Adrian Cole

Field Summary
 
Fields inherited from class com.sleepycat.collections.TransactionRunner
DEFAULT_MAX_RETRIES
 
Constructor Summary
PreparableTransactionRunner(com.sleepycat.je.Environment env)
          Delegates to the superclass and caches a current reference to CurrentTransaction.
PreparableTransactionRunner(com.sleepycat.je.Environment env, int maxRetries, com.sleepycat.je.TransactionConfig config)
          Delegates to the superclass and caches a current reference to CurrentTransaction.
 
Method Summary
 void prepare(com.sleepycat.collections.TransactionWorker worker)
          Same behaviour as run, except that the transaction is not committed on success.
 
Methods inherited from class com.sleepycat.collections.TransactionRunner
getAllowNestedTransactions, getMaxRetries, getTransactionConfig, handleException, run, setAllowNestedTransactions, setMaxRetries, setTransactionConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreparableTransactionRunner

public PreparableTransactionRunner(com.sleepycat.je.Environment env,
                                   int maxRetries,
                                   com.sleepycat.je.TransactionConfig config)
Delegates to the superclass and caches a current reference to CurrentTransaction.

See Also:
TransactionRunner.TransactionRunner(com.sleepycat.je.Environment, int, com.sleepycat.je.TransactionConfig)

PreparableTransactionRunner

public PreparableTransactionRunner(com.sleepycat.je.Environment env)
Delegates to the superclass and caches a current reference to CurrentTransaction.

See Also:
TransactionRunner.TransactionRunner(com.sleepycat.je.Environment)
Method Detail

prepare

public void prepare(com.sleepycat.collections.TransactionWorker worker)
             throws Exception
Same behaviour as run, except that the transaction is not committed on success.

Throws:
Exception
See Also:
TransactionRunner.run(com.sleepycat.collections.TransactionWorker)

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.