public abstract class MultiLevelSkipListReader extends Object
MultiLevelSkipListWriter for the information about the encoding
of the multi level skip lists.
Subclasses must implement the abstract method readSkipData(int, IndexInput)
which defines the actual format of the skip data.| Modifier and Type | Field and Description |
|---|---|
protected int |
maxNumberOfSkipLevels |
| Constructor and Description |
|---|
MultiLevelSkipListReader(IndexInput skipStream,
int maxSkipLevels,
int skipInterval) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
getDoc()
Returns the id of the doc to which the last call of
skipTo(int)
has skipped. |
void |
init(long skipPointer,
int df)
initializes the reader
|
protected abstract int |
readSkipData(int level,
IndexInput skipStream)
Subclasses must implement the actual skip data encoding in this method.
|
protected void |
seekChild(int level)
Seeks the skip entry on the given level
|
protected void |
setLastSkipData(int level)
Copies the values of the last read skip entry on this level
|
int |
skipTo(int target)
Skips entries to the first beyond the current whose document number is
greater than or equal to target.
|
public MultiLevelSkipListReader(IndexInput skipStream, int maxSkipLevels, int skipInterval)
public int getDoc()
skipTo(int)
has skipped.public int skipTo(int target)
throws IOException
IOExceptionprotected void seekChild(int level)
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic void init(long skipPointer,
int df)
protected abstract int readSkipData(int level,
IndexInput skipStream)
throws IOException
level - the level skip data shall be read fromskipStream - the skip stream to read fromIOExceptionprotected void setLastSkipData(int level)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.