Search in sources :

Example 1 with DistributedRegionFunctionResultWaiter

use of org.apache.geode.internal.cache.execute.DistributedRegionFunctionResultWaiter in project geode by apache.

the class DistributedRegion method executeOnReplicate.

private ResultCollector executeOnReplicate(final DistributedRegionFunctionExecutor execution, final Function function, final Object args, ResultCollector rc, final Set filter, final DistributedMember target) {
    final Set singleMember = Collections.singleton(target);
    execution.validateExecution(function, singleMember);
    execution.setExecutionNodes(singleMember);
    HashMap<InternalDistributedMember, Object> memberArgs = new HashMap<InternalDistributedMember, Object>();
    memberArgs.put((InternalDistributedMember) target, execution.getArgumentsForMember(target.getId()));
    ResultSender resultSender = new DistributedRegionFunctionResultSender(null, rc, function, execution.getServerResultSender());
    DistributedRegionFunctionResultWaiter waiter = new DistributedRegionFunctionResultWaiter(this.getSystem(), this.getFullPath(), rc, function, filter, Collections.singleton(target), memberArgs, resultSender);
    rc = waiter.getFunctionResultFrom(Collections.singleton(target), function, execution);
    return rc;
}
Also used : DistributedRegionFunctionResultSender(org.apache.geode.internal.cache.execute.DistributedRegionFunctionResultSender) Set(java.util.Set) CopyOnWriteArraySet(java.util.concurrent.CopyOnWriteArraySet) HashSet(java.util.HashSet) InternalDistributedMember(org.apache.geode.distributed.internal.membership.InternalDistributedMember) DistributedRegionFunctionResultWaiter(org.apache.geode.internal.cache.execute.DistributedRegionFunctionResultWaiter) HashMap(java.util.HashMap) ServerToClientFunctionResultSender(org.apache.geode.internal.cache.execute.ServerToClientFunctionResultSender) ResultSender(org.apache.geode.cache.execute.ResultSender) DistributedRegionFunctionResultSender(org.apache.geode.internal.cache.execute.DistributedRegionFunctionResultSender)

Aggregations

HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 CopyOnWriteArraySet (java.util.concurrent.CopyOnWriteArraySet)1 ResultSender (org.apache.geode.cache.execute.ResultSender)1 InternalDistributedMember (org.apache.geode.distributed.internal.membership.InternalDistributedMember)1 DistributedRegionFunctionResultSender (org.apache.geode.internal.cache.execute.DistributedRegionFunctionResultSender)1 DistributedRegionFunctionResultWaiter (org.apache.geode.internal.cache.execute.DistributedRegionFunctionResultWaiter)1 ServerToClientFunctionResultSender (org.apache.geode.internal.cache.execute.ServerToClientFunctionResultSender)1