|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.storage.txn.TransactionManager
public class TransactionManager
This is the central entry point to the transaction management service.
There's only one TransactionManager per database instance that can be
retrieved via BrokerPool.getTransactionManager(). TransactionManager
provides methods to create, commit and rollback a transaction.
| Constructor Summary | |
|---|---|
TransactionManager(BrokerPool pool,
File dataDir,
boolean transactionsEnabled)
Initialize the transaction manager using the specified data directory. |
|
| Method Summary | |
|---|---|
void |
abort(Txn txn)
|
Txn |
beginTransaction()
Create a new transaction. |
void |
checkpoint(boolean switchFiles)
Create a new checkpoint. |
void |
commit(Txn txn)
Commit a transaction. |
Journal |
getJournal()
|
void |
initialize()
|
void |
reindex(DBBroker broker)
|
boolean |
runRecovery(DBBroker broker)
Run a database recovery if required. |
void |
setEnabled(boolean enabled)
|
void |
shutdown()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransactionManager(BrokerPool pool,
File dataDir,
boolean transactionsEnabled)
throws EXistException
dataDir -
EXistException| Method Detail |
|---|
public void initialize()
throws EXistException,
ReadOnlyException
EXistException
ReadOnlyExceptionpublic void setEnabled(boolean enabled)
public boolean runRecovery(DBBroker broker)
throws EXistException
BrokerPool.
broker -
EXistExceptionpublic Txn beginTransaction()
public void commit(Txn txn)
throws TransactionException
txn -
TransactionExceptionpublic void abort(Txn txn)
public void checkpoint(boolean switchFiles)
throws TransactionException
BrokerPool within pre-defined periods. It
should not be called from somewhere else. The database needs to
be in a stable state (all transactions completed, no operations running).
TransactionExceptionpublic Journal getJournal()
public void reindex(DBBroker broker)
public void shutdown()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||