Class ColumnFileState

java.lang.Object
com.illumon.iris.db.v2.locations.local.ColumnFileState

@InternalUseOnly public abstract class ColumnFileState extends Object
A class for tracking the state of individual column files within a Deephaven format table.
  • Field Details

  • Method Details

    • writable

      public static ColumnFileState writable(@NotNull @NotNull ColumnFileTypeDetails typeDetails, @NotNull @NotNull File directory, @NotNull @NotNull String name, boolean hasHeader, @NotNull @NotNull Function<ColumnFileType,ColumnFileState> stateLookup, @NotNull @NotNull WritableLocalTableLocation tableLocation)
      Get a new ColumnFileState suitable for writing data.
      Parameters:
      typeDetails - the type details
      directory - the directory of the data
      name - the name of the file
      hasHeader - if the file has headers
      stateLookup - a function to retrieve ColumnFileStates based on the type
      tableLocation - the WritableLocalTableLocation for writing.
      Returns:
      a new Writable column file state.
    • readOnly

      public static ColumnFileState readOnly(@NotNull @NotNull ColumnFileTypeDetails typeDetails, @NotNull @NotNull File directory, @NotNull @NotNull String columnName, boolean hasHeader, @NotNull @NotNull Function<ColumnFileType,ColumnFileState> stateLookup)
      Get a new ColumnFileState suitable for reading data.
      Parameters:
      typeDetails - the type details
      directory - the directory of the data
      columnName - the name of the column
      hasHeader - if the file has headers
      stateLookup - a function to retrieve ColumnFileStates based on the type
      Returns:
      a new read-only column file state.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBaseAccessor

      protected FileAccessor getBaseAccessor()
    • getTypeDetails

      public ColumnFileTypeDetails getTypeDetails()
    • getFile

      public File getFile()
    • makeBaseAccessor

      protected abstract FileAccessor makeBaseAccessor()
    • getDataAccessor

      protected FileAccessor getDataAccessor()
    • getDataBufferStore

      public abstract FileDataBufferStore getDataBufferStore(@NotNull @NotNull CheckpointRecord checkpointRecord)
    • getByteOrder

      public ByteOrder getByteOrder(@NotNull @NotNull CheckpointRecord readerCheckpointRecord)
    • readHeaderPrefix

      public long readHeaderPrefix()
    • getCachedHeaderPrefix

      public long getCachedHeaderPrefix()
    • getDataStartPosition

      public int getDataStartPosition()
      Calculate the offset of the data in the file. Modern files do not have headers and start with 0.
      Returns:
      The data start position for this column file