@Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { return delegate.awaitTermination(timeout, unit); }
!executorService.awaitTermination( lookupCoordinatorManagerConfig.getHostTimeout().getMillis() * 10, TimeUnit.MILLISECONDS
/** Can just use stop() here instead of stopAsync/awaitTerminated: PeerGroup is no longer a Guava service. */ @Deprecated public void awaitTerminated() { try { executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Can just use stop() here instead of stopAsync/awaitTerminated: PeerGroup is no longer a Guava service. */ @Deprecated public void awaitTerminated() { try { executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Can just use stop() here instead of stopAsync/awaitTerminated: PeerGroup is no longer a Guava service. */ @Deprecated public void awaitTerminated() { try { executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Can just use stop() here instead of stopAsync/awaitTerminated: PeerGroup is no longer a Guava service. */ @Deprecated public void awaitTerminated() { try { executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Does a blocking stop */ public void stop() { try { stopAsync(); log.info("Awaiting PeerGroup shutdown ..."); executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } }
public void disposeAndWait () throws InterruptedException { dispose (); this.executor.awaitTermination ( Long.MAX_VALUE, TimeUnit.MILLISECONDS ); }
/** Does a blocking stop */ public void stop() { try { stopAsync(); log.info("Awaiting PeerGroup shutdown ..."); executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Does a blocking stop */ public void stop() { try { stopAsync(); log.info("Awaiting PeerGroup shutdown ..."); executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** Does a blocking stop */ public void stop() { try { stopAsync(); log.info("Awaiting PeerGroup shutdown ..."); executor.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** * <p>Stop the service</p> */ public void stopAndWait() { log.debug("Service {} stopping...", this.getClass().getSimpleName()); context.resetToStopped(); // Ensure downstream subscribers are purged HardwareWalletEvents.unsubscribeAll(); MessageEvents.unsubscribeAll(); try { clientMonitorService.awaitTermination(1, TimeUnit.SECONDS); } catch (InterruptedException e) { log.warn("Client monitor thread did not terminate within the allowed time"); } stopped = true; }
void shutdownExecutor() { LOGGER.trace("Shutting down executor.."); final ListeningScheduledExecutorService ex = realtimeState.executor; if (ex != null) { ex.shutdown(); // in case the future could not be cancelled before, do it now final ListenableScheduledFuture<?> fut = realtimeState.schedulerFuture; if (fut != null && !fut.isDone()) { realtimeState.cancelTask(); } try { ex.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS); } catch (final InterruptedException e) { throw new IllegalStateException(e); } LOGGER.trace("Executor shutdown."); } verifyNotNull(affinityLock).release(); }
while (!this.executorService.isTerminated() && wait-- > 0) { try { this.executorService.awaitTermination(100, TimeUnit.MILLISECONDS); } catch (InterruptedException e) {
!executorService.awaitTermination( lookupCoordinatorManagerConfig.getHostTimeout().getMillis() * 10, TimeUnit.MILLISECONDS
!executorService.awaitTermination( lookupCoordinatorManagerConfig.getHostTimeout().getMillis() * 10, TimeUnit.MILLISECONDS