code: public void clear(final short vbucket) {
      final Queue<BufferedEvent> queue = partitionQueues.get(vbucket);
      synchronized (queue) {
        LOGGER.debug("Clearing stream event buffer for partition {}", vbucket);
        for (BufferedEvent bufferedEvent : queue) {
          bufferedEvent.discard();
        }
        queue.clear();
      }
    }
docs: Discard all buffered events in the given vbucket.