Record Class IServerLicenseSystem.CounterState

java.lang.Object
java.lang.Record
com.iizix.license.IServerLicenseSystem.CounterState
Record Components:
graceEpisodeStart - When the last grace episode started, milliseconds since the epoch (wall-clock UTC, a local deadline, 2b.11), 0 for none (6.3).
unlicensedSince - Since when the licence has not been valid, milliseconds since the epoch, 0 while it is valid (8.4, RB-9).
pendingDays - The days not yet reported to the license server, oldest first (6.5).
Enclosing interface:
IServerLicenseSystem

public static record IServerLicenseSystem.CounterState(long graceEpisodeStart, long unlicensedSince, List<IServerLicenseSystem.UsageDay> pendingDays) extends Record
The counting state an iiziServer keeps in its license file (LICENSE-V2-DESIGN.md sections 6.3, 6.5 and 8.4): written by the server's licence counter (B-5d) and read back when the server starts again, so that a restart neither opens a second grace episode nor starts the 14 days of an unlicensed server again, and the days not yet reported are reported after a restart.
Author:
Christopher Mindus
  • Field Details

  • Constructor Details

  • 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 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.
    • graceEpisodeStart

      public long graceEpisodeStart()
      Returns the value of the graceEpisodeStart record component.
      Returns:
      the value of the graceEpisodeStart record component
    • unlicensedSince

      public long unlicensedSince()
      Returns the value of the unlicensedSince record component.
      Returns:
      the value of the unlicensedSince record component
    • pendingDays

      public List<IServerLicenseSystem.UsageDay> pendingDays()
      Returns the value of the pendingDays record component.
      Returns:
      the value of the pendingDays record component