Package akka.cluster.metrics
Class CapacityMetricsSelector
- java.lang.Object
-
- akka.cluster.metrics.CapacityMetricsSelector
-
- All Implemented Interfaces:
MetricsSelector
,java.io.Serializable
,scala.Serializable
- Direct Known Subclasses:
CpuMetricsSelector$
,HeapMetricsSelector$
,MixMetricsSelectorBase
,SystemLoadAverageMetricsSelector$
public abstract class CapacityMetricsSelector extends java.lang.Object implements MetricsSelector
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).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CapacityMetricsSelector()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract scala.collection.immutable.Map<Address,java.lang.Object>
capacity(scala.collection.immutable.Set<NodeMetrics> nodeMetrics)
scala.collection.immutable.Map<Address,java.lang.Object>
weights(scala.collection.immutable.Map<Address,java.lang.Object> capacity)
Converts the capacity values to weights.scala.collection.immutable.Map<Address,java.lang.Object>
weights(scala.collection.immutable.Set<NodeMetrics> nodeMetrics)
The weights per address, based on the capacity produced by the nodeMetrics.
-
-
-
Method Detail
-
capacity
public abstract scala.collection.immutable.Map<Address,java.lang.Object> capacity(scala.collection.immutable.Set<NodeMetrics> nodeMetrics)
-
weights
public scala.collection.immutable.Map<Address,java.lang.Object> weights(scala.collection.immutable.Map<Address,java.lang.Object> capacity)
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.- Parameters:
capacity
- (undocumented)- Returns:
- (undocumented)
-
weights
public scala.collection.immutable.Map<Address,java.lang.Object> weights(scala.collection.immutable.Set<NodeMetrics> nodeMetrics)
The weights per address, based on the capacity produced by the nodeMetrics.- Specified by:
weights
in interfaceMetricsSelector
- Parameters:
nodeMetrics
- (undocumented)- Returns:
- (undocumented)
-
-