java.lang.Object
org.elasticsearch.client.internal.support.AbstractClient
org.elasticsearch.client.internal.node.NodeClient
- All Implemented Interfaces:
Closeable,AutoCloseable,Client,ElasticsearchClient,Releasable
Client that executes actions on the local node.
-
Field Summary
Fields inherited from class org.elasticsearch.client.internal.support.AbstractClient
logger, settingsFields inherited from interface org.elasticsearch.client.internal.Client
CLIENT_TYPE_SETTING_S -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<Request extends ActionRequest,Response extends ActionResponse>
voiddoExecute(ActionType<Response> action, Request request, ActionListener<Response> listener) <Request extends ActionRequest,Response extends ActionResponse>
TaskexecuteLocally(ActionType<Response> action, Request request, ActionListener<Response> listener) Return the names of all available actions registered with this client.The id of the localDiscoveryNode.getRemoteClusterClient(String clusterAlias) Returns a client to a remote cluster with the given cluster alias.voidinitialize(Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions, TaskManager taskManager, Supplier<String> localNodeId, Transport.Connection localConnection, RemoteClusterService remoteClusterService, NamedWriteableRegistry namedWriteableRegistry) Methods inherited from class org.elasticsearch.client.internal.support.AbstractClient
admin, bulk, bulk, clearScroll, clearScroll, delete, delete, execute, execute, explain, explain, fieldCaps, fieldCaps, filterWithHeader, get, get, index, index, multiGet, multiGet, multiSearch, multiSearch, multiTermVectors, multiTermVectors, prepareBulk, prepareBulk, prepareClearScroll, prepareDelete, prepareDelete, prepareExplain, prepareFieldCaps, prepareGet, prepareGet, prepareIndex, prepareIndex, prepareMultiGet, prepareMultiSearch, prepareMultiTermVectors, prepareSearch, prepareSearchScroll, prepareTermVectors, prepareTermVectors, prepareUpdate, prepareUpdate, search, search, searchScroll, searchScroll, settings, termVectors, termVectors, threadPool, update, update
-
Constructor Details
-
NodeClient
-
-
Method Details
-
initialize
public void initialize(Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions, TaskManager taskManager, Supplier<String> localNodeId, Transport.Connection localConnection, RemoteClusterService remoteClusterService, NamedWriteableRegistry namedWriteableRegistry) -
getActionNames
Return the names of all available actions registered with this client. -
close
public void close() -
doExecute
public <Request extends ActionRequest,Response extends ActionResponse> void doExecute(ActionType<Response> action, Request request, ActionListener<Response> listener) - Specified by:
doExecutein classAbstractClient
-
executeLocally
public <Request extends ActionRequest,Response extends ActionResponse> Task executeLocally(ActionType<Response> action, Request request, ActionListener<Response> listener) Execute anActionTypelocally, returning thatTaskused to track it, and linking anActionListener. Prefer this method if you don't need access to the task when listening for the response. This is the method used to implement theClientinterface.- Throws:
TaskCancelledException- if the request's parent task has been cancelled already
-
getLocalNodeId
The id of the localDiscoveryNode. Useful for generating task ids from tasks returned byexecuteLocally(ActionType, ActionRequest, ActionListener). -
getRemoteClusterClient
Description copied from interface:ClientReturns a client to a remote cluster with the given cluster alias. -
getNamedWriteableRegistry
-