Class RepositoryWatcher

  • All Implemented Interfaces:
    Runnable

    public class RepositoryWatcher
    extends Object
    implements Runnable

    A service that watches for modified/deleted files in a Site's www-directory (see SiteProperties.WWW_DIR) using a WatchService.

    If caching for the site is active (see SiteProperties.CACHE_ENABLED), cache entries for the modified/deleted files are removed from the cache. Since there could be some forwarding rules defined in the site's urlrewrite.xml, it is also necessary to parse these rules and remove the 'aliases' from the cache.
    Author:
    Matthias Müller
    • Constructor Detail

      • RepositoryWatcher

        public RepositoryWatcher​(Site site,
                                 String jspExtension,
                                 String ruleSourceSuffix)
    • Method Detail

      • run

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

        public boolean needsToBeWatched()