public class TransactionLogCursor extends Object
TransactionLogRecord objects from a log file.| Constructor and Description |
|---|
TransactionLogCursor(File file)
Create a TransactionLogCursor that will read from the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the cursor and the underlying file
|
TransactionLogRecord |
readLog()
Fetch the next TransactionLogRecord from log, recalculating the CRC and checking it against the stored one.
|
TransactionLogRecord |
readLog(boolean skipCrcCheck)
Fetch the next TransactionLogRecord from log.
|
public TransactionLogCursor(File file) throws IOException
file - the file to read logs fromIOException - if an I/O error occurs.public TransactionLogRecord readLog() throws IOException
IOException - if an I/O error occurs.public TransactionLogRecord readLog(boolean skipCrcCheck) throws IOException
skipCrcCheck - if set to false, the method will thow an InvalidChecksumException if the CRC on disk does
not match the recalculated one. Otherwise, the CRC is not recalculated nor checked agains the stored one.IOException - if an I/O error occurs.public void close()
throws IOException
IOException - if an I/O error occurs.Copyright © 2006-2016 Bitronix Software. All Rights Reserved.