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 keynull.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 Summary
ConstructorsConstructorDescriptionPeriod(LocalDate from, LocalDate to, Map<WebEngineStatus.Status, Long> totals, Map<String, Map<WebEngineStatus.Status, Long>> perApp, Map<WebEngineStats.Group, Long> perGroup) Creates an instance of aPeriodrecord class.Method Summary
Modifier and TypeMethodDescriptionintdays()Gets the days of the period.final booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.longof(WebEngineStatus.Status status) Gets the connects of a status.longof(WebEngineStats.Group group) Gets the connects of a group row.perApp()Returns the value of theperApprecord component.perGroup()Returns the value of theperGrouprecord component.to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.totals()Returns the value of thetotalsrecord component.
Constructor Details
Period
public Period(LocalDate from, LocalDate to, Map<WebEngineStatus.Status, Long> totals, Map<String, Map<WebEngineStatus.Status, Long>> perApp, Map<WebEngineStats.Group, Long> perGroup) Creates an instance of aPeriodrecord class.
Method Details
of
Gets the connects of a status.- Parameters:
status- The status.- Returns:
- The connects.
of
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
hashCode
equals
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 withObjects::equals(Object,Object).from
to
totals
perApp
perGroup