@Override public synchronized void start(InternalPool pool) { this.pool = pool; pool.getStats().setInitialContacts(serverList.size()); }
private ConnectionList(QueueConnectionImpl primary, List backups, GemFireException discoveryException, QueueConnectionImpl failedPrimary) { this.primary = primary; Map allConnectionsTmp = new HashMap(); for (Iterator itr = backups.iterator(); itr.hasNext();) { QueueConnectionImpl nextConnection = (QueueConnectionImpl) itr.next(); allConnectionsTmp.put(nextConnection.getEndpoint(), nextConnection); } if (primary != null) { allConnectionsTmp.put(primary.getEndpoint(), primary); } this.connectionMap = Collections.unmodifiableMap(allConnectionsTmp); this.backups = Collections.unmodifiableList(new ArrayList(backups)); pool.getStats().setSubscriptionCount(connectionMap.size()); this.primaryDiscoveryException = discoveryException; this.failedPrimary = failedPrimary; }
@Override public void start(InternalPool pool) { this.pool = pool; pool.getStats().setInitialContacts(((LocatorList) locators.get()).size()); this.locatorUpdateInterval = Long.getLong( DistributionConfig.GEMFIRE_PREFIX + "LOCATOR_UPDATE_INTERVAL", pool.getPingInterval()); if (locatorUpdateInterval > 0) { pool.getBackgroundProcessor().scheduleWithFixedDelay(new UpdateLocatorListTask(), 0, locatorUpdateInterval, TimeUnit.MILLISECONDS); logger.info("AutoConnectionSource UpdateLocatorListTask started with interval={} ms.", new Object[] {this.locatorUpdateInterval}); } }
pool.getStats().setLocatorCount(newLocatorAddresses.size());
Object returnObj = null; try { pool.getStats().incLocatorRequests(); returnObj = locatorConnection.requestToServer(locator.getSocketInetAddressNoLookup(), request, connectionTimeout, true); ServerLocationResponse response = (ServerLocationResponse) returnObj; pool.getStats().incLocatorResponses(); if (response != null) { reportLiveLocator(locator.getSocketInetAddressNoLookup());