Record Class WebEngineHistory.ResetInfo

java.lang.Object
java.lang.Record
com.iizix.server.webengine.WebEngineHistory.ResetInfo
Record Components:
resetAt - When it was made.
admin - The administrator who made it.
undoUntil - Until when it can be undone.
countingSince - When the since-start counters started before the reset.
dayRows - The stored daily rows it cleared.
sinceRows - The since-start rows it cleared.
Enclosing class:
WebEngineHistory

public static record WebEngineHistory.ResetInfo(Instant resetAt, String admin, Instant undoUntil, Instant countingSince, int dayRows, int sinceRows) extends Record
The last reset, as long as it can be undone.
Author:
Christopher Mindus
  • Constructor Details

    • ResetInfo

      public ResetInfo(Instant resetAt, String admin, Instant undoUntil, Instant countingSince, int dayRows, int sinceRows)
      Creates an instance of a ResetInfo record class.
      Parameters:
      resetAt - the value for the resetAt record component
      admin - the value for the admin record component
      undoUntil - the value for the undoUntil record component
      countingSince - the value for the countingSince record component
      dayRows - the value for the dayRows record component
      sinceRows - the value for the sinceRows record component
  • Method Details

    • canUndo

      public boolean canUndo(Instant now)
      Tells whether the reset can still be undone at a moment.
      Parameters:
      now - The moment.
      Returns:
      true while the undo time has not passed.
    • 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.
    • resetAt

      public Instant resetAt()
      Returns the value of the resetAt record component.
      Returns:
      the value of the resetAt record component
    • admin

      public String admin()
      Returns the value of the admin record component.
      Returns:
      the value of the admin record component
    • undoUntil

      public Instant undoUntil()
      Returns the value of the undoUntil record component.
      Returns:
      the value of the undoUntil record component
    • countingSince

      public Instant countingSince()
      Returns the value of the countingSince record component.
      Returns:
      the value of the countingSince record component
    • dayRows

      public int dayRows()
      Returns the value of the dayRows record component.
      Returns:
      the value of the dayRows record component
    • sinceRows

      public int sinceRows()
      Returns the value of the sinceRows record component.
      Returns:
      the value of the sinceRows record component