public class ConfigLocator extends Object implements Locator
Locates the proper CONFIG node for a given config request.
Note that since the CONFIG service is not intended for high performance data ops, it does not implement the more complex logic of MDS awareness that happens in other locators like for N1QL. The consequence of this is that in MDS scenarios one config server might be hit more than once if the next one comes along, but that shouldn’t be a problem at all. If this needs to be fixed at some point, take a look at the QueryLocator
which recently got fixed to do all the right (but more complex) things.
Constructor and Description |
---|
ConfigLocator() |
Modifier and Type | Method and Description |
---|---|
void |
locateAndDispatch(CouchbaseRequest request,
List<Node> nodes,
ClusterConfig config,
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 config, 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.config
- the current cluster configuration.env
- the core environment.responseBuffer
- the response buffer for potential redistribution.Copyright © 2017 Couchbase, Inc.. All rights reserved.