Package org.elasticsearch.client
Class TasksClient
java.lang.Object
org.elasticsearch.client.TasksClient
Deprecated.
The High Level Rest Client is deprecated in favor of the
Elasticsearch Java API Client
A wrapper for the
RestHighLevelClient
that provides methods for accessing the Tasks API.
-
Method Summary
Modifier and TypeMethodDescriptioncancel
(CancelTasksRequest cancelTasksRequest, org.elasticsearch.client.RequestOptions options) Deprecated.Cancel one or more cluster tasks using the Task Management API.org.elasticsearch.client.Cancellable
cancelAsync
(CancelTasksRequest cancelTasksRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<CancelTasksResponse> listener) Deprecated.Asynchronously cancel one or more cluster tasks using the Task Management API.get
(GetTaskRequest request, org.elasticsearch.client.RequestOptions options) Deprecated.Get a task using the Task Management API.org.elasticsearch.client.Cancellable
getAsync
(GetTaskRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<Optional<GetTaskResponse>> listener) Deprecated.Get a task using the Task Management API.org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse
list
(org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksRequest request, org.elasticsearch.client.RequestOptions options) Deprecated.Get current tasks using the Task Management API.org.elasticsearch.client.Cancellable
listAsync
(org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse> listener) Deprecated.Asynchronously get current tasks using the Task Management API.
-
Method Details
-
list
public org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse list(org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksRequest request, org.elasticsearch.client.RequestOptions options) throws IOException Deprecated.Get current tasks using the Task Management API. See Task Management API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
listAsync
public org.elasticsearch.client.Cancellable listAsync(org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse> listener) Deprecated.Asynchronously get current tasks using the Task Management API. See Task Management API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
get
public Optional<GetTaskResponse> get(GetTaskRequest request, org.elasticsearch.client.RequestOptions options) throws IOException Deprecated.Get a task using the Task Management API. See Task Management API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
getAsync
public org.elasticsearch.client.Cancellable getAsync(GetTaskRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<Optional<GetTaskResponse>> listener) Deprecated.Get a task using the Task Management API. See Task Management API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- an actionlistener that takes an optional response (404s are returned as an empty Optional)- Returns:
- cancellable that may be used to cancel the request
-
cancel
public CancelTasksResponse cancel(CancelTasksRequest cancelTasksRequest, org.elasticsearch.client.RequestOptions options) throws IOException Deprecated.Cancel one or more cluster tasks using the Task Management API. See Task Management API on elastic.co- Parameters:
cancelTasksRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
cancelAsync
public org.elasticsearch.client.Cancellable cancelAsync(CancelTasksRequest cancelTasksRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<CancelTasksResponse> listener) Deprecated.Asynchronously cancel one or more cluster tasks using the Task Management API. See Task Management API on elastic.co- Parameters:
cancelTasksRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-