|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.storage.journal.JournalReader
public class JournalReader
Read log entries from the journal file. This class is used during recovery to scan the last journal file. It uses a memory-mapped byte buffer on the file. Journal entries can be read forward (during redo) or backward (during undo).
| Constructor Summary | |
|---|---|
JournalReader(DBBroker broker,
File file,
int fileNumber)
Opens the specified file for reading. |
|
| Method Summary | |
|---|---|
void |
close()
|
Loggable |
lastEntry()
|
Loggable |
nextEntry()
Returns the next entry found from the current position. |
void |
position(long lsn)
Re-position the file position so it points to the start of the entry with the given LSN. |
Loggable |
previousEntry()
Returns the previous entry found by scanning backwards from the current position. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JournalReader(DBBroker broker,
File file,
int fileNumber)
throws LogException
broker - file - fileNumber -
LogException| Method Detail |
|---|
public Loggable nextEntry()
throws LogException
LogException - if an entry could not be read due to an inconsistency on disk.
public Loggable previousEntry()
throws LogException
LogException - if an entry could not be read due to an inconsistency on disk.
LogException
public Loggable lastEntry()
throws LogException
LogException
public void position(long lsn)
throws LogException
lsn -
LogExceptionpublic void close()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||