|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.log.FileReader.ReadWindow
protected static class FileReader.ReadWindow
A ReadWindow provides a swathe of data read from the JE log.
Field Summary | |
---|---|
protected long |
endOffset
|
protected EnvironmentImpl |
envImpl
|
protected FileManager |
fileManager
|
protected ByteBuffer |
readBuffer
|
protected long |
startOffset
|
Constructor Summary | |
---|---|
protected |
FileReader.ReadWindow(int readBufferSize,
EnvironmentImpl envImpl)
|
Method Summary | |
---|---|
protected void |
adjustReadBufferSize(int amountToRead)
Change the read buffer size if we start hitting large log entries so we don't get into an expensive cycle of multiple reads and piecing together of log entries. |
(package private) int |
capacity()
|
boolean |
containsLsn(long targetFileNumber,
long targetOffset)
|
(package private) boolean |
containsOffset(long targetOffset)
|
long |
currentFileNum()
|
protected boolean |
fillFromFile(FileHandle fileHandle,
long targetOffset)
|
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. |
(package private) int |
getAndResetNReads()
Returns the number of reads since the last time this method was called. |
(package private) ByteBuffer |
getBuffer()
|
long |
getEndOffset()
|
(package private) long |
getNRepeatIteratorReads()
|
(package private) boolean |
hasRemaining()
|
(package private) void |
incrementBufferPosition(int increment)
|
void |
initAtFileStart(long startLsn)
|
void |
positionBuffer(long targetOffset)
|
(package private) int |
remaining()
|
protected void |
setFileNum(long fileNum,
int logVersion)
Ensure that whenever we change the fileNum, the logVersion is also updated. |
void |
slideAndFill(long windowfileNum,
long windowStartOffset,
long targetOffset,
boolean forward)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected long startOffset
protected long endOffset
protected ByteBuffer readBuffer
protected final EnvironmentImpl envImpl
protected final FileManager fileManager
Constructor Detail |
---|
protected FileReader.ReadWindow(int readBufferSize, EnvironmentImpl envImpl)
Method Detail |
---|
public void initAtFileStart(long startLsn)
public long getEndOffset()
protected void setFileNum(long fileNum, int logVersion)
public long currentFileNum()
boolean containsOffset(long targetOffset)
public boolean containsLsn(long targetFileNumber, long targetOffset)
public void positionBuffer(long targetOffset)
void incrementBufferPosition(int increment)
public void slideAndFill(long windowfileNum, long windowStartOffset, long targetOffset, boolean forward) throws ChecksumException, FileNotFoundException, DatabaseException
ChecksumException
FileNotFoundException
DatabaseException
protected boolean fillNext(boolean singleFile, int bytesNeeded) throws ChecksumException, FileNotFoundException, FileReader.EOFException, DatabaseException
ChecksumException
FileNotFoundException
FileReader.EOFException
DatabaseException
protected boolean fillFromFile(FileHandle fileHandle, long targetOffset) throws DatabaseException
DatabaseException
protected void adjustReadBufferSize(int amountToRead)
int capacity()
int remaining()
boolean hasRemaining()
ByteBuffer getBuffer()
int getAndResetNReads()
long getNRepeatIteratorReads()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |