@Override
  public Execution onRegions(Set<Region> regions) {
    if (regions == null) {
      throw new IllegalArgumentException(
          String.format("The input %s for the execute function request is null",
              "regions set"));
    }
    if (regions.contains(null)) {
      throw new IllegalArgumentException(
          "One or more region references added to the regions set is(are) null");
    }
    if (regions.isEmpty()) {
      throw new IllegalArgumentException(
          "Regions set is empty for onRegions function execution");
    }
    for (Region region : regions) {
      if (isClientRegion(region)) {
        throw new UnsupportedOperationException(
            "FunctionService#onRegions() is not supported for cache clients in client server mode");
      }
    }
    return new MultiRegionFunctionExecutor(regions);
  }
use when the optimization to execute onMember locally is not desired.
geode-core/src/main/java/org/apache/geode/internal/cache/execute/InternalFunctionExecutionServiceImpl.java