A timer-based trigger for reloading checks.
An instance of this class is constructed with a reference to a {@link ReloadingController} and a period. After calling the {@code start()}method a periodic task is started which calls {@link ReloadingController#checkForReloading(Object)} on the associatedreloading controller. This way changes on a configuration source can be detected without client code having to poll actively. The {@code ReloadingController} will perform its checks and generates events ifit detects the need for a reloading operation.
Triggering of the controller can be disabled by calling the {@code stop()}method and later be resumed by calling {@code start()} again. When thetrigger is no more needed its {@code shutdown()} method should be called.
When creating an instance a {@code ScheduledExecutorService} can be providedwhich is then used by the object. Otherwise, a default executor service is created and used. When shutting down this object it can be specified whether the {@code ScheduledExecutorService} should be shut down, too.
@version $Id: PeriodicReloadingTrigger.java 1624601 2014-09-12 18:04:36Z oheger $
@since 2.0
@see ReloadingController