/** * Conditionally print a warning describing the failure * <p> * Signals run thread to stop. Messages are not printed if the thread or the distributed system * has already been instructed to terminate. * * @param message contextual string for the failure * @param exception underlying exception */ private void handleException(String message, Exception exception) { boolean unexpected = !quitting(); // If this was a surprise, print a warning. if (unexpected && !(exception instanceof CancelException)) { logger.warn(String.format("%s : %s : %s", new Object[] {this, message, exception}), exception); } // We can't shutdown the client updater just because of an exception. // Let the caller decide if we should continue running or not. }
private void waitForFailedUpdater() { boolean gotInterrupted = false; try { if (this.failedUpdater != null) { logger.info("{} is waiting for {} to complete.", new Object[] {this, this.failedUpdater}); while (this.failedUpdater.isAlive()) { if (quitting()) { return; } this.failedUpdater.join(5000); } } } catch (InterruptedException ignore) { gotInterrupted = true; // just bail, because I have not done anything yet } finally { if (!gotInterrupted && this.failedUpdater != null) { logger.info("{} has completed waiting for {}", new Object[] {this, this.failedUpdater}); this.failedUpdater = null; } } }
long tilt = System.currentTimeMillis() + MAX_CACHE_WAIT * 1000; for (;;) { if (quitting()) { logger.warn("{}: abandoned wait due to cancellation.", this); return false;
if (!quitting()) { logger.warn("{} connection was refused", this); if (!quitting()) { getSecurityLogger().warning(String.format("%s SSL negotiation failed. %s", new Object[] {this, ex})); if (!quitting()) { getSecurityLogger().warning( String.format( if (!quitting()) { logger.warn(String.format( "%s: Caught following exception while attempting to create a server-to-client communication socket and will exit: %s", if (!quitting()) { logger.warn("Unable to load the class: {}", e.getMessage()); if (!quitting()) { logger.warn(String.format( "%s: Caught following exception while attempting to create a server-to-client communication socket and will exit: %s",
if (isDebugEnabled && !quitting()) { logger.debug("Region named {} does not exist", regionName);
if (isDebugEnabled && !quitting()) { logger.debug("Region named {} does not exist", regionName);
if (!quitting()) { if (logger.isDebugEnabled()) { logger.debug("{}: Region named {} does not exist", this, regionName);
if (isDebugEnabled && !quitting()) { logger.debug("Region named {} does not exist", regionName);
Message clientMessage = initializeMessage(); if (quitting()) { if (isDebugEnabled) { logger.debug("processMessages quitting early because we have stopped"); if (quitting()) { if (isDebugEnabled) { logger.debug("termination detected"); if (quitting()) { if (isDebugEnabled) { logger.debug("processMessages quitting before processing message"); if (!quitting()) { if (!quitting()) { ClientServerObserver clientServerObserver = ClientServerObserverHolder.getInstance(); clientServerObserver.beforeFailoverByCacheClientUpdater(this.location);
if (isDebugEnabled && !quitting()) { logger.debug("{}: Region named {} does not exist", this, regionName);
if (isDebugEnabled && !quitting()) { logger.debug("{}: Region named {} does not exist", this, regionName);