com.sleepycat.je.rep.stream
Class FeederReader.SwitchWindow
java.lang.Object
com.sleepycat.je.log.FileReader.ReadWindow
com.sleepycat.je.rep.stream.FeederReader.SwitchWindow
- Enclosing class:
- FeederReader
static class FeederReader.SwitchWindow
- extends FileReader.ReadWindow
The SwitchWindow can fill itself from either the log file or the log
buffers.
Method Summary |
protected boolean |
fillNext(boolean singleFile,
int bytesNeeded)
Fill up the read buffer with more data, moving along to the
following file (next largest number) if needed. |
void |
slideAndFill(long windowFileNum,
long windowStartOffset,
long targetOffset,
boolean forward)
|
FeederReader.SwitchWindow
FeederReader.SwitchWindow(int readBufferSize,
EnvironmentImpl envImpl)
slideAndFill
public void slideAndFill(long windowFileNum,
long windowStartOffset,
long targetOffset,
boolean forward)
throws ChecksumException,
FileNotFoundException,
DatabaseException
- Overrides:
slideAndFill
in class FileReader.ReadWindow
- Throws:
ChecksumException
FileNotFoundException
DatabaseException
fillNext
protected boolean fillNext(boolean singleFile,
int bytesNeeded)
throws ChecksumException,
DatabaseException,
FileReader.EOFException
- Fill up the read buffer with more data, moving along to the
following file (next largest number) if needed. Unlike other file
readers, we are reading log files that are concurrently growing, so
this read window must also know to look in the log buffers.
The contract between the feeder reader and the VLSNIndex lets us
assume that the feeder reader is only active when it is sure that
there is more data available somewhere -- whether it's in the log
buffers, write queue, or on disk.
- Overrides:
fillNext
in class FileReader.ReadWindow
- Returns:
- true if the fill moved us to a new file.
- Throws:
ChecksumException
DatabaseException
FileReader.EOFException
- See Also:
ReadWindow#fillNext
Copyright (c) 2004-2010 Oracle. All rights reserved.