Class TasksClient

java.lang.Object
org.elasticsearch.client.TasksClient

@Deprecated public final class TasksClient extends Object
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.

See Task Management API on elastic.co

  • Method Summary

    Modifier and Type
    Method
    Description
    cancel(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 request
      options - the request options (e.g. headers), use RequestOptions.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 request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - 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 request
      options - the request options (e.g. headers), use RequestOptions.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 request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - 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 request
      options - the request options (e.g. headers), use RequestOptions.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 request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request