org.neo4j.kernel.impl.transaction
Class AbstractTransactionManager
java.lang.Object
org.neo4j.kernel.impl.transaction.AbstractTransactionManager
- All Implemented Interfaces:
- TransactionManager
- Direct Known Subclasses:
- TxManager
public abstract class AbstractTransactionManager
- extends Object
- implements TransactionManager
This interface extends the TransactionManager, with the rationale that it
additionally provides an init method that is used for recovery and a stop
method for shutting down. Implementations are to hold an actual
TrasactionManager and forward operations to it and additionally provide an
implementation specific way of initializing it, ensuring tx recovery and an
implementation specific way of shutting down, for resource reclamation.
- Author:
- Chris Gioran
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. |
abstract void |
init(XaDataSourceManager xaDsManager)
Begins the transaction manager, possibly triggering a recovery. |
abstract void |
stop()
Stops the transaction manager, performing all implementation specific
cleanup. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTransactionManager
public AbstractTransactionManager()
init
public abstract void init(XaDataSourceManager xaDsManager)
- 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.
- Parameters:
xaDsManager
- The XaDataSourceManager that has registered the Xa
resources.
stop
public abstract void stop()
- Stops the transaction manager, performing all implementation specific
cleanup.
attemptWaitForTxCompletionAndBlockFutureTransactions
public void attemptWaitForTxCompletionAndBlockFutureTransactions(long maxWaitTimeMillis)
- 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.
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.