Interface SegmentIdentifier


public interface SegmentIdentifier
A namespace identifier for the storage instance segment, a grouping of data that should be kept isolated from the data of other segments.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Define if this segment contains data that is never updated, but only added and optionally deleted.
    byte[]
    Identifier for the segment consistent throughout the lifetime of the segment.
    Name for the segment consistent throughout the lifetime of the segment.
    default boolean
    Not all segments are in all DB versions.
    default boolean
    Whether index and filter blocks for this segment should be stored in the block cache.
    boolean
    This flag defines which segment is eligible for the high spec flag, so basically what column family is involved with high spec flag
    default boolean
    Enable garbage collection for static data.
  • Method Details

    • getName

      String getName()
      Name for the segment consistent throughout the lifetime of the segment.
      Returns:
      unique name of the segment.
    • getId

      byte[] getId()
      Identifier for the segment consistent throughout the lifetime of the segment.
      Returns:
      unique id of the segment.
    • includeInDatabaseFormat

      default boolean includeInDatabaseFormat(DataStorageFormat format)
      Not all segments are in all DB versions. This queries the segment to see if it is in the DB format.
      Parameters:
      format - Version of the DB
      Returns:
      true if the segment is in that DB format
    • containsStaticData

      boolean containsStaticData()
      Define if this segment contains data that is never updated, but only added and optionally deleted. Example is append only data like the blockchain. This information can be used by the underlying implementation to apply specific optimization for this use case.
      Returns:
      true if the segment contains only static data
    • isEligibleToHighSpecFlag

      boolean isEligibleToHighSpecFlag()
      This flag defines which segment is eligible for the high spec flag, so basically what column family is involved with high spec flag
      Returns:
      true if the segment is involved with the high spec flag
    • isStaticDataGarbageCollectionEnabled

      default boolean isStaticDataGarbageCollectionEnabled()
      Enable garbage collection for static data. This should be enabled for static data which can be deleted or pruned.
      Returns:
      true if enabled, false otherwise.
    • isCacheIndexAndFilterBlocks

      default boolean isCacheIndexAndFilterBlocks()
      Whether index and filter blocks for this segment should be stored in the block cache. When false (the default), index and filter blocks are held in unbounded native memory per SST file.
      Returns:
      true if index and filter blocks should be cached in the block cache