public void shutdown(long waitMs) throws IOException { ioReactor.shutdown(waitMs); }
public void shutdown() throws IOException { ioReactor.shutdown(); }
@Override protected void doStop() throws Exception { ioReactor.shutdown(); runner.join(); super.doStop(); }
public void shutdown(final long waitMs) throws IOException { if (this.isShutDown.compareAndSet(false, true)) { fireCallbacks(); this.lock.lock(); try { for (final SessionRequest sessionRequest: this.pending) { sessionRequest.cancel(); } for (final E entry: this.available) { entry.close(); } for (final E entry: this.leased) { entry.close(); } for (final RouteSpecificPool<T, C, E> pool: this.routeToPool.values()) { pool.shutdown(); } this.routeToPool.clear(); this.leased.clear(); this.pending.clear(); this.available.clear(); this.leasingRequests.clear(); this.ioreactor.shutdown(waitMs); } finally { this.lock.unlock(); } } }
public void shutdown(final long waitMs) throws IOException { if (this.isShutDown.compareAndSet(false, true)) { fireCallbacks(); this.lock.lock(); try { for (final SessionRequest sessionRequest: this.pending) { sessionRequest.cancel(); } for (final E entry: this.available) { entry.close(); } for (final E entry: this.leased) { entry.close(); } for (final RouteSpecificPool<T, C, E> pool: this.routeToPool.values()) { pool.shutdown(); } this.routeToPool.clear(); this.leased.clear(); this.pending.clear(); this.available.clear(); this.leasingRequests.clear(); this.ioreactor.shutdown(waitMs); } finally { this.lock.unlock(); } } }
connFuture.get(); System.out.println("Done"); ioReactor.shutdown();
/** * Shuts down the active {@link ViewConnection}. * * @return false if a shutdown attempt is already in progress, true otherwise. * @throws IOException if the reactor cannot be shut down properly. */ public boolean shutdown() throws IOException { if (!running) { getLogger().info("Suppressing duplicate attempt to shut down"); return false; } running = false; ioReactor.shutdown(); try { reactorThread.join(0); } catch (InterruptedException ex) { getLogger().error("Interrupt " + ex + " received while waiting for " + "view thread to shut down."); } return true; }
/** * Shutdown the {@link ClusterManager}. * * @return if success, false if not running or already shutting down. */ public boolean shutdown() { if (!running) { getLogger().info("Suppressing duplicate attempt to shut down"); return false; } running = false; try { ioReactor.shutdown(); } catch (IOException e) { getLogger().info("Got exception while shutting down", e); } try { reactorThread.join(0); } catch (InterruptedException ex) { getLogger().error("Interrupt " + ex + " received while waiting for " + "view thread to shut down."); } return true; }