public boolean markAsDuplicateInTempQueueEvents(Object tailKey) {
    synchronized (queuedEventsSync) {
      final boolean isDebugEnabled = logger.isDebugEnabled();

      for (TmpQueueEvent event : tmpQueuedEvents) {
        if (tailKey.equals(event.getEvent().getTailKey())) {
          if (isDebugEnabled) {
            logger.debug(
                "shadowKey {} is found in tmpQueueEvents at AbstractGatewaySender level. Marking it..",
                tailKey);
          }
          event.getEvent().setPossibleDuplicate(true);
          return true;
        }
      }

      return false;
    }
  }
Removes the EntryEventImpl, whose tailKey matches with the provided tailKey, from
tmpQueueEvents.
geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java