|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.log.FileReader
com.sleepycat.je.log.LastFileReader
public class LastFileReader
LastFileReader traverses the last log file, doing checksums and looking for the end of the log. Different log types can be registered with it and it will remember the last occurrence of targetted entry types.
Field Summary |
---|
Fields inherited from class com.sleepycat.je.log.FileReader |
---|
anticipateChecksumErrors, cksumValidator, currentEntryChecksum, currentEntryOffset, currentEntryPrevOffset, currentEntrySize, currentEntryTypeNum, currentEntryTypeVersion, env, eof, fileManager, nextEntryOffset, readBufferFileEnd, readBufferFileNum, readBufferFileStart, startLsn |
Constructor Summary | |
---|---|
LastFileReader(EnvironmentImpl env,
int readBufferSize)
This file reader is always positioned at the last file. |
|
LastFileReader(EnvironmentImpl env,
int readBufferSize,
Long specificFileNumber)
Ctor which allows passing in the file number we want to read to the end of. |
Method Summary | |
---|---|
long |
getEndOfLog()
|
LogEntryType |
getEntryType()
|
long |
getLastSeen(LogEntryType type)
|
long |
getLastValidLsn()
|
long |
getPrevOffset()
|
protected void |
initStartingPosition(long endOfFileLsn,
Long singleFileNum)
Override so that we always start at the last file. |
protected boolean |
processEntry(ByteBuffer entryBuffer)
Validate the checksum on each entry, see if we should remember the LSN of this entry. |
boolean |
readNextEntry()
readNextEntry will stop at a bad entry. |
void |
setEndOfFile()
|
void |
setTargetType(LogEntryType type)
Tell the reader that we are interested in these kind of entries. |
Methods inherited from class com.sleepycat.je.log.FileReader |
---|
getLastLsn, getNRepeatIteratorReads, getNumRead, isTargetEntry, resyncReader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LastFileReader(EnvironmentImpl env, int readBufferSize) throws IOException, DatabaseException
IOException
DatabaseException
public LastFileReader(EnvironmentImpl env, int readBufferSize, Long specificFileNumber) throws IOException, DatabaseException
IOException
DatabaseException
Method Detail |
---|
protected void initStartingPosition(long endOfFileLsn, Long singleFileNum) throws IOException, DatabaseException
initStartingPosition
in class FileReader
IOException
DatabaseException
public void setEndOfFile() throws IOException, DatabaseException
IOException
DatabaseException
public long getEndOfLog()
public long getLastValidLsn()
public long getPrevOffset()
public LogEntryType getEntryType()
public void setTargetType(LogEntryType type)
public long getLastSeen(LogEntryType type)
protected boolean processEntry(ByteBuffer entryBuffer)
processEntry
in class FileReader
public boolean readNextEntry() throws DatabaseException, IOException
readNextEntry
in class FileReader
DatabaseException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |