public class NetworkLatencyStrategy<T extends Endpoint> extends XorShiftRandomStrategy<T>
| Modifier and Type | Field and Description |
|---|---|
protected NetworkLatencyStrategyFactory |
factory |
protected int |
sampleCount
This strategy compares number of 'sampleCount' random node.
|
rndendpointCache, endpoints, nodeID, preferLocal| Constructor and Description |
|---|
NetworkLatencyStrategy(ServiceBroker broker,
boolean preferLocal,
int sampleCount,
NetworkLatencyStrategyFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
Endpoint |
next(Context ctx,
Endpoint[] array) |
addEndpoint, getAllEndpoints, getEndpoint, getEndpointsByNodeID, isEmpty, removeprotected final int sampleCount
protected final NetworkLatencyStrategyFactory factory
public NetworkLatencyStrategy(ServiceBroker broker, boolean preferLocal, int sampleCount, NetworkLatencyStrategyFactory factory)