boolean areAllLower(Map<byte[], Long> sequenceids, Collection<byte[]> keysBlocking) {
    Map<byte[], Long> flushing = null;
    Map<byte[], Long> unflushed = null;
    synchronized (this.tieLock) {
      // Get a flattened -- only the oldest sequenceid -- copy of current flushing and unflushed
      // data structures to use in tests below.
      flushing = flattenToLowestSequenceId(this.flushingSequenceIds);
      unflushed = flattenToLowestSequenceId(this.lowestUnflushedSequenceIds);
    }
    boolean result = true;
    for (Map.Entry<byte[], Long> e : sequenceids.entrySet()) {
      long oldestFlushing = Long.MAX_VALUE;
      long oldestUnflushed = Long.MAX_VALUE;
      if (flushing != null && flushing.containsKey(e.getKey())) {
        oldestFlushing = flushing.get(e.getKey());
      }
      if (unflushed != null && unflushed.containsKey(e.getKey())) {
        oldestUnflushed = unflushed.get(e.getKey());
      }
      long min = Math.min(oldestFlushing, oldestUnflushed);
      if (min <= e.getValue()) {
        if (keysBlocking == null) {
          return false;
        }
        result = false;
        keysBlocking.add(e.getKey());
        // Continue examining the map so we could log all regions blocking this WAL.
      }
    }
    return result;
  }
See if passed <code>sequenceids</code> are lower -- i.e. earlier -- than any outstanding
sequenceids, sequenceids we are holding on to in this accounting instance.
@param sequenceids  Keyed by encoded region name. Cannot be null (doesn't make sense for it to
                    be null).
@param keysBlocking An optional collection that is used to return the specific keys that are
                    causing this method to return false.
@return true if all sequenceids are lower, older than, the old sequenceids in this instance.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SequenceIdAccounting.java