Package io.github.pimak.ntfy.core
Record Class PipelineCounters.Snapshot
java.lang.Object
java.lang.Record
io.github.pimak.ntfy.core.PipelineCounters.Snapshot
- Enclosing class:
PipelineCounters
public static record PipelineCounters.Snapshot(long published, long suppressed, long failed)
extends Record
An immutable, point-in-time triple of the three counters.
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshot(long published, long suppressed, long failed) Creates an instance of aSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longfailed()Returns the value of thefailedrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thepublishedrecord component.longReturns the value of thesuppressedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Snapshot
public Snapshot(long published, long suppressed, long failed) Creates an instance of aSnapshotrecord class.- Parameters:
published- the value for thepublishedrecord componentsuppressed- the value for thesuppressedrecord componentfailed- the value for thefailedrecord component
-
-
Method Details
-
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. -
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. -
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 with '=='. -
published
public long published()Returns the value of thepublishedrecord component.- Returns:
- the value of the
publishedrecord component
-
suppressed
public long suppressed()Returns the value of thesuppressedrecord component.- Returns:
- the value of the
suppressedrecord component
-
failed
public long failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-