@Override
  public ResultCollector execute(final Function function, long timeout, TimeUnit unit) {
    if (function == null) {
      throw new FunctionException(
          String.format("The input %s for the execute function request is null",
              "function instance"));
    }
    if (function.isHA() && !function.hasResult()) {
      throw new FunctionException(
          "For Functions with isHA true, hasResult must also be true.");
    }
    if (region.getAttributes().getDataPolicy().isNormal()) {
      throw new FunctionException(
          "Function execution on region with DataPolicy.NORMAL is not supported");
    }
    String id = function.getId();
    if (id == null) {
      throw new FunctionException(
          "The Function#getID() returned null");
    }
    isFnSerializationReqd = true;
    return executeFunction(function, timeout, unit);
  }
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