@Deactivate private void deactivate() throws IOException { for (ServiceRegistration reg : regs){ reg.unregister(); } regs.clear(); if (statisticsProvider instanceof Closeable) { ((Closeable) statisticsProvider).close(); } new ExecutorCloser(executor).close(); }
@Deactivate private void deactivate() throws IOException { for (ServiceRegistration reg : regs){ reg.unregister(); } regs.clear(); if (statisticsProvider instanceof Closeable) { ((Closeable) statisticsProvider).close(); } new ExecutorCloser(executor).close(); }
@Deactivate private void deactivate() throws IOException { for (ServiceRegistration reg : regs){ reg.unregister(); } regs.clear(); if (statisticsProvider instanceof Closeable) { ((Closeable) statisticsProvider).close(); } new ExecutorCloser(executor).close(); }
@Override public void close() { LOG.info("Uploads in progress on close [{}]", map.size()); LOG.info("Uploads completed but not cleared from cache [{}]", attic.size()); LOG.info("Staging cache stats on close [{}]", cacheStats.cacheInfoAsString()); new ExecutorCloser(executor).close(); new ExecutorCloser(scheduledExecutor).close(); new ExecutorCloser(statsExecutor).close(); }
@Deactivate public void deactivate() { ScheduledExecutorService ses = getScheduler(); if (ses == null) { LOG.debug("No ScheduledExecutorService found"); } else { LOG.debug("Shutting down ScheduledExecutorService"); new ExecutorCloser(ses).close(); } }
@Override public void close() { LOG.info("Cache stats on close [{}]", cacheStats.cacheInfoAsString()); new ExecutorCloser(executor).close(); }
@Override public void close() { LOG.info("Cache stats on close [{}]", cacheStats.cacheInfoAsString()); new ExecutorCloser(executor).close(); }
/** * Closes the tracker and the underlying store. * * @throws IOException */ @Override public void close() throws IOException { store.close(); new ExecutorCloser(scheduler).close(); }
@Override public void shutdown() { statisticManager.dispose(); gcMonitorRegistration.unregister(); clock.close(); new ExecutorCloser(scheduledExecutor).close(); if (contentRepository instanceof Closeable) { IOUtils.closeQuietly((Closeable) contentRepository); } }
@Override public void shutdown() { statisticManager.dispose(); gcMonitorRegistration.unregister(); clock.close(); new ExecutorCloser(scheduledExecutor).close(); if (contentRepository instanceof Closeable) { IOUtils.closeQuietly((Closeable) contentRepository); } }
@Override protected void after() { try { store.close(); } finally { new ExecutorCloser(executor).close(); } }
@Test public void simple() throws Exception{ ExecutorService executorService = Executors.newSingleThreadExecutor(); assertFalse(executorService.isTerminated()); new ExecutorCloser(executorService).close(); assertTrue(executorService.isTerminated()); }
@After public void after() { new ExecutorCloser(executorService).close(); executorService.shutdown(); IndexDefinition.setDisableStoredIndexDefinition(false); }
@After public void shutDown(){ statsProvider.close(); new ExecutorCloser(executor).close(); }
@After public void shutDown(){ statsProvider.close(); new ExecutorCloser(executor).close(); }
@After public void shutDown(){ statsProvider.close(); new ExecutorCloser(executor).close(); }
@After public void shutDown(){ statsProvider.close(); new ExecutorCloser(executor).close(); }
@After public void tearDown() throws IOException { luceneIndexProvider.close(); new ExecutorCloser(executorService).close(); }
@After public void tearDown() throws IOException { luceneIndexProvider.close(); new ExecutorCloser(executorService).close(); nrtIndexFactory.close(); }