/** * Stop the platform manager */ @Override public void stop() { manager.stop(); } }
@Override public void stop(StopContext context) { this.platformManager.stop(); }
@Override public void stop() throws Exception { if (!isStarted) { return; } eventBus.unregisterHandler(vertxAddress, handler); platformManager.stop(); System.clearProperty("vertx.clusterManagerFactory"); isStarted = false; ActiveMQVertxLogger.LOGGER.debug(connectorName + ": stopped"); }
@Override public void stop() throws Exception { if (!this.isStarted) { return; } ActiveMQVertxLogger.LOGGER.debug(connectorName + ": receive shutdown request"); this.queue.removeConsumer(this); this.platformManager.stop(); System.clearProperty("vertx.clusterManagerFactory"); this.isStarted = false; ActiveMQVertxLogger.LOGGER.debug(connectorName + ": stopped"); }
public void run() { final CountDownLatch latch = new CountDownLatch(1); mgr.undeployAll(new Handler<AsyncResult<Void>>() { public void handle(AsyncResult<Void> res) { latch.countDown(); } }); try { if (!latch.await(30, TimeUnit.SECONDS)) { log.error("Timed out waiting to undeploy"); } } catch (InterruptedException e) { throw new IllegalStateException(e); } // Now shutdown the platform manager mgr.stop(); // Run any extra tasks Runnable task; while ((task = afterShutdownTasks.poll()) != null) { try { task.run(); } catch (Throwable t) { log.error("Failed to run after shutdown task", t); } } } });