public class NodeClient extends AbstractClient
deprecationLogger, logger, settings
CLIENT_TYPE_SETTING_S
Constructor and Description |
---|
NodeClient(Settings settings,
ThreadPool threadPool) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<Request extends ActionRequest,Response extends ActionResponse,RequestBuilder extends ActionRequestBuilder<Request,Response,RequestBuilder>> |
doExecute(Action<Request,Response,RequestBuilder> action,
Request request,
ActionListener<Response> listener) |
<Request extends ActionRequest,Response extends ActionResponse> |
executeLocally(GenericAction<Request,Response> action,
Request request,
ActionListener<Response> listener)
|
<Request extends ActionRequest,Response extends ActionResponse> |
executeLocally(GenericAction<Request,Response> action,
Request request,
TaskListener<Response> listener)
|
java.lang.String |
getLocalNodeId()
The id of the local
DiscoveryNode . |
void |
initialize(java.util.Map<GenericAction,TransportAction> actions,
java.util.function.Supplier<java.lang.String> localNodeId) |
admin, bulk, bulk, clearScroll, clearScroll, delete, delete, execute, execute, explain, explain, fieldCaps, fieldCaps, fieldStats, fieldStats, filterWithHeader, get, get, index, index, multiGet, multiGet, multiSearch, multiSearch, multiTermVectors, multiTermVectors, prepareBulk, prepareClearScroll, prepareDelete, prepareDelete, prepareExecute, prepareExplain, prepareFieldCaps, prepareFieldStats, prepareGet, prepareGet, prepareIndex, prepareIndex, prepareIndex, prepareMultiGet, prepareMultiSearch, prepareMultiTermVectors, prepareSearch, prepareSearchScroll, prepareTermVector, prepareTermVector, prepareTermVectors, prepareTermVectors, prepareUpdate, prepareUpdate, search, search, searchScroll, searchScroll, settings, termVector, termVector, termVectors, termVectors, threadPool, update, update
logDeprecatedSetting, logRemovedSetting, nodeName
public NodeClient(Settings settings, ThreadPool threadPool)
public void initialize(java.util.Map<GenericAction,TransportAction> actions, java.util.function.Supplier<java.lang.String> localNodeId)
public void close()
public <Request extends ActionRequest,Response extends ActionResponse,RequestBuilder extends ActionRequestBuilder<Request,Response,RequestBuilder>> void doExecute(Action<Request,Response,RequestBuilder> action, Request request, ActionListener<Response> listener)
doExecute
in class AbstractClient
public <Request extends ActionRequest,Response extends ActionResponse> Task executeLocally(GenericAction<Request,Response> action, Request request, ActionListener<Response> listener)
Action
locally, returning that Task
used to track it, and linking an ActionListener
. Prefer this
method if you don't need access to the task when listening for the response. This is the method used to implement the Client
interface.public <Request extends ActionRequest,Response extends ActionResponse> Task executeLocally(GenericAction<Request,Response> action, Request request, TaskListener<Response> listener)
Action
locally, returning that Task
used to track it, and linking an TaskListener
. Prefer this
method if you need access to the task when listening for the response.public java.lang.String getLocalNodeId()
DiscoveryNode
. Useful for generating task ids from tasks returned by
executeLocally(GenericAction, ActionRequest, TaskListener)
.