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)  
      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)
      • 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 interface MetricsSelector
        Parameters:
        nodeMetrics - (undocumented)
        Returns:
        (undocumented)