@Override public void transition( ServiceController<? extends PaintFrame> controller, Transition transition) { switch (transition) { case REMOVING_to_REMOVED: container.shutdown(); break; default: break; } } });
@Override public void asyncCancel(final boolean interruptionDesired) { container.shutdown(); container.addTerminateListener(new ServiceContainer.TerminateListener() { @Override public void handleTermination(final Info info) { setCancelled(); } }); }
@Override public void run() { final ServiceContainer serviceContainer = CurrentServiceContainer.getServiceContainer(); if(serviceContainer != null) { serviceContainer.shutdown(); } } }));
@Override public void asyncCancel(final boolean interruptionDesired) { container.shutdown(); container.addTerminateListener(new ServiceContainer.TerminateListener() { @Override public void handleTermination(final Info info) { setCancelled(); } }); }
public void stop() { this.serviceContainer.shutdown(); try { this.serviceContainer.awaitTermination(); } catch (InterruptedException e) { log.error("Interrupted before all services shutdown.", e); } }
@Override public void asyncCancel(final boolean interruptionDesired) { container.shutdown(); container.addTerminateListener(new ServiceContainer.TerminateListener() { @Override public void handleTermination(final Info info) { setCancelled(); } }); }
@Override public void asyncCancel(final boolean interruptionDesired) { container.shutdown(); container.addTerminateListener(new ServiceContainer.TerminateListener() { @Override public void handleTermination(final Info info) { setCancelled(); } }); }
/** * Stops the service container and cleans up all file system resources. * * @throws Exception */ public void stop() throws Exception { final CountDownLatch latch = new CountDownLatch(1); this.serviceContainer.addTerminateListener(info -> latch.countDown()); this.serviceContainer.shutdown(); latch.await(); executor.submit(new Runnable() { @Override public void run() { TempFileManager.deleteRecursively(tmpDir); } }); executor.shutdown(); }
/** * Stops the service container and cleans up all file system resources. * * @throws Exception */ public void stop() throws Exception { final CountDownLatch latch = new CountDownLatch(1); this.serviceContainer.addTerminateListener(info -> latch.countDown()); this.serviceContainer.shutdown(); latch.await(); executor.submit(new Runnable() { @Override public void run() { TempFileManager.deleteRecursively(tmpDir); } }); executor.shutdown(); }
public void stop() throws Exception { final CountDownLatch latch = new CountDownLatch(1); this.serviceContainer.addTerminateListener(info -> latch.countDown()); this.serviceContainer.shutdown(); latch.await(); this.deployer.stop(); this.serviceContainer = null; this.client = null; this.deployer = null; }
public void stop() throws Exception { final CountDownLatch latch = new CountDownLatch(1); this.serviceContainer.addTerminateListener(info -> latch.countDown()); this.serviceContainer.shutdown(); latch.await(); this.deployer.stop(); this.serviceContainer = null; this.client = null; this.deployer = null; }
/** * Stops the service container and cleans up all file system resources. * * @throws Exception */ public void stop() throws Exception { final CountDownLatch latch = new CountDownLatch(1); this.serviceContainer.addTerminateListener(info -> latch.countDown()); this.serviceContainer.shutdown(); latch.await(); executor.submit(new Runnable() { @Override public void run() { TempFileManager.deleteRecursively(tmpDir); } }); executor.shutdown(); }
@Override public void shutdown() { if (container != null) { container.shutdown(); try { container.awaitTermination(5, TimeUnit.SECONDS); } catch (InterruptedException e) { e.printStackTrace(); } container = null; if (legacyServices != null) { for (T legacyService: legacyServices.values()) { legacyService.shutdown(); } legacyServices.clear(); } } }
public void stop() throws Exception { final CountDownLatch latch = new CountDownLatch(1); this.serviceContainer.addTerminateListener(new ServiceContainer.TerminateListener() { @Override public void handleTermination(Info info) { latch.countDown(); } }); this.serviceContainer.shutdown(); latch.await(); this.deployer.stop(); this.serviceContainer = null; this.client = null; this.deployer = null; }
serviceContainer.shutdown(); serviceContainer.awaitTermination(); } catch (RuntimeException rte) {
public void run() { try { try { boot(new BootContext() { public ServiceTarget getServiceTarget() { return target; } }); } finally { processState.setRunning(); } } catch (Throwable t) { container.shutdown(); if (t instanceof StackOverflowError) { ROOT_LOGGER.errorBootingContainer(t, bootStackSize, BOOT_STACK_SIZE_PROPERTY); } else { ROOT_LOGGER.errorBootingContainer(t); } } finally { bootThreadDone(); } } }, "Controller Boot Thread", bootStackSize);
public void run() { try { try { boot(new BootContext() { public ServiceTarget getServiceTarget() { return target; } }); } finally { processState.setRunning(); } } catch (Throwable t) { container.shutdown(); if (t instanceof StackOverflowError) { ROOT_LOGGER.errorBootingContainer(t, bootStackSize, BOOT_STACK_SIZE_PROPERTY); } else { ROOT_LOGGER.errorBootingContainer(t); } } finally { bootThreadDone(); } } }, "Controller Boot Thread", bootStackSize);
public void run() { try { try { boot(new BootContext() { public ServiceTarget getServiceTarget() { return target; } }); } finally { processState.setRunning(); } } catch (Throwable t) { container.shutdown(); if (t instanceof StackOverflowError) { ROOT_LOGGER.errorBootingContainer(t, bootStackSize, BOOT_STACK_SIZE_PROPERTY); } else { ROOT_LOGGER.errorBootingContainer(t); } } finally { bootThreadDone(); } } }, "Controller Boot Thread", bootStackSize);
public void run() { try { try { boot(new BootContext() { public ServiceTarget getServiceTarget() { return target; } }); } finally { processState.setRunning(); } } catch (Throwable t) { container.shutdown(); if (t instanceof StackOverflowError) { ROOT_LOGGER.errorBootingContainer(t, bootStackSize, BOOT_STACK_SIZE_PROPERTY); } else { ROOT_LOGGER.errorBootingContainer(t); } } finally { bootThreadDone(); } } }, "Controller Boot Thread", bootStackSize);