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:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Cloneable
public class IndexInputReader extends org.apache.lucene.store.IndexInput
This is a wrapper over a CassandraRandomAccessReader
that provides anIndexInput
interface for Lucene classes that needIndexInput
. This is an optimisation because the LuceneDataInput
reads bytes one at a time whereas theRandomAccessReader
is optimised to read multibyte objects faster.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static IndexInputReader
create(FileHandle handle)
static IndexInputReader
create(RandomAccessReader input)
static IndexInputReader
create(RandomAccessReader input, java.lang.Runnable doOnClose)
long
getFilePointer()
long
length()
byte
readByte()
void
readBytes(byte[] bytes, int off, int len)
void
seek(long position)
org.apache.lucene.store.IndexInput
slice(java.lang.String sliceDescription, long offset, long length)
-
Methods inherited from class org.apache.lucene.store.IndexInput
clone, getFullSliceDescription, randomAccessSlice, skipBytes, toString
-
-
-
-
Method Detail
-
create
public static IndexInputReader create(RandomAccessReader input)
-
create
public static IndexInputReader create(RandomAccessReader input, java.lang.Runnable doOnClose)
-
create
public static IndexInputReader create(FileHandle handle)
-
readByte
public byte readByte() throws java.io.IOException
- Specified by:
readByte
in classorg.apache.lucene.store.DataInput
- Throws:
java.io.IOException
-
readBytes
public void readBytes(byte[] bytes, int off, int len) throws java.io.IOException
- Specified by:
readBytes
in classorg.apache.lucene.store.DataInput
- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classorg.apache.lucene.store.IndexInput
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer
in classorg.apache.lucene.store.IndexInput
-
seek
public void seek(long position)
- Specified by:
seek
in classorg.apache.lucene.store.IndexInput
-
length
public long length()
- Specified by:
length
in classorg.apache.lucene.store.IndexInput
-
slice
public org.apache.lucene.store.IndexInput slice(java.lang.String sliceDescription, long offset, long length)
- Specified by:
slice
in classorg.apache.lucene.store.IndexInput
-
-