Record Class WebEngineHistory.Period

java.lang.Object
java.lang.Record
com.iizix.server.webengine.WebEngineHistory.Period
Record Components:
from - The first day.
to - The last day: today.
totals - The connects per status, every status present.
perApp - The connects per application and status; the overflow rows under the key null.
perGroup - The connects per group row.
Enclosing class:
WebEngineHistory

public static record WebEngineHistory.Period(LocalDate from, LocalDate to, Map<WebEngineStatus.Status, Long> totals, Map<String, Map<WebEngineStatus.Status, Long>> perApp, Map<WebEngineStats.Group, Long> perGroup) extends Record
The connects of a period, from its first day to its last, both in UTC.
Author:
Christopher Mindus
  • Constructor Details

  • Method Details

    • of

      public long of(WebEngineStatus.Status status)
      Gets the connects of a status.
      Parameters:
      status - The status.
      Returns:
      The connects.
    • of

      public long of(WebEngineStats.Group group)
      Gets the connects of a group row.
      Parameters:
      group - The group.
      Returns:
      The connects, 0 when the period has none.
    • days

      public int days()
      Gets the days of the period.
      Returns:
      The days, at least 1.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • from

      public LocalDate from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • to

      public LocalDate to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component
    • totals

      public Map<WebEngineStatus.Status, Long> totals()
      Returns the value of the totals record component.
      Returns:
      the value of the totals record component
    • perApp

      public Map<String, Map<WebEngineStatus.Status, Long>> perApp()
      Returns the value of the perApp record component.
      Returns:
      the value of the perApp record component
    • perGroup

      public Map<WebEngineStats.Group, Long> perGroup()
      Returns the value of the perGroup record component.
      Returns:
      the value of the perGroup record component