commit | ed1c9782332b08acbb246272ea96068cde5d7daf | [log] [tgz] |
---|---|---|
author | Till Westmann <till@westmann.org> | Wed Oct 16 18:00:12 2013 -0700 |
committer | Till Westmann <till@westmann.org> | Wed Oct 16 18:00:12 2013 -0700 |
tree | 1b56fef82b742b6909d6fb5a28b167febccbb38d | |
parent | 4b0122bc9e5dce2ea18cf8eb5ba7df85f652d27a [diff] |
shutdown ExecutorService when shutting down LogManager
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixThreadExecutor.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixThreadExecutor.java index edd4b2a..fb87f5e 100644 --- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixThreadExecutor.java +++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/api/AsterixThreadExecutor.java
@@ -36,4 +36,8 @@ public Future<Object> submit(Callable command) { return (Future<Object>) executorService.submit(command); } + + public void shutdown() { + executorService.shutdown(); + } }
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java index 4667c80..aef7860 100644 --- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java +++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogManager.java
@@ -294,6 +294,7 @@ if (LOGGER.isLoggable(Level.INFO)) { LOGGER.info("LogFlusher thread is terminated."); } + AsterixThreadExecutor.INSTANCE.shutdown(); } private long deleteAllLogFiles() {