Class EmptyIndexOutput

java.lang.Object
org.apache.lucene.store.DataOutput
org.apache.lucene.store.IndexOutput
com.apple.foundationdb.record.lucene.directory.EmptyIndexOutput
All Implemented Interfaces:
Closeable, AutoCloseable

public class EmptyIndexOutput extends org.apache.lucene.store.IndexOutput
An output that is used to cause file references to exist, but doesn't actually allow writing.

This could just use an FDBIndexOutput and never actually write anything, but this helps fail earlier in cases where we never expect to write anything.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EmptyIndexOutput(String resourceDescription, String name, FDBDirectory fdbDirectory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    long
     
    long
     
    void
    writeByte(byte b)
     
    void
    writeBytes(byte[] b, int offset, int length)
     

    Methods inherited from class org.apache.lucene.store.IndexOutput

    getName, toString

    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 Details

  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class org.apache.lucene.store.IndexOutput
      Throws:
      IOException
    • getFilePointer

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

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

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

      public void writeBytes(byte[] b, int offset, int length) throws IOException
      Specified by:
      writeBytes in class org.apache.lucene.store.DataOutput
      Throws:
      IOException