Package org.elasticsearch.client
Class WatcherClient
java.lang.Object
org.elasticsearch.client.WatcherClient
public final class WatcherClient
extends java.lang.Object
-
Method Summary
-
Method Details
-
startWatchService
public AcknowledgedResponse startWatchService(StartWatchServiceRequest request, RequestOptions options) throws java.io.IOExceptionStart the watch service See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
startWatchServiceAsync
public Cancellable startWatchServiceAsync(StartWatchServiceRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously start the watch service See the docs for more.- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- cancellable that may be used to cancel the request
-
stopWatchService
public AcknowledgedResponse stopWatchService(StopWatchServiceRequest request, RequestOptions options) throws java.io.IOExceptionStop the watch service See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
stopWatchServiceAsync
public Cancellable stopWatchServiceAsync(StopWatchServiceRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously stop the watch service See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- cancellable that may be used to cancel the request
-
putWatch
public PutWatchResponse putWatch(PutWatchRequest request, RequestOptions options) throws java.io.IOExceptionPut a watch into the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putWatchAsync
public Cancellable putWatchAsync(PutWatchRequest request, RequestOptions options, ActionListener<PutWatchResponse> listener)Asynchronously put a watch into the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getWatch
public GetWatchResponse getWatch(GetWatchRequest request, RequestOptions options) throws java.io.IOExceptionGets a watch from the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getWatchAsync
public Cancellable getWatchAsync(GetWatchRequest request, RequestOptions options, ActionListener<GetWatchResponse> listener)Asynchronously gets a watch into the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deactivateWatch
public DeactivateWatchResponse deactivateWatch(DeactivateWatchRequest request, RequestOptions options) throws java.io.IOExceptionDeactivate an existing watch See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
deactivateWatchAsync
public Cancellable deactivateWatchAsync(DeactivateWatchRequest request, RequestOptions options, ActionListener<DeactivateWatchResponse> listener)Asynchronously deactivate an existing watch See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteWatch
public DeleteWatchResponse deleteWatch(DeleteWatchRequest request, RequestOptions options) throws java.io.IOExceptionDeletes a watch from the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
deleteWatchAsync
public Cancellable deleteWatchAsync(DeleteWatchRequest request, RequestOptions options, ActionListener<DeleteWatchResponse> listener)Asynchronously deletes a watch from the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
ackWatch
public AckWatchResponse ackWatch(AckWatchRequest request, RequestOptions options) throws java.io.IOExceptionAcknowledges a watch. See the docs for more information.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- if there is a problem sending the request or parsing back the response
-
ackWatchAsync
public Cancellable ackWatchAsync(AckWatchRequest request, RequestOptions options, ActionListener<AckWatchResponse> listener)Asynchronously acknowledges a watch. See the docs for more information.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon completion of the request- Returns:
- cancellable that may be used to cancel the request
-
activateWatch
public ActivateWatchResponse activateWatch(ActivateWatchRequest request, RequestOptions options) throws java.io.IOExceptionActivate a watch from the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
activateWatchAsync
public Cancellable activateWatchAsync(ActivateWatchRequest request, RequestOptions options, ActionListener<ActivateWatchResponse> listener)Asynchronously activates a watch from the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
executeWatch
public ExecuteWatchResponse executeWatch(ExecuteWatchRequest request, RequestOptions options) throws java.io.IOExceptionExecute a watch on the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- if there is a problem sending the request or parsing the response
-
executeWatchAsync
public Cancellable executeWatchAsync(ExecuteWatchRequest request, RequestOptions options, ActionListener<ExecuteWatchResponse> listener)Asynchronously execute a watch on the cluster See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notifed upon request completion- Returns:
- cancellable that may be used to cancel the request
-
watcherStats
public WatcherStatsResponse watcherStats(WatcherStatsRequest request, RequestOptions options) throws java.io.IOExceptionGet the watcher stats See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
watcherStatsAsync
public Cancellable watcherStatsAsync(WatcherStatsRequest request, RequestOptions options, ActionListener<WatcherStatsResponse> listener)Asynchronously get the watcher stats See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-