Class ResourceUsage
java.lang.Object
org.apache.pulsar.policies.data.loadbalancer.ResourceUsage
POJO used to represent any system specific resource usage this is the format that load manager expects it in.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
this may be wrong since we are comparing available and not the usage.float
-
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
this may be wrong since we are comparing available and not the usage.- Parameters:
o
-- Returns:
-
percentUsage
public float percentUsage()
-