@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; }
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);
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,
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,