com.sleepycat.je.rep.stream
Class VLSNReader

java.lang.Object
  extended by com.sleepycat.je.log.FileReader
      extended by com.sleepycat.je.rep.stream.VLSNReader
Direct Known Subclasses:
FeederReader, FeederSyncupReader, ReplicaSyncupReader

abstract class VLSNReader
extends FileReader

The VLSNReader returns picks out replicated log entries from the log. It works in tandem with the VLSNIndex, using vlsn->lsn mappings if those are available, and otherwise scanning the log for replicated entries. A VLSNReader is not thread safe, and can only be used serially.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sleepycat.je.log.FileReader
FileReader.EOFException, FileReader.ReadWindow
 
Field Summary
(package private)  OutputWireRecord currentFeedRecord
           
(package private)  VLSN currentVLSN
           
(package private)  long nReposition
           
(package private)  long nScanned
           
(package private)  VLSNIndex vlsnIndex
           
 
Fields inherited from class com.sleepycat.je.log.FileReader
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window
 
Constructor Summary
VLSNReader(EnvironmentImpl envImpl, VLSNIndex vlsnIndex, boolean forward, long startLsn, int readBufferSize, NameIdPair nameIdPair, long finishLsn)
           
 
Method Summary
(package private)  long getNReposition()
           
(package private)  long getNScanned()
           
protected  boolean processEntry(ByteBuffer entryBuffer)
          Instantiate a WireRecord to house this log entry.
(package private)  void resetStats()
           
(package private)  void setPosition(long startLsn)
           
 
Methods inherited from class com.sleepycat.je.log.FileReader
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, isTargetEntry, makeWindow, readNextEntry, readNextEntryAllowExceptions, resyncReader, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, skipData, skipEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vlsnIndex

final VLSNIndex vlsnIndex

currentVLSN

VLSN currentVLSN

currentFeedRecord

OutputWireRecord currentFeedRecord

nScanned

long nScanned

nReposition

long nReposition
Constructor Detail

VLSNReader

VLSNReader(EnvironmentImpl envImpl,
           VLSNIndex vlsnIndex,
           boolean forward,
           long startLsn,
           int readBufferSize,
           NameIdPair nameIdPair,
           long finishLsn)
     throws DatabaseException
Throws:
DatabaseException
Method Detail

setPosition

void setPosition(long startLsn)
           throws ChecksumException,
                  FileNotFoundException,
                  DatabaseException
Throws:
ChecksumException
FileNotFoundException
DatabaseException

processEntry

protected boolean processEntry(ByteBuffer entryBuffer)
Instantiate a WireRecord to house this log entry.

Specified by:
processEntry in class FileReader
Parameters:
entryBuffer - contains the entry data and is positioned at the data
Returns:
true if this entry should be returned

getNReposition

long getNReposition()

getNScanned

long getNScanned()

resetStats

void resetStats()


Copyright (c) 2004-2012 Oracle. All rights reserved.