Class NodeMetrics
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.
Implements
Inherited Members
Namespace: Akka.Cluster.Metrics.Serialization
Assembly: Akka.Cluster.Metrics.dll
Syntax
public sealed class NodeMetrics : IEquatable<NodeMetrics>
Constructors
| Edit this page View SourceNodeMetrics(Address, long, IEnumerable<Metric>)
Creates new instance of NodeMetrics
Declaration
public NodeMetrics(Address address, long timestamp, IEnumerable<NodeMetrics.Types.Metric> metrics)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | address | Address of the node the metrics are gathered at |
| long | timestamp | the time of sampling, in milliseconds since midnight, January 1, 1970 UTC |
| IEnumerable<NodeMetrics.Types.Metric> | metrics | The set of sampled NodeMetrics.Types.Metric |
Properties
| Edit this page View SourceAddress
Declaration
public Address Address { get; }
Property Value
| Type | Description |
|---|---|
| Address |
Metrics
Declaration
public ImmutableHashSet<NodeMetrics.Types.Metric> Metrics { get; }
Property Value
| Type | Description |
|---|---|
| ImmutableHashSet<NodeMetrics.Types.Metric> |
Timestamp
Declaration
public long Timestamp { get; }
Property Value
| Type | Description |
|---|---|
| long |
Methods
| Edit this page View SourceEquals(NodeMetrics?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(NodeMetrics? other)
Parameters
| Type | Name | Description |
|---|---|---|
| NodeMetrics | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
| Edit this page View SourceMerge(NodeMetrics)
Returns the most recent data.
Declaration
public NodeMetrics Merge(NodeMetrics that)
Parameters
| Type | Name | Description |
|---|---|---|
| NodeMetrics | that |
Returns
| Type | Description |
|---|---|
| NodeMetrics |
Metric(string)
Gets metric by key
Declaration
public Option<NodeMetrics.Types.Metric> Metric(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Returns
| Type | Description |
|---|---|
| Option<NodeMetrics.Types.Metric> |
SameAs(NodeMetrics)
Returns true if
that
address is the same as this
Declaration
public bool SameAs(NodeMetrics that)
Parameters
| Type | Name | Description |
|---|---|---|
| NodeMetrics | that |
Returns
| Type | Description |
|---|---|
| bool |
Update(NodeMetrics)
Returns the most recent data with NodeMetrics.Types.EWMA averaging.
Declaration
public NodeMetrics Update(NodeMetrics that)
Parameters
| Type | Name | Description |
|---|---|---|
| NodeMetrics | that |
Returns
| Type | Description |
|---|---|
| NodeMetrics |
Edit this page