atts.addAttribute("", "", SOCKET_BUFFER_SIZE, "", String.valueOf(cp.getSocketBufferSize())); if (generateDefaults() || cp.getThreadLocalConnections() != PoolFactory.DEFAULT_THREAD_LOCAL_CONNECTIONS) atts.addAttribute("", "", THREAD_LOCAL_CONNECTIONS, "", String.valueOf(cp.getThreadLocalConnections()));
/** * 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()); }
/** * 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.loadConditioningInterval = attributes.getLoadConditioningInterval(); this.socketBufferSize = attributes.getSocketBufferSize(); this.threadLocalConnections = attributes.getThreadLocalConnections(); this.readTimeout = attributes.getReadTimeout(); this.minConnections = attributes.getMinConnections();
.setPoolStatisticInterval(poolAttr.getStatisticInterval()) .setPoolRetryAttempts(poolAttr.getRetryAttempts()) .setPoolThreadLocalConnections(poolAttr.getThreadLocalConnections()) .setPoolReadTimeout(poolAttr.getReadTimeout()) .setPoolSubscriptionEnabled(poolAttr.getSubscriptionEnabled())
public boolean getThreadLocalConnections(Boolean defaultThreadLocalConnections) { return defaultIfNull(defaultThreadLocalConnections, () -> getDelegate().getThreadLocalConnections()); }
public boolean getThreadLocalConnections(Boolean defaultThreadLocalConnections) { return defaultIfNull(defaultThreadLocalConnections, () -> getDelegate().getThreadLocalConnections()); }
when(mockPool.getSubscriptionMessageTrackingTimeout()).thenReturn(subscriptionMessageTrackingTimeout.get()); when(mockPool.getSubscriptionRedundancy()).thenReturn(subscriptionRedundancy.get()); when(mockPool.getThreadLocalConnections()).thenReturn(threadLocalConnections.get());
.withDetail(poolKey(poolName, "subscription-message-tracking-timeout"), pool.getSubscriptionMessageTrackingTimeout()) .withDetail(poolKey(poolName, "subscription-redundancy"), pool.getSubscriptionRedundancy()) .withDetail(poolKey(poolName, "thread-local-connections"), toYesNoString(pool.getThreadLocalConnections()));