Package com.tnsai.coordination.streaming
Record Class StreamingChannel.ChannelMetrics
java.lang.Object
java.lang.Record
com.tnsai.coordination.streaming.StreamingChannel.ChannelMetrics
- Enclosing class:
StreamingChannel<T>
public static record StreamingChannel.ChannelMetrics(String channelId, long emitted, long dropped, int bufferUsed, int bufferCapacity, int subscriberCount, boolean completed)
extends Record
Channel metrics snapshot.
-
Constructor Summary
ConstructorsConstructorDescriptionChannelMetrics(String channelId, long emitted, long dropped, int bufferUsed, int bufferCapacity, int subscriberCount, boolean completed) Creates an instance of aChannelMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebufferCapacityrecord component.intReturns the value of thebufferUsedrecord component.Returns the value of thechannelIdrecord component.booleanReturns the value of thecompletedrecord component.longdropped()Returns the value of thedroppedrecord component.doubledropRate()longemitted()Returns the value of theemittedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thesubscriberCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChannelMetrics
public ChannelMetrics(String channelId, long emitted, long dropped, int bufferUsed, int bufferCapacity, int subscriberCount, boolean completed) Creates an instance of aChannelMetricsrecord class.- Parameters:
channelId- the value for thechannelIdrecord componentemitted- the value for theemittedrecord componentdropped- the value for thedroppedrecord componentbufferUsed- the value for thebufferUsedrecord componentbufferCapacity- the value for thebufferCapacityrecord componentsubscriberCount- the value for thesubscriberCountrecord componentcompleted- the value for thecompletedrecord component
-
-
Method Details
-
dropRate
public double dropRate() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
channelId
Returns the value of thechannelIdrecord component.- Returns:
- the value of the
channelIdrecord component
-
emitted
public long emitted()Returns the value of theemittedrecord component.- Returns:
- the value of the
emittedrecord component
-
dropped
public long dropped()Returns the value of thedroppedrecord component.- Returns:
- the value of the
droppedrecord component
-
bufferUsed
public int bufferUsed()Returns the value of thebufferUsedrecord component.- Returns:
- the value of the
bufferUsedrecord component
-
bufferCapacity
public int bufferCapacity()Returns the value of thebufferCapacityrecord component.- Returns:
- the value of the
bufferCapacityrecord component
-
subscriberCount
public int subscriberCount()Returns the value of thesubscriberCountrecord component.- Returns:
- the value of the
subscriberCountrecord component
-
completed
public boolean completed()Returns the value of thecompletedrecord component.- Returns:
- the value of the
completedrecord component
-