@Override
    public void execute(FunctionContext context) {
      final InternalDistributedMember myId =
          InternalDistributedSystem.getAnyInstance().getDistributedMember();
      if (myId.equals(member)) {
        CacheFactory.getAnyInstance().close();
        throw new CacheClosedException();
      }
      pause(1000);
      context.getResultSender().lastResult(myId);
    }
A function which will close the cache if the given member matches the member executing this
function
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/FunctionServiceBase.java