Class TasksClient
java.lang.Object
org.opensearch.client.base.ApiClient<TasksClient>
org.opensearch.client.opensearch.api.tasks.TasksClient
public class TasksClient extends ApiClient<TasksClient>
Client for the tasks namespace.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TasksClient(Transport transport)
TasksClient(Transport transport, org.opensearch.client.RequestOptions options)
-
Method Summary
Modifier and Type Method Description CancelResponse
cancel(java.util.function.Function<CancelRequest.Builder,ObjectBuilder<CancelRequest>> fn)
Cancels a task, if it can be cancelled through an API.CancelResponse
cancel(CancelRequest request)
Cancels a task, if it can be cancelled through an API.GetResponse
get(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn)
Returns information about a task.GetResponse
get(GetRequest request)
Returns information about a task.ListResponse
list(java.util.function.Function<ListRequest.Builder,ObjectBuilder<ListRequest>> fn)
Returns a list of tasks.ListResponse
list(ListRequest request)
Returns a list of tasks.TasksClient
withRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)
Creates a newTasksClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)
with specific request options, inheriting existing options.TasksClient
withRequestOptions(org.opensearch.client.RequestOptions options)
Creates a newTasksClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)
with specific request options.
-
Constructor Details
-
Method Details
-
cancel
Cancels a task, if it can be cancelled through an API.- Throws:
java.io.IOException
-
cancel
public final CancelResponse cancel(java.util.function.Function<CancelRequest.Builder,ObjectBuilder<CancelRequest>> fn) throws java.io.IOExceptionCancels a task, if it can be cancelled through an API.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
get
Returns information about a task.- Throws:
java.io.IOException
-
get
public final GetResponse get(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn) throws java.io.IOExceptionReturns information about a task.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
list
Returns a list of tasks.- Throws:
java.io.IOException
-
list
public final ListResponse list(java.util.function.Function<ListRequest.Builder,ObjectBuilder<ListRequest>> fn) throws java.io.IOExceptionReturns a list of tasks.- Parameters:
fn
- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
withRequestOptions
Creates a newTasksClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)
with specific request options.- Specified by:
withRequestOptions
in classApiClient<TasksClient>
-
withRequestOptions
public TasksClient withRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newTasksClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)
with specific request options, inheriting existing options.- Parameters:
fn
- a function taking an options builder initialized with the current request options, or initialized with default values.
-