protected void setLastDispatchedIDAndRemoveEvents(List removedEventInfoList,
        long lastDispatchedSeqId) throws CacheException, InterruptedException {

      synchronized (this) {
        if (lastDispatchedSequenceId > lastDispatchedSeqId) {
          // If the current last dispatched ID is greater than the new id ,
          // then do not set it
          return;
        }
        lastDispatchedSequenceId = lastDispatchedSeqId;

      }
      for (Object o : removedEventInfoList) {
        RemovedEventInfo info = (RemovedEventInfo) o;
        Long counter = info.counter;
        Object key = info.key;
        String r = info.regionName;
        Conflatable wrapper = (Conflatable) owningQueue.region.get(counter);
        if (owningQueue.destroyFromAvailableIDsAndRegion(counter)) {
          if (key != null) {
            destroy(counter, key, r);
          } else {
            destroy(counter);
          }
          // <HA overflow>
          if (wrapper instanceof HAEventWrapper) {
            owningQueue.decAndRemoveFromHAContainer((HAEventWrapper) wrapper, "Message Dispatcher");
          }
          // </HA overflow>
          owningQueue.stats.incEventsRemoved();
        } else {
          owningQueue.stats.incNumVoidRemovals();
        }
      }
    }
Invoked by the by the remove method . This method sets the LastDispatched sequence ID in the
DACE & destroys all the sequence Ids which are less than the last dispatched sequence ID. The
lock on the DACE is minimized by copying the Counters Set & then identifying the positions
which need to be removed

@param removedEventInfoList List containing objects of RemovedEventInfo class representing
       Events which have been peeked & are now candidate for removal. It has to be guaranteed
       that the sequence IDs of all the other counters is less than the last dispatched
@param lastDispatchedSeqId long indicating the last dispatched ID which gets set in a DACE
geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java