/** * Does a region getAll on a server using connections from the given pool to communicate with the * server. * * @param pool the pool to use to communicate with the server. * @param region the name of the region to do the getAll on * @param keys list of keys to get * @return the map of values found by the getAll if any */ public static VersionedObjectList execute(ExecutablePool pool, String region, List keys, Object callback) { AbstractOp op = new GetAllOpImpl(region, keys, callback); op.initMessagePart(); return ((VersionedObjectList) pool.execute(op)).setKeys(keys); }
AbstractOp op = new PutAllOpImpl(region, map, eventId, ((PoolImpl) pool).getPRSingleHopEnabled(), skipCallbacks, callbackArg); op.initMessagePart(); return (VersionedObjectList) pool.execute(op);
AbstractOp op = new RemoveAllOpImpl(region, keys, eventId, ((PoolImpl) pool).getPRSingleHopEnabled(), callbackArg); op.initMessagePart(); return (VersionedObjectList) pool.execute(op);
@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; }
op.initMessagePart(); return ((VersionedObjectList) pool.execute(op)).setKeys(keys); } else {