@NotNull
  public List<E> clearQueue() {
    final List<E> allEvents = new ArrayList<>();
    for (int i = 0; i < myEvents.length; i++) {
      final LinkedList<E> eventList = getEventsList(i);
      for (E event = eventList.poll(); event != null; event = eventList.poll()) {
        allEvents.add(event);
      }
    }
    return allEvents;
  }
@NotNull
  public List<E> clearQueue()