public class LastFileReader extends FileReader
anticipateChecksumErrors, cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, nextEntryOffset, readBufferFileEnd, readBufferFileNum, readBufferFileStart, startLsn| Constructor and Description |
|---|
LastFileReader(EnvironmentImpl env,
int readBufferSize)
This file reader is always positioned at the last file.
|
LastFileReader(EnvironmentImpl env,
int readBufferSize,
java.lang.Long specificFileNumber)
Ctor which allows passing in the file number we want to read to the end
of.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getEndOfLog() |
LogEntryType |
getEntryType() |
long |
getLastSeen(LogEntryType type) |
long |
getLastValidLsn() |
long |
getPrevOffset() |
protected void |
initStartingPosition(long endOfFileLsn,
java.lang.Long singleFileNum)
Override so that we always start at the last file.
|
protected boolean |
processEntry(java.nio.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.
|
getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, isTargetEntry, resyncReader, setAlwaysValidateChecksum, threadSafeBufferPosition, threadSafeBufferPositionpublic LastFileReader(EnvironmentImpl env, int readBufferSize) throws java.io.IOException, DatabaseException
java.io.IOExceptionDatabaseExceptionpublic LastFileReader(EnvironmentImpl env, int readBufferSize, java.lang.Long specificFileNumber) throws java.io.IOException, DatabaseException
java.io.IOExceptionDatabaseExceptionprotected void initStartingPosition(long endOfFileLsn,
java.lang.Long singleFileNum)
throws java.io.IOException,
DatabaseException
initStartingPosition in class FileReaderjava.io.IOExceptionDatabaseExceptionpublic void setEndOfFile()
throws java.io.IOException,
DatabaseException
java.io.IOExceptionDatabaseExceptionpublic long getEndOfLog()
public long getLastValidLsn()
public long getPrevOffset()
public LogEntryType getEntryType()
public void setTargetType(LogEntryType type)
public long getLastSeen(LogEntryType type)
protected boolean processEntry(java.nio.ByteBuffer entryBuffer)
processEntry in class FileReaderpublic boolean readNextEntry()
throws DatabaseException,
java.io.IOException
readNextEntry in class FileReaderDatabaseExceptionjava.io.IOExceptionCopyright (c) 2004,2008 Oracle. All rights reserved.