Package akka.cluster.metrics
Class NodeMetrics
- java.lang.Object
-
- akka.cluster.metrics.NodeMetrics
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
public final class NodeMetrics extends java.lang.Object implements scala.Product, java.io.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
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 sampledMetric
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NodeMetrics(Address address, long timestamp, scala.collection.immutable.Set<Metric> metrics)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static scala.collection.immutable.Set<Metric>
$lessinit$greater$default$3()
Address
address()
static NodeMetrics
apply(Address address, long timestamp, scala.collection.immutable.Set<Metric> metrics)
static scala.collection.immutable.Set<Metric>
apply$default$3()
boolean
canEqual(java.lang.Object x$1)
NodeMetrics
copy(Address address, long timestamp, scala.collection.immutable.Set<Metric> metrics)
Address
copy$default$1()
long
copy$default$2()
scala.collection.immutable.Set<Metric>
copy$default$3()
boolean
equals(java.lang.Object obj)
java.lang.Iterable<Metric>
getMetrics()
Java APIint
hashCode()
NodeMetrics
merge(NodeMetrics that)
Returns the most recent data.scala.Option<Metric>
metric(java.lang.String key)
scala.collection.immutable.Set<Metric>
metrics()
int
productArity()
java.lang.Object
productElement(int x$1)
java.lang.String
productElementName(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
boolean
sameAs(NodeMetrics that)
Returns true ifthat
address is the same as thislong
timestamp()
java.lang.String
toString()
static scala.Option<scala.Tuple3<Address,java.lang.Object,scala.collection.immutable.Set<Metric>>>
unapply(NodeMetrics x$0)
NodeMetrics
update(NodeMetrics that)
Returns the most recent data withEWMA
averaging.
-
-
-
Method Detail
-
$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,java.lang.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 withEWMA
averaging.
-
metric
public scala.Option<Metric> metric(java.lang.String key)
-
getMetrics
public java.lang.Iterable<Metric> getMetrics()
Java API
-
sameAs
public boolean sameAs(NodeMetrics that)
Returns true ifthat
address is the same as this
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.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 java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementName
in interfacescala.Product
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-