@Override public Outcome handle(Throwable failure) { CountDownLatch latch = new CountDownLatch(1); FileSystemWatcher watcher = this.fileSystemWatcherFactory.getFileSystemWatcher(); watcher.addSourceFolders( new ClassPathFolders(Restarter.getInstance().getInitialUrls())); watcher.addListener(new Listener(latch)); watcher.start(); try { latch.await(); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } return Outcome.RETRY; }
@Override public Outcome handle(Throwable failure) { CountDownLatch latch = new CountDownLatch(1); FileSystemWatcher watcher = this.fileSystemWatcherFactory.getFileSystemWatcher(); watcher.addSourceFolders( new ClassPathFolders(Restarter.getInstance().getInitialUrls())); watcher.addListener(new Listener(latch)); watcher.start(); try { latch.await(); } catch (InterruptedException ex) { // Ignore } return Outcome.RETRY; }
@Override public Outcome handle(Throwable failure) { failure.printStackTrace(); CountDownLatch latch = new CountDownLatch(1); FileSystemWatcher watcher = this.fileSystemWatcherFactory.getFileSystemWatcher(); watcher.addSourceFolders( new ClassPathFolders(Restarter.getInstance().getInitialUrls())); watcher.addListener(new Listener(latch)); watcher.start(); try { latch.await(); } catch (InterruptedException ex) { // Ignore } return Outcome.RETRY; }