Class IndexInputReader
java.lang.Object
org.apache.lucene.store.DataInput
org.apache.lucene.store.IndexInput
org.apache.cassandra.index.sai.disk.io.IndexInputReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable
public class IndexInputReader
extends org.apache.lucene.store.IndexInput
This is a wrapper over a Cassandra
RandomAccessReader that provides an IndexInput
interface for Lucene classes that need IndexInput. This is an optimisation because the
Lucene DataInput reads bytes one at a time whereas the RandomAccessReader is
optimised to read multibyte objects faster.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static IndexInputReadercreate(FileHandle handle) static IndexInputReadercreate(RandomAccessReader input) static IndexInputReadercreate(RandomAccessReader input, Runnable doOnClose) longlonglength()bytereadByte()voidreadBytes(byte[] bytes, int off, int len) voidseek(long position) org.apache.lucene.store.IndexInputMethods inherited from class org.apache.lucene.store.IndexInput
clone, getFullSliceDescription, randomAccessSlice, skipBytes, toStringMethods inherited from class org.apache.lucene.store.DataInput
readBytes, readFloats, readInt, readInts, readLong, readLongs, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong
-
Method Details
-
create
-
create
-
create
-
readByte
- Specified by:
readBytein classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readBytes
- Specified by:
readBytesin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.lucene.store.IndexInput
-
getFilePointer
public long getFilePointer()- Specified by:
getFilePointerin classorg.apache.lucene.store.IndexInput
-
seek
public void seek(long position) - Specified by:
seekin classorg.apache.lucene.store.IndexInput
-
length
public long length()- Specified by:
lengthin classorg.apache.lucene.store.IndexInput
-
slice
- Specified by:
slicein classorg.apache.lucene.store.IndexInput
-