|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.postings.io.ChannelPostingsInput
public class ChannelPostingsInput
A class for reading postings from a channel.
This implementation is most useful for reading postings that will be used in evaluating queries.
| Field Summary | |
|---|---|
protected java.nio.channels.FileChannel |
chan
The channel. |
protected boolean |
full
If true, full buffers will be read from the channel. |
| Constructor Summary | |
|---|---|
ChannelPostingsInput(java.nio.channels.FileChannel chan,
boolean full)
Creates a postings channel that will read postings from the given channel, using the given base offset. |
|
| Method Summary | |
|---|---|
ReadableBuffer |
read(long offset,
int size)
Reads postings from the channel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.nio.channels.FileChannel chan
protected boolean full
| Constructor Detail |
|---|
public ChannelPostingsInput(java.nio.channels.FileChannel chan,
boolean full)
chan - The channel from which we'll read postings.full - If true, then we will fully read postings from the postings file
before returning them. In this case, an instance of
NIOBuffer is returned. If false, then postings will be only
partially read from the file. In this case, an instance of
ChannelReadableBuffer is returned.| Method Detail |
|---|
public ReadableBuffer read(long offset,
int size)
throws java.io.IOException
read in interface PostingsInputoffset - The offset from which the postings will be
read.size - The size of the postings to read.
java.io.IOException - If there is any error reading from the channel.ReadableBuffer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||