Interface ObjectFile

All Superinterfaces:
org.apache.jena.atlas.lib.Closeable, org.apache.jena.atlas.lib.Sync
All Known Implementing Classes:
ObjectFileLogger, ObjectFileReadonly, ObjectFileStorage, ObjectFileSwitcher, ObjectFileTransComplex, ObjectFileWrapper

public interface ObjectFile extends org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
An ObjectFile is an append-read file, that is you can append data to the stream or read any block.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Iterator<org.apache.jena.atlas.lib.Pair<Long,ByteBuffer>>
    all()
    All the contents as ByteBuffers - debugging aid
    A label to identify this ObjectFile
    boolean
    Any objects in this file?
    long
    Length, in units used by read/write for ids
    read(long id)
    Read a buffer at the accessor number.
    void
    reposition(long id)
    Reset the "append" point; may only be moved earlier.
    void
    truncate(long size)
    Truncate the file
    long
    write(ByteBuffer buffer)
    Write out the buffer - return the accessor number

    Methods inherited from interface org.apache.jena.atlas.lib.Closeable

    close

    Methods inherited from interface org.apache.jena.atlas.lib.Sync

    sync
  • Field Details

  • Method Details

    • getLabel

      String getLabel()
      A label to identify this ObjectFile
    • write

      long write(ByteBuffer buffer)
      Write out the buffer - return the accessor number
    • read

      ByteBuffer read(long id)
      Read a buffer at the accessor number.
    • length

      long length()
      Length, in units used by read/write for ids
    • isEmpty

      boolean isEmpty()
      Any objects in this file?
    • reposition

      void reposition(long id)
      Reset the "append" point; may only be moved earlier. The new position must correspond to a position returned by write(ByteBuffer).
    • truncate

      void truncate(long size)
      Truncate the file
    • all

      Iterator<org.apache.jena.atlas.lib.Pair<Long,ByteBuffer>> all()
      All the contents as ByteBuffers - debugging aid