public void setPool(InternalPool pool) { this.pool = pool; if (logger.isDebugEnabled()) { logger.debug("Setting ServerProxy with the Query Service using the pool :{} ", pool.getName()); } }
try { if (region.getAttributes().getPoolName() != null && region.getAttributes().getPoolName().equals(qManager.getPool().getName())) {
@Override public void start(ScheduledExecutorService background) { try { denyList.start(background); endpointManager.addListener(endpointListener); // Use a separate timer for queue management tasks // We don't want primary recovery (and therefore user threads) to wait for // things like pinging connections for health checks. final String name = "queueTimer-" + this.pool.getName(); this.recoveryThread = LoggingExecutors.newScheduledThreadPool(name, 1, false); getState().start(background, getPool().getSubscriptionAckInterval()); // initialize connections initializeConnections(); scheduleRedundancySatisfierIfNeeded(redundancyRetryInterval); // When a server is removed from the denylist, try again // to establish redundancy (if we need to) DenyListListener denyListListener = new DenyListListenerAdapter() { @Override public void serverRemoved(ServerLocation location) { QueueManagerImpl.this.scheduleRedundancySatisfierIfNeeded(0); } }; denyList.addListener(denyListListener); factory.getDenyList().addListener(denyListListener); } finally { initializedLatch.countDown(); } }