Package com.couchbase.client.core.node
Class RoundRobinLocator
- java.lang.Object
-
- com.couchbase.client.core.node.RoundRobinLocator
-
- All Implemented Interfaces:
Locator
public class RoundRobinLocator extends Object implements Locator
ALocator
which implements node selection on a round-robin basis.This locator simply tracks a counter that gets incremented and applied to the list of nodes provided. The list of nodes is filtered to make sure that only nodes with the specific service are taken into account.
- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description RoundRobinLocator(ServiceType serviceType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispatch(Request<? extends Response> request, List<Node> nodes, ClusterConfig config, CoreContext ctx)
Given the environment and node information, the implementation locates the right set of nodes and dispatches the request into them.
-
-
-
Constructor Detail
-
RoundRobinLocator
public RoundRobinLocator(ServiceType serviceType)
-
-
Method Detail
-
dispatch
public void dispatch(Request<? extends Response> request, List<Node> nodes, ClusterConfig config, CoreContext ctx)
Description copied from interface:Locator
Given the environment and node information, the implementation locates the right set of nodes and dispatches the request into them.
-
-