Class NodeMetrics

java.lang.Object
org.apache.pekko.cluster.metrics.NodeMetrics
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public final class NodeMetrics extends Object implements scala.Product, Serializable
The snapshot of current sampled health metrics for any monitored process. Collected and gossipped at regular intervals for dynamic cluster management strategies.

Equality of NodeMetrics is based on its address.

param: address pekko.actor.Address of the node the metrics are gathered at param: timestamp the time of sampling, in milliseconds since midnight, January 1, 1970 UTC param: metrics the set of sampled pekko.cluster.metrics.Metric

See Also:
  • Constructor Details

    • NodeMetrics

      public NodeMetrics(Address address, long timestamp, scala.collection.immutable.Set<Metric> metrics)
  • Method Details

    • $lessinit$greater$default$3

      public static scala.collection.immutable.Set<Metric> $lessinit$greater$default$3()
    • apply

      public static NodeMetrics apply(Address address, long timestamp, scala.collection.immutable.Set<Metric> metrics)
    • apply$default$3

      public static scala.collection.immutable.Set<Metric> apply$default$3()
    • unapply

      public static scala.Option<scala.Tuple3<Address,Object,scala.collection.immutable.Set<Metric>>> unapply(NodeMetrics x$0)
    • address

      public Address address()
    • timestamp

      public long timestamp()
    • metrics

      public scala.collection.immutable.Set<Metric> metrics()
    • merge

      public NodeMetrics merge(NodeMetrics that)
      Returns the most recent data.
    • update

      public NodeMetrics update(NodeMetrics that)
      Returns the most recent data with EWMA averaging.
    • metric

      public scala.Option<Metric> metric(String key)
    • getMetrics

      public Iterable<Metric> getMetrics()
      Java API
    • sameAs

      public boolean sameAs(NodeMetrics that)
      Returns true if that address is the same as this
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object
    • copy

      public NodeMetrics copy(Address address, long timestamp, scala.collection.immutable.Set<Metric> metrics)
    • copy$default$1

      public Address copy$default$1()
    • copy$default$2

      public long copy$default$2()
    • copy$default$3

      public scala.collection.immutable.Set<Metric> copy$default$3()
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • productElementName

      public String productElementName(int x$1)
      Specified by:
      productElementName in interface scala.Product
    • toString

      public String toString()
      Overrides:
      toString in class Object