Record Class DiscoveryStatistics
java.lang.Object
java.lang.Record
org.j7m.middleware.registry.api.DiscoveryStatistics
- Record Components:
registryQueryCount- registry lookup/list query countmulticastMessagesSent- multicast messages sentmulticastMessagesReceived- multicast messages receivedbootstrapQueries- bootstrap peer queriespeerContactSuccesses- successful peer contactspeerContactFailures- failed peer contactsheartbeatSuccesses- successful heartbeatsheartbeatFailures- failed heartbeatsleaseExpirations- observed lease expirationsmetadata- additional public counters
public record DiscoveryStatistics(long registryQueryCount, long multicastMessagesSent, long multicastMessagesReceived, long bootstrapQueries, long peerContactSuccesses, long peerContactFailures, long heartbeatSuccesses, long heartbeatFailures, long leaseExpirations, Map<String,Long> metadata)
extends Record
Immutable discovery statistics snapshot.
-
Constructor Summary
ConstructorsConstructorDescriptionDiscoveryStatistics(long registryQueryCount, long multicastMessagesSent, long multicastMessagesReceived, long bootstrapQueries, long peerContactSuccesses, long peerContactFailures, long heartbeatSuccesses, long heartbeatFailures, long leaseExpirations, Map<String, Long> metadata) Creates an immutable statistics snapshot. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thebootstrapQueriesrecord component.static DiscoveryStatisticsempty()Returns an empty statistics snapshot.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theheartbeatFailuresrecord component.longReturns the value of theheartbeatSuccessesrecord component.longReturns the value of theleaseExpirationsrecord component.metadata()Returns the value of themetadatarecord component.longReturns the value of themulticastMessagesReceivedrecord component.longReturns the value of themulticastMessagesSentrecord component.longReturns the value of thepeerContactFailuresrecord component.longReturns the value of thepeerContactSuccessesrecord component.longReturns the value of theregistryQueryCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DiscoveryStatistics
public DiscoveryStatistics(long registryQueryCount, long multicastMessagesSent, long multicastMessagesReceived, long bootstrapQueries, long peerContactSuccesses, long peerContactFailures, long heartbeatSuccesses, long heartbeatFailures, long leaseExpirations, Map<String, Long> metadata) Creates an immutable statistics snapshot.
-
-
Method Details
-
empty
Returns an empty statistics snapshot.- Returns:
- empty statistics
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
registryQueryCount
public long registryQueryCount()Returns the value of theregistryQueryCountrecord component.- Returns:
- the value of the
registryQueryCountrecord component
-
multicastMessagesSent
public long multicastMessagesSent()Returns the value of themulticastMessagesSentrecord component.- Returns:
- the value of the
multicastMessagesSentrecord component
-
multicastMessagesReceived
public long multicastMessagesReceived()Returns the value of themulticastMessagesReceivedrecord component.- Returns:
- the value of the
multicastMessagesReceivedrecord component
-
bootstrapQueries
public long bootstrapQueries()Returns the value of thebootstrapQueriesrecord component.- Returns:
- the value of the
bootstrapQueriesrecord component
-
peerContactSuccesses
public long peerContactSuccesses()Returns the value of thepeerContactSuccessesrecord component.- Returns:
- the value of the
peerContactSuccessesrecord component
-
peerContactFailures
public long peerContactFailures()Returns the value of thepeerContactFailuresrecord component.- Returns:
- the value of the
peerContactFailuresrecord component
-
heartbeatSuccesses
public long heartbeatSuccesses()Returns the value of theheartbeatSuccessesrecord component.- Returns:
- the value of the
heartbeatSuccessesrecord component
-
heartbeatFailures
public long heartbeatFailures()Returns the value of theheartbeatFailuresrecord component.- Returns:
- the value of the
heartbeatFailuresrecord component
-
leaseExpirations
public long leaseExpirations()Returns the value of theleaseExpirationsrecord component.- Returns:
- the value of the
leaseExpirationsrecord component
-
metadata
-