@Override
  protected ResultCollector executeFunction(Function function, long timeout, TimeUnit unit) {
    if (!function.hasResult()) {
      region.executeFunction(this, function, args, null, filter, sender);
      return new NoResult();
    }
    ResultCollector inRc = (rc == null) ? new DefaultResultCollector() : rc;
    ResultCollector rcToReturn =
        region.executeFunction(this, function, args, inRc, filter, sender);
    if (timeout > 0) {
      try {
        rcToReturn.getResult(timeout, unit);
      } catch (Exception exception) {
        throw new FunctionException(exception);
      }
    }
    return rcToReturn;
  }
Executes Function on Distributed Regions.

For DistributedRegions with DataPolicy.NORMAL, it throws UnsupportedOperationException. <br>
For DistributedRegions with DataPolicy.EMPTY, execute the function on any random member which has
DataPolicy.REPLICATE <br>
For DistributedRegions with DataPolicy.REPLICATE, execute the function locally.


@since GemFire 5.8 LA
geode-core/src/main/java/org/apache/geode/internal/cache/execute/DistributedRegionFunctionExecutor.java