handler.startElement("", CONNECTION_POOL, CONNECTION_POOL, atts); Iterator/* <InetSocketAddress> */ locators = cp.getLocators().iterator(); while (locators.hasNext()) { InetSocketAddress addr = (InetSocketAddress) locators.next();
/** * Initializes the state of this factory for the given pool's state. */ public void init(Pool cp) { setSocketConnectTimeout(cp.getSocketConnectTimeout()); setFreeConnectionTimeout(cp.getFreeConnectionTimeout()); setLoadConditioningInterval(cp.getLoadConditioningInterval()); setSocketBufferSize(cp.getSocketBufferSize()); setReadTimeout(cp.getReadTimeout()); setMinConnections(cp.getMinConnections()); setMaxConnections(cp.getMaxConnections()); setRetryAttempts(cp.getRetryAttempts()); setIdleTimeout(cp.getIdleTimeout()); setPingInterval(cp.getPingInterval()); setStatisticInterval(cp.getStatisticInterval()); setThreadLocalConnections(cp.getThreadLocalConnections()); setSubscriptionEnabled(cp.getSubscriptionEnabled()); setPRSingleHopEnabled(cp.getPRSingleHopEnabled()); setSubscriptionRedundancy(cp.getSubscriptionRedundancy()); setSubscriptionMessageTrackingTimeout(cp.getSubscriptionMessageTrackingTimeout()); setSubscriptionAckInterval(cp.getSubscriptionAckInterval()); setServerGroup(cp.getServerGroup()); setMultiuserAuthentication(cp.getMultiuserAuthentication()); for (InetSocketAddress inetSocketAddress : cp.getLocators()) { addLocator(inetSocketAddress.getHostName(), inetSocketAddress.getPort()); } this.attributes.servers.addAll(cp.getServers()); }
this.multiuserSecureModeEnabled = attributes.getMultiuserAuthentication(); this.locatorAddresses = locAddresses; this.locators = attributes.getLocators(); this.servers = attributes.getServers(); this.startDisabled =
/** * Return true if the given Pool is compatible with these attributes. Currently this does what * equals would but in the future we might decide to weaken the compatibility contract. * * @since GemFire 6.5 */ public boolean isCompatible(Pool p) { if (p == null) return false; return getFreeConnectionTimeout() == p.getFreeConnectionTimeout() && getSocketConnectTimeout() == p.getSocketConnectTimeout() && getLoadConditioningInterval() == p.getLoadConditioningInterval() && getSocketBufferSize() == p.getSocketBufferSize() && getMinConnections() == p.getMinConnections() && getMaxConnections() == p.getMaxConnections() && getIdleTimeout() == p.getIdleTimeout() && getPingInterval() == p.getPingInterval() && getStatisticInterval() == p.getStatisticInterval() && getRetryAttempts() == p.getRetryAttempts() && getThreadLocalConnections() == p.getThreadLocalConnections() && getReadTimeout() == p.getReadTimeout() && getSubscriptionEnabled() == p.getSubscriptionEnabled() && getPRSingleHopEnabled() == p.getPRSingleHopEnabled() && getSubscriptionRedundancy() == p.getSubscriptionRedundancy() && getSubscriptionMessageTrackingTimeout() == p.getSubscriptionMessageTrackingTimeout() && getSubscriptionAckInterval() == p.getSubscriptionAckInterval() && getServerGroup().equals(p.getServerGroup()) && getMultiuserAuthentication() == p.getMultiuserAuthentication() && getLocators().equals(p.getLocators()) && getServers().equals(p.getServers()); }
.setPoolServerGroup(poolAttr.getServerGroup()) .setPoolMultiuserAuthentication(poolAttr.getMultiuserAuthentication()); for (InetSocketAddress locator : poolAttr.getLocators()) { ccf.addPoolLocator(locator.getHostName(), locator.getPort());
public String getConnectionInfo() throws Exception { return clientCache.getDefaultPool().getLocators().toString(); }
public String getConnectionInfo() throws Exception { return clientCache.getDefaultPool().getLocators().toString(); }
public List<InetSocketAddress> getLocators(List<InetSocketAddress> defaultLocators) { return defaultIfEmpty(defaultLocators, () -> getDelegate().getLocators()); }
public List<InetSocketAddress> getLocators(List<InetSocketAddress> defaultLocators) { return defaultIfEmpty(defaultLocators, () -> getDelegate().getLocators()); }
when(mockPool.getIdleTimeout()).thenReturn(idleTimeout.get()); when(mockPool.getLoadConditioningInterval()).thenReturn(loadConditioningInterval.get()); when(mockPool.getLocators()).thenReturn(locators); when(mockPool.getMaxConnections()).thenReturn(maxConnections.get()); when(mockPool.getMinConnections()).thenReturn(minConnections.get());
.withDetail(poolKey(poolName, "idle-timeout"), pool.getIdleTimeout()) .withDetail(poolKey(poolName, "load-conditioning-interval"), pool.getLoadConditioningInterval()) .withDetail(poolKey(poolName, "locators"), toCommaDelimitedHostAndPortsString(pool.getLocators())) .withDetail(poolKey(poolName, "max-connections"), pool.getMaxConnections()) .withDetail(poolKey(poolName, "min-connections"), pool.getMinConnections())