Record Class DiscoveryStatistics

java.lang.Object
java.lang.Record
org.j7m.middleware.registry.api.DiscoveryStatistics
Record Components:
registryQueryCount - registry lookup/list query count
multicastMessagesSent - multicast messages sent
multicastMessagesReceived - multicast messages received
bootstrapQueries - bootstrap peer queries
peerContactSuccesses - successful peer contacts
peerContactFailures - failed peer contacts
heartbeatSuccesses - successful heartbeats
heartbeatFailures - failed heartbeats
leaseExpirations - observed lease expirations
metadata - 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 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

      public static DiscoveryStatistics empty()
      Returns an empty statistics snapshot.
      Returns:
      empty statistics
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • registryQueryCount

      public long registryQueryCount()
      Returns the value of the registryQueryCount record component.
      Returns:
      the value of the registryQueryCount record component
    • multicastMessagesSent

      public long multicastMessagesSent()
      Returns the value of the multicastMessagesSent record component.
      Returns:
      the value of the multicastMessagesSent record component
    • multicastMessagesReceived

      public long multicastMessagesReceived()
      Returns the value of the multicastMessagesReceived record component.
      Returns:
      the value of the multicastMessagesReceived record component
    • bootstrapQueries

      public long bootstrapQueries()
      Returns the value of the bootstrapQueries record component.
      Returns:
      the value of the bootstrapQueries record component
    • peerContactSuccesses

      public long peerContactSuccesses()
      Returns the value of the peerContactSuccesses record component.
      Returns:
      the value of the peerContactSuccesses record component
    • peerContactFailures

      public long peerContactFailures()
      Returns the value of the peerContactFailures record component.
      Returns:
      the value of the peerContactFailures record component
    • heartbeatSuccesses

      public long heartbeatSuccesses()
      Returns the value of the heartbeatSuccesses record component.
      Returns:
      the value of the heartbeatSuccesses record component
    • heartbeatFailures

      public long heartbeatFailures()
      Returns the value of the heartbeatFailures record component.
      Returns:
      the value of the heartbeatFailures record component
    • leaseExpirations

      public long leaseExpirations()
      Returns the value of the leaseExpirations record component.
      Returns:
      the value of the leaseExpirations record component
    • metadata

      public Map<String,Long> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component