use of org.apache.geode.internal.cache.partitioned.PRFunctionStreamingResultCollector in project geode by apache.
the class PartitionedRegionFunctionResultWaiter method getPartitionedDataFrom.
/**
* Returns normally if succeeded to get data, otherwise throws an exception Have to wait outside
* this function and when getResult() is called. For the time being get the correct results.
*/
public ResultCollector getPartitionedDataFrom(Map<InternalDistributedMember, FunctionRemoteContext> recipMap, PartitionedRegion pr, AbstractExecution execution) {
if (recipMap.isEmpty()) {
return this.rc;
}
Set<InternalDistributedMember> recipientsSet = new HashSet<InternalDistributedMember>();
for (InternalDistributedMember member : recipMap.keySet()) {
recipientsSet.add(member);
}
this.recipients = recipientsSet;
PRFunctionStreamingResultCollector processor = new PRFunctionStreamingResultCollector(this, this.sys, recipientsSet, this.rc, functionObject, pr, execution);
this.reply = processor;
for (Map.Entry<InternalDistributedMember, FunctionRemoteContext> entry : recipMap.entrySet()) {
FunctionRemoteContext context = entry.getValue();
DistributionMessage m = createRequestMessage(entry.getKey(), processor, context);
this.sys.getDistributionManager().putOutgoing(m);
}
return processor;
}
Aggregations