Package org.elasticsearch.client
Class ParentTaskAssigningClient
- java.lang.Object
-
- org.elasticsearch.client.support.AbstractClient
-
- org.elasticsearch.client.FilterClient
-
- org.elasticsearch.client.ParentTaskAssigningClient
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Client
,ElasticsearchClient
,Releasable
public class ParentTaskAssigningClient extends FilterClient
A Client that sets the parent task on all requests that it makes. Use this to conveniently implement actions that cause many other actions.
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.client.FilterClient
in
-
Fields inherited from class org.elasticsearch.client.support.AbstractClient
logger, settings
-
Fields inherited from interface org.elasticsearch.client.Client
CLIENT_TYPE_SETTING_S
-
-
Constructor Summary
Constructors Constructor Description ParentTaskAssigningClient(Client in, DiscoveryNode localNode, Task parentTask)
Convenience constructor for building the TaskId out of what is usually at hand.ParentTaskAssigningClient(Client in, TaskId parentTask)
Standard constructor.
-
Method Summary
Modifier and Type Method Description protected <Request extends ActionRequest,Response extends ActionResponse>
voiddoExecute(Action<Response> action, Request request, ActionListener<Response> listener)
Client
unwrap()
Fetch the wrapped client.-
Methods inherited from class org.elasticsearch.client.FilterClient
close, getRemoteClusterClient, in
-
Methods inherited from class org.elasticsearch.client.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, prepareIndex, prepareMultiGet, prepareMultiSearch, prepareMultiTermVectors, prepareSearch, prepareSearchScroll, prepareTermVectors, prepareTermVectors, prepareUpdate, prepareUpdate, search, search, searchScroll, searchScroll, settings, termVectors, termVectors, threadPool, update, update
-
-
-
-
Constructor Detail
-
ParentTaskAssigningClient
public ParentTaskAssigningClient(Client in, TaskId parentTask)
Standard constructor.
-
ParentTaskAssigningClient
public ParentTaskAssigningClient(Client in, DiscoveryNode localNode, Task parentTask)
Convenience constructor for building the TaskId out of what is usually at hand.
-
-
Method Detail
-
unwrap
public Client unwrap()
Fetch the wrapped client. Use this to make calls that don't setTransportRequest.setParentTask(TaskId)
.
-
doExecute
protected <Request extends ActionRequest,Response extends ActionResponse> void doExecute(Action<Response> action, Request request, ActionListener<Response> listener)
- Overrides:
doExecute
in classFilterClient
-
-