类 TasksClient
java.lang.Object
org.easysearch.client.TasksClient
public final class TasksClient
extends java.lang.Object
A wrapper for the
RestHighLevelClient that provides methods for accessing the Tasks API.
-
方法概要
修饰符和类型 方法 说明 CancelTasksResponsecancel(CancelTasksRequest cancelTasksRequest, org.easysearch.client.RequestOptions options)Cancel one or more cluster tasks using the Task Management API.org.easysearch.client.CancellablecancelAsync(CancelTasksRequest cancelTasksRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<CancelTasksResponse> listener)Asynchronously cancel one or more cluster tasks using the Task Management API.java.util.Optional<GetTaskResponse>get(GetTaskRequest request, org.easysearch.client.RequestOptions options)Get a task using the Task Management API.org.easysearch.client.CancellablegetAsync(GetTaskRequest request, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<java.util.Optional<GetTaskResponse>> listener)Get a task using the Task Management API.org.easysearch.action.admin.cluster.node.tasks.list.ListTasksResponselist(org.easysearch.action.admin.cluster.node.tasks.list.ListTasksRequest request, org.easysearch.client.RequestOptions options)Get current tasks using the Task Management API.org.easysearch.client.CancellablelistAsync(org.easysearch.action.admin.cluster.node.tasks.list.ListTasksRequest request, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.admin.cluster.node.tasks.list.ListTasksResponse> listener)Asynchronously get current tasks using the Task Management API.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
方法详细资料
-
list
public org.easysearch.action.admin.cluster.node.tasks.list.ListTasksResponse list(org.easysearch.action.admin.cluster.node.tasks.list.ListTasksRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionGet current tasks using the Task Management API. See Task Management API on elastic.co- 参数:
request- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
listAsync
public org.easysearch.client.Cancellable listAsync(org.easysearch.action.admin.cluster.node.tasks.list.ListTasksRequest request, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.admin.cluster.node.tasks.list.ListTasksResponse> listener)Asynchronously get current tasks using the Task Management API. See Task Management API on elastic.co- 参数:
request- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-
get
public java.util.Optional<GetTaskResponse> get(GetTaskRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionGet a task using the Task Management API. See Task Management API on elastic.co- 参数:
request- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getAsync
public org.easysearch.client.Cancellable getAsync(GetTaskRequest request, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<java.util.Optional<GetTaskResponse>> listener)Get a task using the Task Management API. See Task Management API on elastic.co- 参数:
request- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- an actionlistener that takes an optional response (404s are returned as an empty Optional)- 返回:
- cancellable that may be used to cancel the request
-
cancel
public CancelTasksResponse cancel(CancelTasksRequest cancelTasksRequest, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionCancel one or more cluster tasks using the Task Management API. See Task Management API on elastic.co- 参数:
cancelTasksRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
cancelAsync
public org.easysearch.client.Cancellable cancelAsync(CancelTasksRequest cancelTasksRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<CancelTasksResponse> listener)Asynchronously cancel one or more cluster tasks using the Task Management API. See Task Management API on elastic.co- 参数:
cancelTasksRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-