public void resetLastPeeked() {
    resetLastPeeked = true;

    // Reset the in progress boolean and queue for peeked events in progress
    peekedEventsProcessingInProgress = false;
    peekedEventsProcessing.clear();
  }
Take will choose a random BucketRegionQueue which is primary and will take the head element
from it.
geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java