Class FDBIndexOutput

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

@API(EXPERIMENTAL) public final class FDBIndexOutput extends org.apache.lucene.store.IndexOutput
Implementation of IndexOutput representing the writing of data in Lucene to a file.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    FDBIndexOutput(String name, FDBDirectory fdbDirectory)
    Create an FDBIndexOutput given a name and FDBDirectory.
    FDBIndexOutput(String resourceDescription, String name, FDBDirectory fdbDirectory)
    Create an FDBIndexOutput given a resource description, name, and FDBDirectory.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the directory which writes the FileReference.
    void
    copyBytes(org.apache.lucene.store.DataInput input, long numBytes)
     
    long
     
    long
     
    void
    writeByte(byte b)
     
    void
    writeBytes(byte[] bytes, int offset, int length)
    This method will be called many times.

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

    getName, toString

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

    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

    • FDBIndexOutput

      public FDBIndexOutput(@Nonnull String name, @Nonnull FDBDirectory fdbDirectory) throws IOException
      Create an FDBIndexOutput given a name and FDBDirectory.
      Parameters:
      name - name of resource
      fdbDirectory - existing FDBDirectory
      Throws:
      IOException
    • FDBIndexOutput

      public FDBIndexOutput(@Nonnull String resourceDescription, @Nonnull String name, @Nonnull FDBDirectory fdbDirectory) throws IOException
      Create an FDBIndexOutput given a resource description, name, and FDBDirectory.
      Parameters:
      resourceDescription - opaque description of file; used for logging
      name - name of resource
      fdbDirectory - existing FDBDirectory
      Throws:
      IOException
  • Method Details

    • close

      public void close() throws IOException
      Close the directory which writes the FileReference.
      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
    • copyBytes

      public void copyBytes(@Nonnull org.apache.lucene.store.DataInput input, long numBytes) throws IOException
      Overrides:
      copyBytes in class org.apache.lucene.store.DataOutput
      Throws:
      IOException
    • writeBytes

      public void writeBytes(@Nonnull byte[] bytes, int offset, int length) throws IOException
      This method will be called many times.
      Specified by:
      writeBytes in class org.apache.lucene.store.DataOutput
      Parameters:
      bytes - bytes to write
      offset - offset
      length - length
      Throws:
      IOException