@VisibleForTesting
  <R> List<R> executeCacheRealizationFunction(AbstractConfiguration configuration,
      CacheElementOperation operation,
      Set<DistributedMember> targetMembers) {
    if (targetMembers.size() == 0) {
      return Collections.emptyList();
    }
    Set<DistributedMember> targetMemberPRE1_12_0 = new HashSet<>();
    Set<DistributedMember> targetMemberPOST1_12_0 = new HashSet<>();

    targetMembers.stream().forEach(member -> {
      if (((InternalDistributedMember) member).getVersion()
          .isOlderThan(KnownVersion.GEODE_1_12_0)) {
        targetMemberPRE1_12_0.add(member);
      } else {
        targetMemberPOST1_12_0.add(member);
      }
    });



    File file = null;
    if (configuration instanceof HasFile) {
      file = ((HasFile) configuration).getFile();
    }

    if (file == null) {
      List<?> functionResults = new ArrayList<>();
      if (targetMemberPRE1_12_0.size() > 0) {
        Function function =
            new org.apache.geode.management.internal.cli.functions.CacheRealizationFunction();
        Execution execution = FunctionService.onMembers(targetMemberPRE1_12_0)
            .setArguments(Arrays.asList(configuration, operation, null));
        ((AbstractExecution) execution).setIgnoreDepartedMembers(true);
        functionResults.addAll(cleanResults((List<?>) execution.execute(function).getResult()));
      }
      if (targetMemberPOST1_12_0.size() > 0) {
        Function function = new CacheRealizationFunction();
        Execution execution = FunctionService.onMembers(targetMemberPOST1_12_0)
            .setArguments(Arrays.asList(configuration, operation, null));
        ((AbstractExecution) execution).setIgnoreDepartedMembers(true);
        functionResults.addAll(cleanResults((List<?>) execution.execute(function).getResult()));
      }

      return (List<R>) functionResults;
    }

    // if we have file arguments, we need to export the file input stream for each member
    RemoteStreamExporter exporter = null;
    ManagementAgent agent =
        ((SystemManagementService) ManagementService.getExistingManagementService(cache))
            .getManagementAgent();
    exporter = agent.getRemoteStreamExporter();

    List<R> results = new ArrayList();
    for (DistributedMember member : targetMembers) {
      FileInputStream fileInputStream = null;
      SimpleRemoteInputStream inputStream = null;
      RemoteInputStream remoteInputStream = null;
      try {
        fileInputStream = new FileInputStream(file.getAbsolutePath());
        inputStream = new SimpleRemoteInputStream(fileInputStream);
        remoteInputStream = exporter.export(inputStream);
        Execution execution = FunctionService.onMember(member)
            .setArguments(Arrays.asList(configuration, operation, remoteInputStream));
        ((AbstractExecution) execution).setIgnoreDepartedMembers(true);
        List<R> functionResults;
        if (((InternalDistributedMember) member).getVersion()
            .isOlderThan(KnownVersion.GEODE_1_12_0)) {
          Function function =
              new org.apache.geode.management.internal.cli.functions.CacheRealizationFunction();
          functionResults = cleanResults((List<?>) execution.execute(function).getResult());
        } else {
          Function function = new CacheRealizationFunction();
          functionResults = cleanResults((List<?>) execution.execute(function).getResult());
        }
        results.addAll(functionResults);
      } catch (IOException e) {
        raise(StatusCode.ILLEGAL_ARGUMENT, "Invalid file: " + file.getAbsolutePath());
      } finally {
        try {
          if (fileInputStream != null) {
            fileInputStream.close();
          }
          if (inputStream != null) {
            inputStream.close();
          }
          if (remoteInputStream != null) {
            remoteInputStream.close(true);
          }
        } catch (IOException ex) {
          // ignore
        }
      }
    }
    return results;
  }
each locator will have one instance of this running if enabled
geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java