protected GatewaySenderEventImpl.TransactionMetadataDisposition getTransactionMetadataDisposition(
      final boolean isLastEventInTransaction) {
    if (getSender().mustGroupTransactionEvents()) {
      if (isLastEventInTransaction) {
        return INCLUDE_LAST_EVENT;
      }
      return INCLUDE;
    } else {
      return EXCLUDE;
    }
  }
Stops the dispatcher from dispatching events . The dispatcher will stay alive for a predefined
time OR until its queue is empty.

@see AbstractGatewaySender#MAXIMUM_SHUTDOWN_WAIT_TIME
geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySenderEventProcessor.java