com.sleepycat.je.rep.stream
Class FeederSyncupReader
java.lang.Object
com.sleepycat.je.log.FileReader
com.sleepycat.je.rep.stream.VLSNReader
com.sleepycat.je.rep.stream.FeederSyncupReader
public class FeederSyncupReader
- extends VLSNReader
The FeederSyncupReader scans the log backwards for requested log entries.
It uses the vlsnIndex to optimize its search, repositioning when a concrete
vlsn->lsn mapping is available.
The FeederSyncupReader is not thread safe, and can only be used serially. It
will stop at the finishLsn, which should be set using the GlobalCBVLSN.
| Fields inherited from class com.sleepycat.je.log.FileReader |
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window |
| Methods inherited from class com.sleepycat.je.log.FileReader |
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntry, readNextEntryAllowExceptions, resyncReader, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeederSyncupReader
public FeederSyncupReader(EnvironmentImpl envImpl,
VLSNIndex vlsnIndex,
long endOfLogLsn,
int readBufferSize,
NameIdPair nameIdPair,
VLSN startVLSN,
long finishLsn)
throws IOException,
DatabaseException
- Throws:
IOException
DatabaseException
scanBackwards
public OutputWireRecord scanBackwards(VLSN vlsn)
throws FileNotFoundException,
ChecksumException
- Backward scanning for records for the feeder's part in syncup.
- Throws:
ChecksumException
FileNotFoundException
isTargetEntry
protected boolean isTargetEntry()
throws DatabaseException
- Overrides:
isTargetEntry in class FileReader
- Returns:
- true if this reader should process this entry, or just
skip over it.
- Throws:
DatabaseException - from subclasses.
processEntry
protected boolean processEntry(ByteBuffer entryBuffer)
- Instantiate a WireRecord to house this log entry.
- Overrides:
processEntry in class VLSNReader
- Parameters:
entryBuffer - contains the entry data and is positioned at the
data
- Returns:
- true if this entry should be returned
Copyright (c) 2004-2010 Oracle. All rights reserved.