Class ResourceUsage

java.lang.Object
org.apache.pulsar.policies.data.loadbalancer.ResourceUsage

public class ResourceUsage extends Object
POJO used to represent any system specific resource usage this is the format that load manager expects it in.
  • Field Details

    • usage

      public final double usage
    • limit

      public final double limit
  • Constructor Details

    • ResourceUsage

      public ResourceUsage(double usage, double limit)
    • ResourceUsage

      public ResourceUsage()
  • Method Details

    • compareTo

      public int compareTo(ResourceUsage o)
      this may be wrong since we are comparing available and not the usage.
      Parameters:
      o -
      Returns:
    • percentUsage

      public float percentUsage()