Class 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 Cassandra SequentialWriter that provides a Lucene IndexOutput interface for the Lucene index writers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SequentialWriter asSequentialWriter()
      Returns SequentialWriter 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
      • Methods inherited from class org.apache.lucene.store.DataOutput

        copyBytes, writeBytes, writeInt, writeLong, writeMapOfStrings, writeSetOfStrings, writeShort, writeString, writeVInt, writeVLong, writeZInt, writeZLong
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

    • 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 class org.apache.lucene.store.IndexOutput
        Throws:
        java.io.IOException
      • getFilePointer

        public long getFilePointer()
        Specified by:
        getFilePointer in class org.apache.lucene.store.IndexOutput
      • writeBytes

        public void writeBytes​(byte[] bytes,
                               int offset,
                               int len)
                        throws java.io.IOException
        Specified by:
        writeBytes in class org.apache.lucene.store.DataOutput
        Throws:
        java.io.IOException
      • writeByte

        public void writeByte​(byte b)
                       throws java.io.IOException
        Specified by:
        writeByte in class org.apache.lucene.store.DataOutput
        Throws:
        java.io.IOException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class org.apache.lucene.store.IndexOutput
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.apache.lucene.store.IndexOutput
      • asSequentialWriter

        public SequentialWriter asSequentialWriter()
        Returns SequentialWriter 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