Class OpenSearchTasksAsyncClient
java.lang.Object
org.opensearch.client.ApiClient<OpenSearchTransport,OpenSearchTasksAsyncClient>
org.opensearch.client.opensearch.tasks.OpenSearchTasksAsyncClient
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class OpenSearchTasksAsyncClient
extends ApiClient<OpenSearchTransport,OpenSearchTasksAsyncClient>
Client for the tasks namespace.
-
Field Summary
Fields inherited from class org.opensearch.client.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchTasksAsyncClient(OpenSearchTransport transport) OpenSearchTasksAsyncClient(OpenSearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionfinal CompletableFuture<CancelResponse> cancel()Cancels a task, if it can be cancelled through an API.final CompletableFuture<CancelResponse> Cancels a task, if it can be cancelled through an API.cancel(CancelRequest request) Cancels a task, if it can be cancelled through an API.Returns information about a task.get(GetTasksRequest request) Returns information about a task.final CompletableFuture<ListResponse> list()Returns a list of tasks.final CompletableFuture<ListResponse> Returns a list of tasks.list(ListRequest request) Returns a list of tasks.withTransportOptions(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class org.opensearch.client.ApiClient
_transport, _transportOptions, getDeserializer
-
Constructor Details
-
OpenSearchTasksAsyncClient
-
OpenSearchTasksAsyncClient
public OpenSearchTasksAsyncClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<OpenSearchTransport,OpenSearchTasksAsyncClient>
-
cancel
public CompletableFuture<CancelResponse> cancel(CancelRequest request) throws IOException, OpenSearchException Cancels a task, if it can be cancelled through an API.- Throws:
IOExceptionOpenSearchException
-
cancel
public final CompletableFuture<CancelResponse> cancel(Function<CancelRequest.Builder, ObjectBuilder<CancelRequest>> fn) throws IOException, OpenSearchExceptionCancels a task, if it can be cancelled through an API.- Parameters:
fn- a function that initializes a builder to create theCancelRequest- Throws:
IOExceptionOpenSearchException
-
cancel
Cancels a task, if it can be cancelled through an API.- Throws:
IOExceptionOpenSearchException
-
get
public CompletableFuture<GetTasksResponse> get(GetTasksRequest request) throws IOException, OpenSearchException Returns information about a task.- Throws:
IOExceptionOpenSearchException
-
get
public final CompletableFuture<GetTasksResponse> get(Function<GetTasksRequest.Builder, ObjectBuilder<GetTasksRequest>> fn) throws IOException, OpenSearchExceptionReturns information about a task.- Parameters:
fn- a function that initializes a builder to create theGetTasksRequest- Throws:
IOExceptionOpenSearchException
-
list
public CompletableFuture<ListResponse> list(ListRequest request) throws IOException, OpenSearchException Returns a list of tasks.- Throws:
IOExceptionOpenSearchException
-
list
public final CompletableFuture<ListResponse> list(Function<ListRequest.Builder, ObjectBuilder<ListRequest>> fn) throws IOException, OpenSearchExceptionReturns a list of tasks.- Parameters:
fn- a function that initializes a builder to create theListRequest- Throws:
IOExceptionOpenSearchException
-
list
Returns a list of tasks.- Throws:
IOExceptionOpenSearchException
-