@Override
  public void lastResult(Object oneResult) {
    if (!function.hasResult()) {
      throw new IllegalStateException(
          String.format("Cannot %s result as the Function#hasResult() is false",
              "send"));
    }
    if (serverSender != null) { // client-server
      if (localLastResultReceived) {
        return;
      }
      if (onlyLocal) {
        serverSender.lastResult(oneResult);
        rc.endResults();
        localLastResultReceived = true;
      } else {
        lastResult(oneResult, rc, false, true, dm.getId());
      }
    } else { // P2P
      if (msg != null) {
        try {
          msg.sendReplyForOneResult(dm, oneResult, true, enableOrderedResultStreming);
        } catch (QueryException e) {
          throw new FunctionException(e);
        } catch (ForceReattemptException e) {
          throw new FunctionException(e);
        } catch (InterruptedException e) {
          throw new FunctionException(e);
        }
      } else {
        if (localLastResultReceived) {
          return;
        }
        if (onlyLocal) {
          rc.addResult(dm.getDistributionManagerId(), oneResult);
          rc.endResults();
          localLastResultReceived = true;
        } else {
          // call a synchronized method as local node is also waiting to send lastResult
          lastResult(oneResult, rc, false, true, dm.getDistributionManagerId());
        }
        FunctionStatsManager.getFunctionStats(function.getId(), dm.getSystem())
            .incResultsReceived();
      }
    }
    FunctionStatsManager.getFunctionStats(function.getId(), dm.getSystem())
        .incResultsReturned();
  }
Have to combine next two construcotr in one and make a new class which will send Results back.
geode-core/src/main/java/org/apache/geode/internal/cache/execute/MemberFunctionResultSender.java