Class ElasticsearchTasksClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchTasksClient>
co.elastic.clients.elasticsearch.tasks.ElasticsearchTasksClient
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ElasticsearchTasksClient
extends ApiClient<ElasticsearchTransport,ElasticsearchTasksClient>
Client for the tasks namespace.
-
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()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.final CancelResponseCancels a task, if it can be cancelled through an API.get(GetTasksRequest request) Returns information about a task.final GetTasksResponseReturns information about a task.list()Returns a list of tasks.list(ListRequest request) Returns a list of tasks.final ListResponseReturns a list of 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:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<ElasticsearchTransport,ElasticsearchTasksClient>
-
cancel
Cancels a task, if it can be cancelled through an API.- Throws:
IOExceptionElasticsearchException- See Also:
-
cancel
public final CancelResponse cancel(Function<CancelRequest.Builder, ObjectBuilder<CancelRequest>> fn) throws IOException, ElasticsearchExceptionCancels a task, if it can be cancelled through an API.- Parameters:
fn- a function that initializes a builder to create theCancelRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
cancel
Cancels a task, if it can be cancelled through an API.- Throws:
IOExceptionElasticsearchException- See Also:
-
get
Returns information about a task.- Throws:
IOExceptionElasticsearchException- See Also:
-
get
public final GetTasksResponse get(Function<GetTasksRequest.Builder, ObjectBuilder<GetTasksRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about a task.- Parameters:
fn- a function that initializes a builder to create theGetTasksRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
list
Returns a list of tasks.- Throws:
IOExceptionElasticsearchException- See Also:
-
list
public final ListResponse list(Function<ListRequest.Builder, ObjectBuilder<ListRequest>> fn) throws IOException, ElasticsearchExceptionReturns a list of tasks.- Parameters:
fn- a function that initializes a builder to create theListRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
list
Returns a list of tasks.- Throws:
IOExceptionElasticsearchException- See Also:
-