if (generateDefaults() || cp.getIdleTimeout() != PoolFactory.DEFAULT_IDLE_TIMEOUT) atts.addAttribute("", "", IDLE_TIMEOUT, "", String.valueOf(cp.getIdleTimeout())); if (generateDefaults() || cp.getPingInterval() != PoolFactory.DEFAULT_PING_INTERVAL) atts.addAttribute("", "", PING_INTERVAL, "", String.valueOf(cp.getPingInterval())); if (generateDefaults() || cp.getStatisticInterval() != PoolFactory.DEFAULT_STATISTIC_INTERVAL) atts.addAttribute("", "", STATISTIC_INTERVAL, "",
/** * 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.retryAttempts = attributes.getRetryAttempts(); this.idleTimeout = attributes.getIdleTimeout(); this.pingInterval = attributes.getPingInterval(); this.statisticInterval = attributes.getStatisticInterval(); this.subscriptionEnabled = attributes.getSubscriptionEnabled();
/** * 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()); }
.setPoolMaxConnections(poolAttr.getMaxConnections()) .setPoolIdleTimeout(poolAttr.getIdleTimeout()) .setPoolPingInterval(poolAttr.getPingInterval()) .setPoolStatisticInterval(poolAttr.getStatisticInterval()) .setPoolRetryAttempts(poolAttr.getRetryAttempts())
public long getPingInterval(Long defaultPingInterval) { return defaultIfNull(defaultPingInterval, () -> getDelegate().getPingInterval()); }
public long getPingInterval(Long defaultPingInterval) { return defaultIfNull(defaultPingInterval, () -> getDelegate().getPingInterval()); }
when(mockPool.getMultiuserAuthentication()).thenReturn(multiuserAuthentication.get()); when(mockPool.getName()).thenReturn(name); when(mockPool.getPingInterval()).thenReturn(pingInterval.get()); when(mockPool.getPRSingleHopEnabled()).thenReturn(prSingleHopEnabled.get()); when(mockPool.getReadTimeout()).thenReturn(readTimeout.get());
.withDetail(poolKey(poolName, "multi-user-authentication"), toYesNoString(pool.getMultiuserAuthentication())) .withDetail(poolKey(poolName, "online-locators"), toCommaDelimitedHostAndPortsString(pool.getOnlineLocators())) .withDetail(poolKey(poolName, "ping-interval"), pool.getPingInterval()) .withDetail(poolKey(poolName, "pr-single-hop-enabled"), toYesNoString(pool.getPRSingleHopEnabled())) .withDetail(poolKey(poolName, "read-timeout"), pool.getReadTimeout())