@VisibleForTesting
    public GatewayQueueEvent<?, ?> createGatewaySenderEvent(InternalCache cache,
        InternalRegion region, GatewaySender sender, Region.Entry<?, ?> entry,
        long newestTimestampAllowed) {
      final EntryEventImpl event;
      if (region instanceof PartitionedRegion) {
        event =
            createEventForPartitionedRegion(sender, cache, region, entry, newestTimestampAllowed);
      } else {
        event = createEventForReplicatedRegion(cache, region, entry, newestTimestampAllowed);
      }
      if (event == null) {
        return null;
      }
      try {
        return new GatewaySenderEventImpl(EnumListenerEvent.AFTER_UPDATE_WITH_GENERATE_CALLBACKS,
            event, null, TransactionMetadataDisposition.EXCLUDE);
      } catch (IOException e) {
        logger.error("Error when creating event in wan-copy: {}", e.getMessage());
        return null;
      }
    }
It runs the actions to be done after a batch has been
sent: throw an interrupted exception if the operation was canceled and
adjust the rate of copying by sleeping if necessary.

@param startTime time at which the entries started to be copied
@param copiedEntries number of entries copied so far
@param maxRate maximum copying rate
geode-wan/src/main/java/org/apache/geode/management/internal/cli/functions/WanCopyRegionFunctionDelegate.java