Interface Watcher

    • Method Detail

      • getListeners

        List<ConfigurationListener> getListeners()
        Returns the list of listeners for this configuration.
        Returns:
        The list of listeners.
      • modified

        void modified()
        Called when the configuration has been modified.
      • isModified

        boolean isModified()
        Periodically called to determine if the configuration has been modified.
        Returns:
        true if the configuration was modified, false otherwise.
      • getLastModified

        long getLastModified()
        Returns the time the source was last modified or 0 if it is not available.
        Returns:
        the time the source was last modified.
      • watching

        void watching​(Source source)
        Called when the Watcher is registered.
        Parameters:
        source - the Source that is being watched.
      • getSource

        Source getSource()
        Returns the Source being monitored.
        Returns:
        the Source.
      • newWatcher

        Watcher newWatcher​(Reconfigurable reconfigurable,
                           List<ConfigurationListener> listeners,
                           long lastModifiedMillis)
        Creates a new Watcher by copying the original and using the new Reconfigurable and listeners.
        Parameters:
        reconfigurable - The Reconfigurable.
        listeners - the listeners.
        lastModifiedMillis - The time the resource was last modified in milliseconds.
        Returns:
        A new Watcher.