public class KeyValueLocator extends Object implements Locator
This Locator
finds the proper Node
s for every incoming BinaryRequest
.
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.
Constructor and Description |
---|
KeyValueLocator() |
Modifier and Type | Method and 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.
|
public void locateAndDispatch(CouchbaseRequest request, List<Node> nodes, ClusterConfig cluster, CoreEnvironment env, com.lmax.disruptor.RingBuffer<ResponseEvent> responseBuffer)
Locator
Given with the environment and node information, the implementation locates the right set of nodes and dispatches the request into them.
locateAndDispatch
in interface Locator
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.Copyright © 2018 Couchbase, Inc.. All rights reserved.