Class CheckpointDrivenFileDataBufferStore

java.lang.Object
com.illumon.iris.db.v2.locations.FileDataBufferStore
com.illumon.iris.db.v2.locations.CheckpointDrivenFileDataBufferStore
All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, CheckpointRecord.DataFileSizeRecord, CheckpointRecord.MutableFileSizeRecord, CheckpointRecord.SourceFileSizeRecord

public class CheckpointDrivenFileDataBufferStore extends FileDataBufferStore implements CheckpointRecord.MutableFileSizeRecord
A FileDataBufferStore that gets file sizes from a checkpoint record, and never directly from disk.
  • Constructor Details

    • CheckpointDrivenFileDataBufferStore

      public CheckpointDrivenFileDataBufferStore(@NotNull FileAccessor fileAccessor, @NotNull ByteOrder byteOrder, long initialSize, @NotNull String fileName)
      Construct a CheckpointDrivenFileDataBufferStore.
      Parameters:
      fileAccessor - An accessor for the file (or file region) that we're presenting a buffered view of
      byteOrder - The byte order that should be used for all buffers in this store
      initialSize - Initially known visible size of the underlying file (or file region)
      fileName - name of the file (for DataFileSizeRecord lookup in the checkpointRecord)
  • Method Details

    • getName

      public String getName()
    • getSize

      public long getSize()
    • setSize

      public void setSize(long newSize)
      Specified by:
      setSize in interface CheckpointRecord.MutableFileSizeRecord
    • extend

      protected void extend(long newSize)
      Description copied from class: FileDataBufferStore
      Inform this store of an observed change in the file data size.
      Overrides:
      extend in class FileDataBufferStore
      Parameters:
      newSize - The new size
    • ensureSize

      public void ensureSize(long requiredSize)
      Description copied from class: FileDataBufferStore
      Make sure size is large enough to accommodate a request. Call before proceeding with any request.
      Overrides:
      ensureSize in class FileDataBufferStore
      Parameters:
      requiredSize - The size required by the caller in order to make progress
    • ensureFileExists

      public void ensureFileExists()
      Description copied from class: FileDataBufferStore
      Ensure the underlying file exists.
      Overrides:
      ensureFileExists in class FileDataBufferStore
    • append

      default com.fishlib.base.log.LogOutput append(@NotNull com.fishlib.base.log.LogOutput logOutput)
      Specified by:
      append in interface com.fishlib.base.log.LogOutputAppendable