Class IndexOutputWriter
- java.lang.Object
-
- org.apache.lucene.store.DataOutput
-
- org.apache.lucene.store.IndexOutput
-
- org.apache.cassandra.index.sai.disk.io.IndexOutputWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
@NotThreadSafe public class IndexOutputWriter extends org.apache.lucene.store.IndexOutput
This is a wrapper over a CassandraSequentialWriter
that provides a LuceneIndexOutput
interface for the Lucene index writers.
-
-
Constructor Summary
Constructors Constructor Description IndexOutputWriter(SequentialWriter out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SequentialWriter
asSequentialWriter()
ReturnsSequentialWriter
associated with this writer.void
close()
long
getChecksum()
File
getFile()
long
getFilePointer()
void
skipBytes(long length)
java.lang.String
toString()
void
writeByte(byte b)
void
writeBytes(byte[] bytes, int offset, int len)
-
Methods inherited from class org.apache.lucene.store.IndexOutput
alignFilePointer, alignOffset, getName
-
-
-
-
Constructor Detail
-
IndexOutputWriter
public IndexOutputWriter(SequentialWriter out)
-
-
Method Detail
-
skipBytes
public void skipBytes(long length) throws java.io.IOException
- Throws:
java.io.IOException
-
getFile
public File getFile()
-
getChecksum
public long getChecksum() throws java.io.IOException
- Specified by:
getChecksum
in classorg.apache.lucene.store.IndexOutput
- Throws:
java.io.IOException
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer
in classorg.apache.lucene.store.IndexOutput
-
writeBytes
public void writeBytes(byte[] bytes, int offset, int len) throws java.io.IOException
- Specified by:
writeBytes
in classorg.apache.lucene.store.DataOutput
- Throws:
java.io.IOException
-
writeByte
public void writeByte(byte b) throws java.io.IOException
- Specified by:
writeByte
in classorg.apache.lucene.store.DataOutput
- 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.IndexOutput
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.apache.lucene.store.IndexOutput
-
asSequentialWriter
public SequentialWriter asSequentialWriter()
ReturnsSequentialWriter
associated with this writer. Convenient when interacting with Cassandra codebase to write files to disk. Note that all bytes written to the returned writer will still contribute to the checksum.- Returns:
SequentialWriter
associated with this writer
-
-