Package de.sflan.file.symlinker.schedule

Examples of de.sflan.file.symlinker.schedule.FolderWatcher


    logger.info("Reading configuration ...");
    Config config = readConfig(configPath);
   
    logger.info("Validating configuration ...");
    validateConfig(config);
    FolderWatcher watcher = new FolderWatcher(config);

    /*
     * start the watcher
     */
    watcher.start();

    /*
     * run as long we have no shutdown file
     */
    try {
      while (!shutdownFileExists()) {
        try {
          Thread.sleep(TimeUnit.SECONDS.toMillis(20));
        } catch (InterruptedException e) {
          /*
           * ignore and continue
           */
        }

      }
    } finally {
      logger.info("Shutting down");
      /*
       * stop the watcher and end
       */
      watcher.stop();
      logger.info("Done");
    }

  }
 
View Full Code Here

TOP

Related Classes of de.sflan.file.symlinker.schedule.FolderWatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.