in meecrowave-core/src/main/java/org/apache/meecrowave/watching/ReloadOnChangeController.java [90:118]
public void close() {
if (!running) {
return;
}
running = false;
final long waitMs = bouncing * 2 + 5000 /*margin if redeploying, we can make it configurable later*/;
if (bouncer != null) {
try {
bouncer.join(waitMs);
} catch (final InterruptedException e) {
Thread.interrupted();
}
}
if (watcher != null) {
try {
watcher.join(waitMs);
} catch (final InterruptedException e) {
Thread.interrupted();
}
}
if (watchService != null) {
try {
watchService.close();
} catch (final IOException ex) {
new LogFacade(ReloadOnChangeController.class.getName())
.warn(ex.getMessage(), ex);
}
}
}