Class RecordLengths

java.lang.Object
org.rostore.v2.keys.RecordLengths

public class RecordLengths extends Object
Defines the lengths of the key record components in bytes
  • Constructor Details

    • RecordLengths

      public RecordLengths(int idLength, int eolLength, int versionLength)
      Initializes the record lengths manually
      Parameters:
      idLength - the length of the id element for every key entry
      eolLength - the length of the end of life element for every key entry
      versionLength - the length of the version element for every key element
  • Method Details

    • standardRecordLengths

      public static final RecordLengths standardRecordLengths(MediaProperties mediaProperties)
      Initializes the record length with the standard
      Parameters:
      mediaProperties - the properties of the media
      Returns:
      the object with length
    • getIdLength

      public int getIdLength()
      The length of the id element for every key entry
      Returns:
      the length in bytes
    • getEolLength

      public int getEolLength()
      The length of the end of life element for every key entry
      Returns:
      the length in bytes
    • getVersionLength

      public int getVersionLength()
      The length of the version element for every key element
      Returns:
      the length in bytes
    • getTotalLength

      public int getTotalLength()
      The length of all elements of record
      Returns:
      the length in bytes