@Override public Object call() throws Exception { op.initMessagePart(); Object result = null; boolean onlyUseExistingCnx = ((pool.getMaxConnections() != -1 && pool.getConnectionCount() >= pool.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); try { UserAttributes.userAttributes.set(securityAttributes); result = this.pool.executeOn(server, op, true, onlyUseExistingCnx); } catch (AllConnectionsInUseException ex) { // if we reached connection limit and don't have available connection to // that server,then execute function on one of the connections available // from other servers instead of creating new connection to the original // server if (op instanceof ExecuteRegionFunctionSingleHopOpImpl) { ExecuteRegionFunctionSingleHopOpImpl newop = (ExecuteRegionFunctionSingleHopOpImpl) op; result = this.pool.execute(new ExecuteRegionFunctionOpImpl(newop)); } else { result = this.pool.execute(this.op); } } finally { UserAttributes.userAttributes.set(null); } return result; }
String.format("Pool %s is different", "MinConnections")); if (getMaxConnections() != other.getMaxConnections()) { throw new RuntimeException( String.format("Pool %s is different", "MaxConnections"));
try { PoolImpl poolImpl = (PoolImpl) pool; boolean onlyUseExistingCnx = ((poolImpl.getMaxConnections() != -1 && poolImpl.getConnectionCount() >= poolImpl.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); return pool.executeOn(server, op, true, onlyUseExistingCnx);
try { PoolImpl poolImpl = (PoolImpl) pool; boolean onlyUseExistingCnx = ((poolImpl.getMaxConnections() != -1 && poolImpl.getConnectionCount() >= poolImpl.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); return pool.executeOn(new ServerLocation(server.getHostName(), server.getPort()), op,
Map<String, String> newPoolStats = stats.getPoolStats(); String poolStatsStr = "MinConnections=" + pool.getMinConnections() + ";MaxConnections=" + pool.getMaxConnections() + ";Redundancy=" + pool.getSubscriptionRedundancy() + ";CQS=" + pool.getQueryService().getCqs().length; logger.debug("ClientHealthStats for poolName " + poolName + " poolStatsStr=" + poolStatsStr);
try { PoolImpl poolImpl = (PoolImpl) pool; boolean onlyUseExistingCnx = ((poolImpl.getMaxConnections() != -1 && poolImpl.getConnectionCount() >= poolImpl.getMaxConnections()) ? true : false); op.setAllowDuplicateMetadataRefresh(!onlyUseExistingCnx); return pool.executeOn(new ServerLocation(server.getHostName(), server.getPort()), op,
/** * 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()); }