Record Class CosIdProperties.Static

java.lang.Object
java.lang.Record
me.ahoo.cosid.spring.autoconfigure.CosIdProperties.Static
Record Components:
bits - the slot bits; default 10
slot - the slot
stateFile - the window file; none means no clock regression protection across restarts
ahead - how far ahead the window ceiling is written; default 10s
notBefore - the floor while the state file does not exist yet (given by the migration tool)
Enclosing class:
CosIdProperties

public static record CosIdProperties.Static(int bits, Integer slot, Path stateFile, Duration ahead, Instant notBefore) extends Record
A slot the deployment keeps unique.
  • Constructor Details

    • Static

      public Static(@DefaultValue("10") int bits, Integer slot, Path stateFile, @DefaultValue("10s") Duration ahead, Instant notBefore)
      Creates an instance of a Static record class.
      Parameters:
      bits - the value for the bits record component
      slot - the value for the slot record component
      stateFile - the value for the stateFile record component
      ahead - the value for the ahead record component
      notBefore - the value for the notBefore record component
  • Method Details

    • 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 '=='.
      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.
    • bits

      public int bits()
      Returns the value of the bits record component.
      Returns:
      the value of the bits record component
    • slot

      public Integer slot()
      Returns the value of the slot record component.
      Returns:
      the value of the slot record component
    • stateFile

      public Path stateFile()
      Returns the value of the stateFile record component.
      Returns:
      the value of the stateFile record component
    • ahead

      public Duration ahead()
      Returns the value of the ahead record component.
      Returns:
      the value of the ahead record component
    • notBefore

      public Instant notBefore()
      Returns the value of the notBefore record component.
      Returns:
      the value of the notBefore record component