public class LastFileReader extends FileReader
FileReader.EOFException, FileReader.ReadWindowcksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window| Constructor and Description |
|---|
LastFileReader(EnvironmentImpl envImpl,
int readBufferSize)
This file reader is always positioned at the last file.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getEndOfLog() |
LogEntryType |
getEntryType() |
long |
getLastSeen(LogEntryType type) |
long |
getLastValidLsn() |
long |
getPrevOffset() |
RestoreRequired |
getRestoreRequired() |
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.
|
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getLastVlsn, getLogVersion, getNRepeatIteratorReads, getNumRead, handleGapInBackwardsScan, initStartingPosition, isTargetEntry, makeWindow, readNextEntryAllowExceptions, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, skipData, skipEntrypublic LastFileReader(EnvironmentImpl envImpl, int readBufferSize) throws DatabaseException
DatabaseException - if the last file contains data and is invalid.public void setEndOfFile()
throws IOException,
DatabaseException
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(ByteBuffer entryBuffer)
processEntry in class FileReaderentryBuffer - A ByteBuffer that the logrec data and is positioned
at the start of the logrec body (i.e., just after the logrec header).public boolean readNextEntry()
readNextEntry in class FileReaderpublic RestoreRequired getRestoreRequired()
Copyright © 2024. All rights reserved.