@Override public void close(boolean cleanup) throws Exception { Throwable exception = null; try { actorSystem.shutdown(); } catch (Throwable t) { exception = ExceptionUtils.firstOrSuppressed(t, exception); } try { artifactServer.stop(); } catch (Throwable t) { exception = ExceptionUtils.firstOrSuppressed(t, exception); } if (exception != null) { throw new FlinkException("Could not properly shut down the Mesos services.", exception); } } }
new Configuration(), new Some<scala.Tuple2<String, Object>>(new scala.Tuple2<String, Object>(addr.getHostAddress(), port))); as.shutdown();
@Override public void stop() { if (eventService != null) { eventService.shutdown(); } if (clusterService != null) { clusterService.shutdown(); } if (loadBalancingService != null && getNodeConfig().isZkEnabled()) { loadBalancingService.stop(); } if (operationsTransportService != null) { operationsTransportService.stop(); } if (akkaService != null) { akkaService.getActorSystem().shutdown(); } if (getNodeConfig().isZkEnabled()) { stopZk(); } LOG.info("Operations Service Stopped."); }
/** * Shut down actor system force. */ public static void shutDownActorSystemForce() { if (!actorSystem.isTerminated()) { logger.info("shutting down actor system..."); actorSystem.shutdown(); actorSystem.awaitTermination(timeOutDuration); logger.info("Actor system has been shut down."); } else { logger.info("Actor system has been terminated already. NO OP."); } }
actorSystem.shutdown();
public static void main(String[] args) throws Exception { ActorSystem _system = ActorSystem.create("FutureUsageExample"); ActorRef processOrder = _system.actorOf(new Props( ProcessOrderActor.class)); processOrder.tell(Integer.valueOf(456)); Thread.sleep(5000); _system.shutdown(); }
public static void main(String[] args) throws Exception { ActorSystem _system = ActorSystem.create("BecomeUnbecome"); ActorRef pingPongActor = _system .actorOf(new Props(PingPongActor.class)); pingPongActor.tell(PingPongActor.PING, pingPongActor); Thread.sleep(2000); _system.shutdown(); }
/** * destroy broker service */ public void destroy() { if (actorSystem != null) { actorSystem.shutdown(); } }
private void shutdownActorSystem(ActorSystem actorSystem) { // shut the actor system down actorSystem.shutdown(); try { // give it some time to complete the shutdown actorSystem.awaitTermination(timeout); } finally { // now let's crash the JVM System.exit(exitCode); } } }
@Override public boolean stop() { if (applicationSystemEnabled) { logger.info("Shutdown application default Akka system."); applicationSystem.shutdown(); applicationSystem.awaitTermination(); } return true; } }
@Override public void stopDispatching() { if (!dispatcherRunning) { throw new IllegalStateException("Dispatcher is not running yet"); } akkaSystem.shutdown(); setDispatcherRunning(false); }
private void shutdownActorSystem(ActorSystem actorSystem) { // shut the actor system down actorSystem.shutdown(); try { // give it some time to complete the shutdown actorSystem.awaitTermination(timeout); } finally { // now let's crash the JVM System.exit(exitCode); } } }
public void shutdown() { if (isLoaded()) { actorSystem.shutdown(); actorSystem.awaitTermination(); actorSystem = null; } }
public void shutdown() { if (isLoaded()) { actorSystem.shutdown(); actorSystem.awaitTermination(); actorSystem = null; } }
public static void main(String[] args) throws InterruptedException { System.out.println("Actor system create"); ActorSystem system = ActorSystem.create("system"); System.out.println("Actor system created"); ActorRef actor = system.actorOf(Props.create(SimpleActor.class)); System.out.println("Actor created"); actor.tell("Hello", ActorRef.noSender()); System.out.println("Wait 2 seconds"); TimeUnit.SECONDS.sleep(2); System.out.println("Shutting down"); system.shutdown(); }
@Override public void close() { LOG.info("Closing source"); if (receiverActorSystem != null) { receiverActor.tell(PoisonPill.getInstance(), ActorRef.noSender()); receiverActorSystem.shutdown(); } }
@Override public void postStop() { if (syncThread != null) { syncThread.disconnect(); try { syncThread.join(); } catch (Exception e) {} } getContext().system().shutdown(); log("Parameter server stopped"); }
public static void main(String[] args) { ActorSystem system = ActorSystem.create("system"); ActorRef actor = system.actorOf(Props.create(SimpleActor.class)); actor.tell("Hello", ActorRef.noSender()); system.shutdown(); }
@After public void afterTest() throws Exception { feederActorSystem.shutdown(); feederActorSystem.awaitTermination(); source.cancel(); sourceThread.join(); }