public class BrokerByResourceUtilizationComparator extends Object
Constructor and Description |
---|
BrokerByResourceUtilizationComparator() |
Modifier and Type | Method and Description |
---|---|
static Comparator<Broker> |
of(Resource resource,
boolean reverse)
Creates a
Comparator that compares Broker by their resource utilization in normal or reversed
order. |
public BrokerByResourceUtilizationComparator()
public static Comparator<Broker> of(Resource resource, boolean reverse)
Comparator
that compares Broker
by their resource utilization in normal or reversed
order. When this comparator is used for sorting the brokers, normal order => ascending sorted order reverse order
=> descending sorted orderresource
- resource to comparereverse
- if true, brokers would be compared in reverse order