Class 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)
      Remaining capacity for each node.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CapacityMetricsSelector

        public CapacityMetricsSelector()
    • Method Detail

      • capacity

        public abstract scala.collection.immutable.Map<Address,​java.lang.Object> capacity​(scala.collection.immutable.Set<NodeMetrics> 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).
      • 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.
      • 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 interface MetricsSelector