Class ChangesMonitor

    • Constructor Detail

      • ChangesMonitor

        public ChangesMonitor​(RevisionGetter getter,
                              int period)
        Creates a monitor instance. In the end of the life cycle, release() should be called to stop a monitoring thread and release all instances of task and objects, those are held by this monitor.
        Parameters:
        getter - for retrieving revisions of the monitored repository
        period - the comparison period of revisions in seconds
    • Method Detail

      • setListener

        public void setListener​(Listener listener)
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • fireOnChange

        public void fireOnChange()
        Call onChange() method in the listener;
      • release

        public void release()
        Stop the monitor.
        See Also:
        ExecutorService