code: void deliverPendingFlushes(Zxid zxid) {
      if (!flushQueue.isEmpty()) {
        while(flushQueue.peek() != null) {
          PendingFlush flush = flushQueue.peek();
          if (flush.getWaitZxid().compareTo(zxid) <= 0) {
            Tuple tp = pendings.pendingFlushes.remove(0);
            if (tp == null) {
              throw new RuntimeException("There's no element in "
                  + "pendingFlushes.");
            }
            Object ctx = tp.ctx;
            stateMachine.flushed(flush.getWaitZxid(), flush.getBody(), ctx);
            flushQueue.remove();
          } else {
            break;
          }
        }
      }
    }
docs: given zxid.