Class KeyValueLocator
- java.lang.Object
-
- com.couchbase.client.core.node.locate.KeyValueLocator
-
- All Implemented Interfaces:
Locator
public class KeyValueLocator extends Object implements Locator
ThisLocator
finds the properNode
s for every incomingBinaryRequest
. Depending on the bucket type used, it either uses partition/vbucket (couchbase) or ketama (memcache) hashing. For broadcast-type operations, it will return all suitable nodes without hashing by key.- Since:
- 1.0.0
- Author:
- Michael Nitschinger, Simon Baslé
-
-
Constructor Summary
Constructors Constructor Description KeyValueLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
locateAndDispatch(CouchbaseRequest request, List<Node> nodes, ClusterConfig cluster, CoreEnvironment env, com.lmax.disruptor.RingBuffer<ResponseEvent> responseBuffer)
Given with the environment and node information, the implementation locates the right set of nodes and dispatches the request into them.
-
-
-
Method Detail
-
locateAndDispatch
public void locateAndDispatch(CouchbaseRequest request, List<Node> nodes, ClusterConfig cluster, CoreEnvironment env, com.lmax.disruptor.RingBuffer<ResponseEvent> responseBuffer)
Description copied from interface:Locator
Given with the environment and node information, the implementation locates the right set of nodes and dispatches the request into them.- Specified by:
locateAndDispatch
in interfaceLocator
- Parameters:
request
- the request to dispatch.nodes
- the current list of active nodes.cluster
- the current cluster configuration.env
- the core environment.responseBuffer
- the response buffer for potential redistribution.
-
-