@Override
  public void addCacheListener(@SuppressWarnings("rawtypes") CacheListener listener) {
    AttributesMutator<Long, AsyncEvent<?, ?>> mutator = region.getAttributesMutator();
    mutator.addCacheListener(uncheckedCast(listener));
  }
This method removes batchSize entries from the queue. It will only remove entries that were
previously peeked.

@param size the number of entries to remove
geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java