Record Class PackNodeStore.Options

java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.pdt.store.PackNodeStore.Options
Record Components:
maxPackBytes - the size at which a pack closes, PackNodeStore.DEFAULT_MAX_PACK_BYTES in production
syncEveryPut - whether to force the pack after every append
failurePoint - a hook the crash test uses to stop a compaction mid-way; PackNodeStore.FailurePoint.NONE otherwise
Enclosing class:
PackNodeStore

public static record PackNodeStore.Options(long maxPackBytes, boolean syncEveryPut, PackNodeStore.FailurePoint failurePoint) extends Record
Tuning for a store (PD-S-02).
  • Constructor Details

    • Options

      public Options(long maxPackBytes, boolean syncEveryPut, PackNodeStore.FailurePoint failurePoint)
      Creates an instance of a Options record class.
      Parameters:
      maxPackBytes - the value for the maxPackBytes record component
      syncEveryPut - the value for the syncEveryPut record component
      failurePoint - the value for the failurePoint record component
  • Method Details

    • defaults

      public static PackNodeStore.Options defaults()
      The production options.
    • withMaxPackBytes

      public PackNodeStore.Options withMaxPackBytes(long bytes)
      These options with another pack size.
    • withFailurePoint

      public PackNodeStore.Options withFailurePoint(PackNodeStore.FailurePoint point)
      These options with another failure hook.
    • withSyncEveryPut

      public PackNodeStore.Options withSyncEveryPut(boolean sync)
      These options forcing after every put.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxPackBytes

      public long maxPackBytes()
      Returns the value of the maxPackBytes record component.
      Returns:
      the value of the maxPackBytes record component
    • syncEveryPut

      public boolean syncEveryPut()
      Returns the value of the syncEveryPut record component.
      Returns:
      the value of the syncEveryPut record component
    • failurePoint

      public PackNodeStore.FailurePoint failurePoint()
      Returns the value of the failurePoint record component.
      Returns:
      the value of the failurePoint record component