Class ElasticsearchTasksClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchTasksClient
(ElasticsearchTransport transport) ElasticsearchTasksClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptioncancel()
Cancel a task.cancel
(CancelRequest request) Cancel a task.final CancelResponse
Cancel a task.get
(GetTasksRequest request) Get task information.final GetTasksResponse
Get task information.list()
Get all tasks.list
(ListRequest request) Get all tasks.final 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
-
ElasticsearchTasksClient
-
ElasticsearchTasksClient
public ElasticsearchTasksClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchTasksClient>
-
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.- Throws:
IOException
ElasticsearchException
- See Also:
-
cancel
public final CancelResponse cancel(Function<CancelRequest.Builder, ObjectBuilder<CancelRequest>> fn) throws IOException, ElasticsearchExceptionCancel 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
- Throws:
IOException
ElasticsearchException
- 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.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
Get task information. Get information about a task currently running in the cluster.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public final GetTasksResponse get(Function<GetTasksRequest.Builder, ObjectBuilder<GetTasksRequest>> fn) throws IOException, ElasticsearchExceptionGet task information. Get information about a task currently running in the cluster.- Parameters:
fn
- a function that initializes a builder to create theGetTasksRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
list
Get all tasks. Get information about the tasks currently running on one or more nodes in the cluster.- Throws:
IOException
ElasticsearchException
- See Also:
-
list
public final ListResponse list(Function<ListRequest.Builder, ObjectBuilder<ListRequest>> fn) throws IOException, ElasticsearchExceptionGet 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
- Throws:
IOException
ElasticsearchException
- See Also:
-
list
Get all tasks. Get information about the tasks currently running on one or more nodes in the cluster.- Throws:
IOException
ElasticsearchException
- See Also:
-