org.neo4j.kernel.impl.transaction
Class TxManager

java.lang.Object
  extended by org.neo4j.kernel.impl.transaction.AbstractTransactionManager
      extended by org.neo4j.kernel.impl.transaction.TxManager
All Implemented Interfaces:
TransactionManager

public class TxManager
extends AbstractTransactionManager

Public for testing purpose only. Use TransactionFactory to get a UserTransaction, don't use this class.


Method Summary
 void attemptWaitForTxCompletionAndBlockFutureTransactions(long maxWaitTimeMillis)
          Prevents new transactions from being created by throwing exception in beginTx and waits for all existing transactions to complete.
 void begin()
           
 void commit()
           
 void dumpTransactions()
           
 int getActiveTxCount()
           
 int getCommittedTxCount()
           
 int getEventIdentifier()
           
 int getPeakConcurrentTxCount()
           
 int getRolledbackTxCount()
           
 int getStartedTxCount()
           
 int getStatus()
           
 Transaction getTransaction()
           
 void init(XaDataSourceManager xaDsManagerToUse)
          Begins the transaction manager, possibly triggering a recovery.
 void resume(Transaction tx)
           
 void rollback()
           
 void setRollbackOnly()
           
 void setTransactionTimeout(int seconds)
           
 void stop()
          Stops the transaction manager, performing all implementation specific cleanup.
 Transaction suspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

stop

public void stop()
Description copied from class: AbstractTransactionManager
Stops the transaction manager, performing all implementation specific cleanup.

Specified by:
stop in class AbstractTransactionManager

init

public void init(XaDataSourceManager xaDsManagerToUse)
Description copied from class: AbstractTransactionManager
Begins the transaction manager, possibly triggering a recovery. The passed xaDsManager, given the startup sequence of the neo kernel, is assured to already have registered all xa resource adapters available for this run, so they can be used for registration for recovery purposes.

Specified by:
init in class AbstractTransactionManager
Parameters:
xaDsManagerToUse - The XaDataSourceManager that has registered the Xa resources.

attemptWaitForTxCompletionAndBlockFutureTransactions

public void attemptWaitForTxCompletionAndBlockFutureTransactions(long maxWaitTimeMillis)
Description copied from class: AbstractTransactionManager
Prevents new transactions from being created by throwing exception in beginTx and waits for all existing transactions to complete. When this method returns there are no transactions active and no new transactions can be started.

Overrides:
attemptWaitForTxCompletionAndBlockFutureTransactions in class AbstractTransactionManager

begin

public void begin()
           throws NotSupportedException,
                  SystemException
Throws:
NotSupportedException
SystemException

commit

public void commit()
            throws RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   IllegalStateException,
                   SystemException
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
IllegalStateException
SystemException

rollback

public void rollback()
              throws IllegalStateException,
                     SystemException
Throws:
IllegalStateException
SystemException

getStatus

public int getStatus()

getTransaction

public Transaction getTransaction()

resume

public void resume(Transaction tx)
            throws IllegalStateException,
                   SystemException
Throws:
IllegalStateException
SystemException

suspend

public Transaction suspend()
                    throws SystemException
Throws:
SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws IllegalStateException,
                            SystemException
Throws:
IllegalStateException
SystemException

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws SystemException
Throws:
SystemException

dumpTransactions

public void dumpTransactions()

getEventIdentifier

public int getEventIdentifier()

getStartedTxCount

public int getStartedTxCount()

getCommittedTxCount

public int getCommittedTxCount()

getRolledbackTxCount

public int getRolledbackTxCount()

getActiveTxCount

public int getActiveTxCount()

getPeakConcurrentTxCount

public int getPeakConcurrentTxCount()


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.