Class ElasticsearchWatcherClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchWatcherClient>
co.elastic.clients.elasticsearch.watcher.ElasticsearchWatcherClient
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ElasticsearchWatcherClient
extends ApiClient<ElasticsearchTransport,ElasticsearchWatcherClient>
Client for the watcher namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchWatcherClient(ElasticsearchTransport transport) ElasticsearchWatcherClient(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionackWatch(AckWatchRequest request) Acknowledges a watch, manually throttling the execution of the watch's actions.final AckWatchResponseAcknowledges a watch, manually throttling the execution of the watch's actions.activateWatch(ActivateWatchRequest request) Activates a currently inactive watch.final ActivateWatchResponseActivates a currently inactive watch.deactivateWatch(DeactivateWatchRequest request) Deactivates a currently active watch.final DeactivateWatchResponseDeactivates a currently active watch.deleteWatch(DeleteWatchRequest request) Removes a watch from Watcher.final DeleteWatchResponseRemoves a watch from Watcher.Forces the execution of a stored watch.executeWatch(ExecuteWatchRequest request) Forces the execution of a stored watch.final ExecuteWatchResponseForces the execution of a stored watch.getWatch(GetWatchRequest request) Retrieves a watch by its ID.final GetWatchResponseRetrieves a watch by its ID.putWatch(PutWatchRequest request) Creates a new watch, or updates an existing one.final PutWatchResponseCreates a new watch, or updates an existing one.Retrieves stored watches.queryWatches(QueryWatchesRequest request) Retrieves stored watches.final QueryWatchesResponseRetrieves stored watches.start()Starts Watcher if it is not already running.stats()Retrieves the current Watcher metrics.stats(WatcherStatsRequest request) Retrieves the current Watcher metrics.final WatcherStatsResponseRetrieves the current Watcher metrics.stop()Stops Watcher if it is running.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
-
ElasticsearchWatcherClient
-
ElasticsearchWatcherClient
public ElasticsearchWatcherClient(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,ElasticsearchWatcherClient>
-
ackWatch
public AckWatchResponse ackWatch(AckWatchRequest request) throws IOException, ElasticsearchException Acknowledges a watch, manually throttling the execution of the watch's actions.- Throws:
IOExceptionElasticsearchException- See Also:
-
ackWatch
public final AckWatchResponse ackWatch(Function<AckWatchRequest.Builder, ObjectBuilder<AckWatchRequest>> fn) throws IOException, ElasticsearchExceptionAcknowledges a watch, manually throttling the execution of the watch's actions.- Parameters:
fn- a function that initializes a builder to create theAckWatchRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
activateWatch
public ActivateWatchResponse activateWatch(ActivateWatchRequest request) throws IOException, ElasticsearchException Activates a currently inactive watch.- Throws:
IOExceptionElasticsearchException- See Also:
-
activateWatch
public final ActivateWatchResponse activateWatch(Function<ActivateWatchRequest.Builder, ObjectBuilder<ActivateWatchRequest>> fn) throws IOException, ElasticsearchExceptionActivates a currently inactive watch.- Parameters:
fn- a function that initializes a builder to create theActivateWatchRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deactivateWatch
public DeactivateWatchResponse deactivateWatch(DeactivateWatchRequest request) throws IOException, ElasticsearchException Deactivates a currently active watch.- Throws:
IOExceptionElasticsearchException- See Also:
-
deactivateWatch
public final DeactivateWatchResponse deactivateWatch(Function<DeactivateWatchRequest.Builder, ObjectBuilder<DeactivateWatchRequest>> fn) throws IOException, ElasticsearchExceptionDeactivates a currently active watch.- Parameters:
fn- a function that initializes a builder to create theDeactivateWatchRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteWatch
public DeleteWatchResponse deleteWatch(DeleteWatchRequest request) throws IOException, ElasticsearchException Removes a watch from Watcher.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteWatch
public final DeleteWatchResponse deleteWatch(Function<DeleteWatchRequest.Builder, ObjectBuilder<DeleteWatchRequest>> fn) throws IOException, ElasticsearchExceptionRemoves a watch from Watcher.- Parameters:
fn- a function that initializes a builder to create theDeleteWatchRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
executeWatch
public ExecuteWatchResponse executeWatch(ExecuteWatchRequest request) throws IOException, ElasticsearchException Forces the execution of a stored watch.- Throws:
IOExceptionElasticsearchException- See Also:
-
executeWatch
public final ExecuteWatchResponse executeWatch(Function<ExecuteWatchRequest.Builder, ObjectBuilder<ExecuteWatchRequest>> fn) throws IOException, ElasticsearchExceptionForces the execution of a stored watch.- Parameters:
fn- a function that initializes a builder to create theExecuteWatchRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
executeWatch
Forces the execution of a stored watch.- Throws:
IOExceptionElasticsearchException- See Also:
-
getWatch
public GetWatchResponse getWatch(GetWatchRequest request) throws IOException, ElasticsearchException Retrieves a watch by its ID.- Throws:
IOExceptionElasticsearchException- See Also:
-
getWatch
public final GetWatchResponse getWatch(Function<GetWatchRequest.Builder, ObjectBuilder<GetWatchRequest>> fn) throws IOException, ElasticsearchExceptionRetrieves a watch by its ID.- Parameters:
fn- a function that initializes a builder to create theGetWatchRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putWatch
public PutWatchResponse putWatch(PutWatchRequest request) throws IOException, ElasticsearchException Creates a new watch, or updates an existing one.- Throws:
IOExceptionElasticsearchException- See Also:
-
putWatch
public final PutWatchResponse putWatch(Function<PutWatchRequest.Builder, ObjectBuilder<PutWatchRequest>> fn) throws IOException, ElasticsearchExceptionCreates a new watch, or updates an existing one.- Parameters:
fn- a function that initializes a builder to create thePutWatchRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
queryWatches
public QueryWatchesResponse queryWatches(QueryWatchesRequest request) throws IOException, ElasticsearchException Retrieves stored watches.- Throws:
IOExceptionElasticsearchException- See Also:
-
queryWatches
public final QueryWatchesResponse queryWatches(Function<QueryWatchesRequest.Builder, ObjectBuilder<QueryWatchesRequest>> fn) throws IOException, ElasticsearchExceptionRetrieves stored watches.- Parameters:
fn- a function that initializes a builder to create theQueryWatchesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
queryWatches
Retrieves stored watches.- Throws:
IOExceptionElasticsearchException- See Also:
-
start
Starts Watcher if it is not already running.- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
public WatcherStatsResponse stats(WatcherStatsRequest request) throws IOException, ElasticsearchException Retrieves the current Watcher metrics.- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
public final WatcherStatsResponse stats(Function<WatcherStatsRequest.Builder, ObjectBuilder<WatcherStatsRequest>> fn) throws IOException, ElasticsearchExceptionRetrieves the current Watcher metrics.- Parameters:
fn- a function that initializes a builder to create theWatcherStatsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
Retrieves the current Watcher metrics.- Throws:
IOExceptionElasticsearchException- See Also:
-
stop
Stops Watcher if it is running.- Throws:
IOExceptionElasticsearchException- See Also:
-