@Override
  public void toData(DataOutput out,
      SerializationContext context) throws IOException {
    super.toData(out, context);

    short flags = 0;
    if (processorId != 0) {
      flags |= HAS_PROCESSOR_ID;
    }
    if (txUniqId != TXManagerImpl.NOTX) {
      flags |= HAS_TX_ID;
    }
    if (txMemberId != null) {
      flags |= HAS_TX_MEMBERID;
    }
    if (isReExecute) {
      flags |= IS_REEXECUTE;
    }
    out.writeShort(flags);
    if (processorId != 0) {
      out.writeInt(processorId);
    }
    if (txUniqId != TXManagerImpl.NOTX) {
      out.writeInt(txUniqId);
    }
    if (txMemberId != null) {
      DataSerializer.writeObject(txMemberId, out);
    }

    if (isFnSerializationReqd) {
      DataSerializer.writeObject(functionObject, out);
    } else {
      DataSerializer.writeObject(functionObject.getId(), out);
    }
    DataSerializer.writeObject(args, out);
    DataSerializer.writeHashSet((HashSet) filter, out);
    DataSerializer.writeString(regionPath, out);
  }
check to see if the distributed system is closing

@return true if the distributed system is closing
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegionFunctionStreamingMessage.java