org.neo4j.kernel
Class TopLevelTransaction

java.lang.Object
  extended by org.neo4j.kernel.TopLevelTransaction
All Implemented Interfaces:
Transaction

public class TopLevelTransaction
extends Object
implements Transaction


Constructor Summary
TopLevelTransaction(TransactionManager transactionManager)
           
 
Method Summary
 void failure()
          Marks this transaction as failed, which means that it will unconditionally be rolled back when Transaction.finish() is called.
 void finish()
          Commits or marks this transaction for rollback, depending on whether Transaction.success() or Transaction.failure() has been previously invoked.
protected  TransactionManager getTransactionManager()
           
protected  boolean isMarkedAsSuccessful()
           
 void success()
          Marks this transaction as successful, which means that it will be commited upon invocation of Transaction.finish() unless Transaction.failure() has or will be invoked before then.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopLevelTransaction

public TopLevelTransaction(TransactionManager transactionManager)
Method Detail

failure

public void failure()
Description copied from interface: Transaction
Marks this transaction as failed, which means that it will unconditionally be rolled back when Transaction.finish() is called. Once this method has been invoked, it doesn't matter how many times Transaction.success() is invoked -- the transaction will still be rolled back.

Specified by:
failure in interface Transaction

success

public void success()
Description copied from interface: Transaction
Marks this transaction as successful, which means that it will be commited upon invocation of Transaction.finish() unless Transaction.failure() has or will be invoked before then.

Specified by:
success in interface Transaction

isMarkedAsSuccessful

protected boolean isMarkedAsSuccessful()

getTransactionManager

protected TransactionManager getTransactionManager()

finish

public void finish()
Description copied from interface: Transaction
Commits or marks this transaction for rollback, depending on whether Transaction.success() or Transaction.failure() has been previously invoked.

Specified by:
finish in interface Transaction


Copyright © 2011 The Neo4j Graph Database Project. All Rights Reserved.