Record Class StreamMetrics
java.lang.Object
java.lang.Record
org.j7m.middleware.examples.streaming.StreamMetrics
- Record Components:
submitted- number of submitted itemsreturned- number of returned server itemsrejected- number of rejected itemscancelled- whether the session was cancelledbackpressureSignals- number of backpressure signals
public record StreamMetrics(long submitted, long returned, long rejected, boolean cancelled, long backpressureSignals)
extends Record
Immutable metrics for a streaming-pipeline example session.
-
Constructor Summary
ConstructorsConstructorDescriptionStreamMetrics(long submitted, long returned, long rejected, boolean cancelled, long backpressureSignals) Creates metrics. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thebackpressureSignalsrecord component.booleanReturns the value of thecancelledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longrejected()Returns the value of therejectedrecord component.longreturned()Returns the value of thereturnedrecord component.longReturns the value of thesubmittedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StreamMetrics
public StreamMetrics(long submitted, long returned, long rejected, boolean cancelled, long backpressureSignals) Creates metrics.- Parameters:
submitted- submitted countreturned- returned countrejected- rejected countcancelled- cancellation flagbackpressureSignals- backpressure signal count
-
-
Method Details
-
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 with thecomparemethod from their corresponding wrapper classes. -
submitted
-
returned
-
rejected
-
cancelled
-
backpressureSignals
public long backpressureSignals()Returns the value of thebackpressureSignalsrecord component.- Returns:
- the value of the
backpressureSignalsrecord component
-