atts.addAttribute("", "", SERVER_GROUP, "", cp.getServerGroup()); if (generateDefaults() || cp.getSocketBufferSize() != PoolFactory.DEFAULT_SOCKET_BUFFER_SIZE) atts.addAttribute("", "", SOCKET_BUFFER_SIZE, "", String.valueOf(cp.getSocketBufferSize())); if (generateDefaults() || cp.getThreadLocalConnections() != PoolFactory.DEFAULT_THREAD_LOCAL_CONNECTIONS)
/** * 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.freeConnectionTimeout = attributes.getFreeConnectionTimeout(); this.loadConditioningInterval = attributes.getLoadConditioningInterval(); this.socketBufferSize = attributes.getSocketBufferSize(); this.threadLocalConnections = attributes.getThreadLocalConnections(); this.readTimeout = attributes.getReadTimeout();
/** * 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()); }
ccf.setPoolFreeConnectionTimeout(poolAttr.getFreeConnectionTimeout()) .setPoolLoadConditioningInterval(poolAttr.getLoadConditioningInterval()) .setPoolSocketBufferSize(poolAttr.getSocketBufferSize()) .setPoolMinConnections(poolAttr.getMinConnections()) .setPoolMaxConnections(poolAttr.getMaxConnections())
public int getSocketBufferSize(Integer defaultSocketBufferSize) { return defaultIfNull(defaultSocketBufferSize, () -> getDelegate().getSocketBufferSize()); }
public int getSocketBufferSize(Integer defaultSocketBufferSize) { return defaultIfNull(defaultSocketBufferSize, () -> getDelegate().getSocketBufferSize()); }
when(mockPool.getServerGroup()).thenReturn(serverGroup.get()); when(mockPool.getServers()).thenReturn(servers); when(mockPool.getSocketBufferSize()).thenReturn(socketBufferSize.get()); when(mockPool.getStatisticInterval()).thenReturn(statisticInterval.get()); when(mockPool.getSubscriptionAckInterval()).thenReturn(subscriptionAckInterval.get());
.withDetail(poolKey(poolName, "server-group"), pool.getServerGroup()) .withDetail(poolKey(poolName, "servers"), toCommaDelimitedHostAndPortsString(pool.getServers())) .withDetail(poolKey(poolName, "socket-buffer-size"), pool.getSocketBufferSize()) .withDetail(poolKey(poolName, "statistic-interval"), pool.getStatisticInterval()) .withDetail(poolKey(poolName, "subscription-ack-interval"), pool.getSubscriptionAckInterval())