Class ElasticsearchTasksAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchTasksAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptioncancel()
Cancel a task.cancel
(CancelRequest request) Cancel a task.final CompletableFuture<CancelResponse>
Cancel a task.get
(GetTasksRequest request) Get task information.Get task information.list()
Get all tasks.list
(ListRequest request) Get all tasks.final CompletableFuture<ListResponse>
Get all tasks.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchTasksAsyncClient
-
ElasticsearchTasksAsyncClient
public ElasticsearchTasksAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchTasksAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchTasksAsyncClient>
-
cancel
Cancel a task. A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. The get task information API will continue to list these cancelled tasks until they complete. The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the
?detailed
parameter to identify the other tasks the system is running. You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.- See Also:
-
cancel
public final CompletableFuture<CancelResponse> cancel(Function<CancelRequest.Builder, ObjectBuilder<CancelRequest>> fn) Cancel a task. A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. The get task information API will continue to list these cancelled tasks until they complete. The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the
?detailed
parameter to identify the other tasks the system is running. You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.- Parameters:
fn
- a function that initializes a builder to create theCancelRequest
- See Also:
-
cancel
Cancel a task. A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. The get task information API will continue to list these cancelled tasks until they complete. The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the
?detailed
parameter to identify the other tasks the system is running. You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.- See Also:
-
get
Get task information. Get information about a task currently running in the cluster.- See Also:
-
get
public final CompletableFuture<GetTasksResponse> get(Function<GetTasksRequest.Builder, ObjectBuilder<GetTasksRequest>> fn) Get task information. Get information about a task currently running in the cluster.- Parameters:
fn
- a function that initializes a builder to create theGetTasksRequest
- See Also:
-
list
Get all tasks. Get information about the tasks currently running on one or more nodes in the cluster.- See Also:
-
list
public final CompletableFuture<ListResponse> list(Function<ListRequest.Builder, ObjectBuilder<ListRequest>> fn) Get all tasks. Get information about the tasks currently running on one or more nodes in the cluster.- Parameters:
fn
- a function that initializes a builder to create theListRequest
- See Also:
-
list
Get all tasks. Get information about the tasks currently running on one or more nodes in the cluster.- See Also:
-