Class TasksAsyncClient
java.lang.Object
org.opensearch.client.base.ApiClient<TasksAsyncClient>
org.opensearch.client.opensearch.api.tasks.TasksAsyncClient
public class TasksAsyncClient extends ApiClient<TasksAsyncClient>
Client for the tasks namespace.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TasksAsyncClient(Transport transport)TasksAsyncClient(Transport transport, org.opensearch.client.RequestOptions options) -
Method Summary
Modifier and Type Method Description java.util.concurrent.CompletableFuture<CancelResponse>cancel(java.util.function.Function<CancelRequest.Builder,ObjectBuilder<CancelRequest>> fn)Cancels a task, if it can be cancelled through an API.java.util.concurrent.CompletableFuture<CancelResponse>cancel(CancelRequest request)Cancels a task, if it can be cancelled through an API.java.util.concurrent.CompletableFuture<GetResponse>get(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn)Returns information about a task.java.util.concurrent.CompletableFuture<GetResponse>get(GetRequest request)Returns information about a task.java.util.concurrent.CompletableFuture<ListResponse>list(java.util.function.Function<ListRequest.Builder,ObjectBuilder<ListRequest>> fn)Returns a list of tasks.java.util.concurrent.CompletableFuture<ListResponse>list(ListRequest request)Returns a list of tasks.TasksAsyncClientwithRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newTasksAsyncClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options, inheriting existing options.TasksAsyncClientwithRequestOptions(org.opensearch.client.RequestOptions options)Creates a newTasksAsyncClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options.
-
Constructor Details
-
Method Details
-
cancel
public java.util.concurrent.CompletableFuture<CancelResponse> cancel(CancelRequest request) throws java.io.IOExceptionCancels a task, if it can be cancelled through an API.- Throws:
java.io.IOException
-
cancel
public final java.util.concurrent.CompletableFuture<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
public java.util.concurrent.CompletableFuture<GetResponse> get(GetRequest request) throws java.io.IOExceptionReturns information about a task.- Throws:
java.io.IOException
-
get
public final java.util.concurrent.CompletableFuture<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
public java.util.concurrent.CompletableFuture<ListResponse> list(ListRequest request) throws java.io.IOExceptionReturns a list of tasks.- Throws:
java.io.IOException
-
list
public final java.util.concurrent.CompletableFuture<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 newTasksAsyncClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options.- Specified by:
withRequestOptionsin classApiClient<TasksAsyncClient>
-
withRequestOptions
public TasksAsyncClient withRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newTasksAsyncClient(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.
-