@Override public void endpointNowInUse(Endpoint endpoint) { try { Future future = pool.getBackgroundProcessor().scheduleWithFixedDelay(new PingTask(endpoint), pingIntervalNanos, pingIntervalNanos, TimeUnit.NANOSECONDS); taskFutures.put(endpoint, future); } catch (RejectedExecutionException e) { if (!pool.getCancelCriterion().isCancelInProgress()) { throw e; } } }
@Override public void run2() { if (pool.getCancelCriterion().isCancelInProgress()) { return; } LocatorListResponse response = (LocatorListResponse) queryLocators(LOCATOR_LIST_REQUEST); updateLocatorList(response); } }
@Override public void run2() { if (pool.getCancelCriterion().isCancelInProgress()) { return; } catch (RejectedExecutionException e) { pool.getCancelCriterion().checkCancelInProgress(e); throw e; // weird } catch (Exception e) { pool.getCancelCriterion().checkCancelInProgress(e);
@Override public void run2() { if (pool.getCancelCriterion().isCancelInProgress()) { return; recoveryScheduled = true; } catch (RejectedExecutionException e) { if (!pool.getCancelCriterion().isCancelInProgress()) { throw e; } catch (RejectedExecutionException e) { if (!pool.getCancelCriterion().isCancelInProgress()) { throw e; // weird if (pool.getCancelCriterion().isCancelInProgress()) { return; } catch (RejectedExecutionException ex) { // GEODE-1613 - suspect string while shutting if (!background.isTerminated() && !pool.getCancelCriterion().isCancelInProgress()) { throw ex;
keepAlive); } catch (Exception e) { if (!srp.getPool().getCancelCriterion().isCancelInProgress()) { logger.warn("Problem removing all interest on region={} interestType={} :{}", new Object[] {regName, InterestType.getString(interestType),
/** * Check to see if shutdown in progress. * * @return true if shutdown in progress else false. */ private boolean shutdownInProgress() { InternalCache cache = cqService.getInternalCache(); if (cache == null || cache.isClosed()) { return true; // bail, things are shutting down } String reason = cqProxy.getPool().getCancelCriterion().cancelInProgress(); if (reason != null) { return true; } return false; }
@Override public void run2() { SystemFailure.checkFailure(); if (qManager.getPool().getCancelCriterion().isCancelInProgress()) { return; } if (PoolImpl.BEFORE_SENDING_CLIENT_ACK_CALLBACK_FLAG) { ClientServerObserver bo = ClientServerObserverHolder.getInstance(); bo.beforeSendingClientAck(); } sendPeriodicAck(); checkForExpiry(); }
pool.getCancelCriterion().checkCancelInProgress(null); GemFireException exception = snapshot.getPrimaryDiscoveryException(); if (exception == null || exception instanceof NoSubscriptionServersAvailableException) {
pool.getCancelCriterion().checkCancelInProgress(t); logError("Error in redundancy satisfier", t);
private boolean recoverInterest(final QueueConnectionImpl newConnection, final boolean isFirstNewConnection) { if (pool.getPoolOrCacheCancelInProgress() != null) { return true; } // recover interest try { recoverAllInterestTypes(newConnection, isFirstNewConnection); newConnection.getFailureTracker().reset(); return true; } catch (CancelException ignore) { return true; // ok to ignore we are being shutdown } catch (VirtualMachineError err) { SystemFailure.initiateFailure(err); // If this ever returns, rethrow the error. We're poisoned // now, so don't let this thread continue. throw err; } catch (Throwable t) { SystemFailure.checkFailure(); pool.getCancelCriterion().checkCancelInProgress(t); logger.warn("QueueManagerImpl failed to recover interest to server " + newConnection.getServer(), t); newConnection.getFailureTracker().addFailure(); newConnection.destroy(); return false; } }