Class CapacityMetricsSelector
A MetricsSelector producing weights from remaining capacity.
The weights are typically proportional to the remaining capacity.
Inheritance
CapacityMetricsSelector
Assembly: Akka.Cluster.Metrics.dll
Syntax
public abstract class CapacityMetricsSelector : IMetricsSelector
Methods
|
Improve this Doc
View Source
Capacity(IImmutableSet<NodeMetrics>)
Remaining capacity for each node. The value is between 0.0 and 1.0, where 0.0 means no remaining capacity
(full utilization) and 1.0 means full remaining capacity (zero utilization).
Declaration
public abstract IImmutableDictionary<Address, double> Capacity(IImmutableSet<NodeMetrics> nodeMetrics)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.IImmutableSet<NodeMetrics> |
nodeMetrics |
|
Returns
Type |
Description |
System.Collections.Immutable.IImmutableDictionary<Address, Double> |
|
|
Improve this Doc
View Source
Weights(IImmutableDictionary<Address, Double>)
Converts the capacity values to weights. The node with lowest capacity gets weight 1
(lowest usable capacity is 1%) and other nodes gets weights proportional to their capacity compared to
the node with lowest capacity.
Declaration
public IImmutableDictionary<Address, int> Weights(IImmutableDictionary<Address, double> capacity)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.IImmutableDictionary<Address, Double> |
capacity |
|
Returns
Type |
Description |
System.Collections.Immutable.IImmutableDictionary<Address, Int32> |
|
|
Improve this Doc
View Source
Weights(IImmutableSet<NodeMetrics>)
The weights per address, based on the nodeMetrics.
Declaration
public IImmutableDictionary<Address, int> Weights(IImmutableSet<NodeMetrics> nodeMetrics)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.IImmutableSet<NodeMetrics> |
nodeMetrics |
|
Returns
Type |
Description |
System.Collections.Immutable.IImmutableDictionary<Address, Int32> |
|
Implements
Extension Methods