public final class TransactionManager extends Object
RecordFile
. The transaction log is either clean, or
in progress. In the latter case, the transaction manager
takes care of a roll forward.
Implementation note: this is a proof-of-concept implementation which hasn't been optimized for speed. For instance, all sorts of streams are created for every transaction.
Modifier and Type | Class and Description |
---|---|
static class |
TransactionManager.BlockIoComparator
INNER CLASS.
|
Modifier and Type | Method and Description |
---|---|
void |
setMaximumTransactionsInLog(int maxTxns)
Set the maximum number of transactions to record in
the log (and keep in memory) before the log is
synchronized with the main database file.
|
void |
synchronizeLog()
Synchronize log file data with the main database file.
|
public void synchronizeLog() throws IOException
After this call, the main database file is guaranteed to be consistent and guaranteed to be the only file needed for backup purposes.
IOException
public void setMaximumTransactionsInLog(int maxTxns) throws IOException
This method must be called while there are no pending transactions in the log.
IOException
Copyright © 2016. All rights reserved.