public static void release() { if (instance != null) { instance.stop(); } instance = null; }
@Override public void close() { if (closed.compareAndSet(false, true)) { try { channelManager.close(); } catch (Throwable t) { LOGGER.warn("Unexpected error on ChannelManager close", t); } if (allowStopNettyTimer) { try { nettyTimer.stop(); } catch (Throwable t) { LOGGER.warn("Unexpected error on HashedWheelTimer close", t); } } } }
@Override protected void doStop(Listener listener) throws Throwable { pool.close(); workerGroup.shutdownGracefully(); timer.stop(); listener.onSuccess(); } }
@Override public void shutdown() throws PulsarClientException { try { lookup.close(); cnxPool.close(); timer.stop(); externalExecutorProvider.shutdownNow(); conf.getAuthentication().close(); } catch (Throwable t) { log.warn("Failed to shutdown Pulsar client", t); throw new PulsarClientException(t); } }
_timer.stop(); LOGGER.info("Timer shut down !!");
/** * Hook invoked when the cluster is shutting down after a call to {@link Cluster#close()}. * * <p>This is guaranteed to be called only after all connections have been individually closed, * and their channels closed, and only once per {@link Timer} instance. * * <p>This gives the implementor a chance to close the {@link Timer} properly, if required. * * <p>The default implementation calls a {@link Timer#stop()} of the passed {@link Timer} * instance. * * <p>Implementation note: if the {@link Timer} instance is being shared, or used for other * purposes than to schedule actions for the current cluster, than it should not be stopped here; * subclasses would have to override this method accordingly to take the appropriate action. * * @param timer the timer used by the cluster being closed */ public void onClusterClose(Timer timer) { timer.stop(); } }
timer.stop();
@Override public void destroy() { if (timer != null) { timer.stop(); } }
@Override public void destroy() { if (timer != null) { timer.stop(); } }
@Override public void unsubscribe(SubscribeInfo subscribeInfo) { namingServiceTimer.stop(); }
@Override public void unsubscribe(RegisterInfo registerInfo) { namingServiceTimer.stop(); }
@Override public Set<Timeout> stop() { return this.timer.stop(); }
@Override public void unsubscribe(SubscribeInfo subscribeInfo) { namingServiceTimer.stop(); }
@Override public Set<Timeout> stop() { return this.timer.stop(); }
@Override public void close() { if (closed.compareAndSet(false, true)) { try { channelManager.close(); if (allowStopNettyTimer) nettyTimer.stop(); } catch (Throwable t) { LOGGER.warn("Unexpected error on close", t); } } }
@Override public void shutdown() { timer.stop(); client.close(); }
@Override public void shutdown() { timer.stop(); client.close(); }
@Override public void close() { if (closed.compareAndSet(false, true)) { try { channelManager.close(); if (allowStopNettyTimer) nettyTimer.stop(); } catch (Throwable t) { LOGGER.warn("Unexpected error on close", t); } } }
@Override public void shutdown() throws PulsarClientException { try { lookup.close(); cnxPool.close(); timer.stop(); externalExecutorProvider.shutdownNow(); conf.getAuthentication().close(); } catch (Throwable t) { log.warn("Failed to shutdown Pulsar client", t); throw new PulsarClientException(t); } }
public void shutdown() { this.watchdog.stopWatching(); ServletBridgeWebapp.get().destroy(); this.timer.stop(); this.allChannels.close().awaitUninterruptibly(); }