|
|||||||
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.
Field Summary | |
---|---|
static String |
PROPERTY_RECOVERY_FORCE_RESTART
|
static String |
PROPERTY_RECOVERY_GROUP_COMMIT
|
static String |
RECOVERY_FORCE_RESTART_ATTRIBUTE
|
static String |
RECOVERY_GROUP_COMMIT_ATTRIBUTE
|
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()
|
Lock |
getLock()
|
void |
initialize()
|
boolean |
isIdle()
|
void |
processSystemTasks()
|
void |
reindex(DBBroker broker)
|
boolean |
runRecovery(DBBroker broker)
Run a database recovery if required. |
void |
setEnabled(boolean enabled)
|
void |
shutdown(boolean checkpoint)
|
void |
triggerSystemTask(SystemTask task)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RECOVERY_GROUP_COMMIT_ATTRIBUTE
public static final String PROPERTY_RECOVERY_GROUP_COMMIT
public static final String RECOVERY_FORCE_RESTART_ATTRIBUTE
public static final String PROPERTY_RECOVERY_FORCE_RESTART
Constructor Detail |
---|
public TransactionManager(BrokerPool pool, File dataDir, boolean transactionsEnabled) throws EXistException
dataDir
-
EXistException
Method Detail |
---|
public void initialize() throws EXistException, ReadOnlyException
EXistException
ReadOnlyException
public void setEnabled(boolean enabled)
public boolean isIdle()
public boolean runRecovery(DBBroker broker) throws EXistException
BrokerPool
.
broker
-
EXistException
public Txn beginTransaction()
public void commit(Txn txn) throws TransactionException
txn
-
TransactionException
public void abort(Txn txn)
public Lock getLock()
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).
TransactionException
public Journal getJournal()
public void reindex(DBBroker broker)
public void shutdown(boolean checkpoint)
public void triggerSystemTask(SystemTask task)
public void processSystemTasks()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |