public class CpuUsageStrategy<T extends Endpoint> extends XorShiftRandomStrategy<T>
| Modifier and Type | Field and Description |
|---|---|
protected int |
lowCpuUsage
lowCpuUsage ~= zero CPU usage
|
protected int |
maxTries
This strategy compares number of 'maxTries' random node.
|
protected Transporter |
transporter |
rndendpointCache, endpoints, nodeID, preferLocal| Constructor and Description |
|---|
CpuUsageStrategy(ServiceBroker broker,
boolean preferLocal,
int maxTries,
int lowCpuUsage,
Transporter transporter) |
| Modifier and Type | Method and Description |
|---|---|
Endpoint |
next(Endpoint[] array) |
addEndpoint, getAllEndpoints, getEndpoint, getEndpointsByNodeID, isEmpty, removeprotected final int maxTries
protected final int lowCpuUsage
protected final Transporter transporter
public CpuUsageStrategy(ServiceBroker broker, boolean preferLocal, int maxTries, int lowCpuUsage, Transporter transporter)