Class ResourceWatcherService

java.lang.Object
org.opensearch.watcher.ResourceWatcherService
All Implemented Interfaces:
Closeable, AutoCloseable

@PublicApi(since="1.0.0") public class ResourceWatcherService extends Object implements Closeable
Generic resource watcher service

Other opensearch services can register their resource watchers with this service using add(ResourceWatcher) method. This service will call ResourceWatcher.checkAndNotify() method of all registered watcher periodically. The frequency of checks can be specified using resource.reload.interval setting, which defaults to 60s. The service can be disabled by setting resource.reload.enabled setting to false.

Opensearch.api: