|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.indexer.postings.io.FilePostingsInput
public class FilePostingsInput
A postings input that is backed by a random access file.
Field Summary | |
---|---|
protected boolean |
full
Whether we'll read all of the postings or read them incrementally. |
protected java.io.RandomAccessFile |
raf
The file from which we'll read our postings. |
Constructor Summary | |
---|---|
FilePostingsInput(java.io.RandomAccessFile raf,
boolean full)
Creates a postings input that will read postings from the given file. |
Method Summary | |
---|---|
ReadableBuffer |
read(long offset,
int size)
Returns a set of postings that are backed by the file on disk, so that minimal memory is used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.RandomAccessFile raf
protected boolean full
Constructor Detail |
---|
public FilePostingsInput(java.io.RandomAccessFile raf, boolean full)
This implementation is most useful for reading postings that will be used in evaluating queries.
raf
- The file that the postings will be read from.full
- If true
then all of the postings will be
read in at once.Method Detail |
---|
public ReadableBuffer read(long offset, int size) throws java.io.IOException
read
in interface PostingsInput
offset
- The offset in the input at which the postings can be
found.size
- The number of bytes to read to get the postings.
java.io.IOException
- if there is any error reading the
postings.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |