docs: @Override
    public boolean onTrigger() {
      List<Event<T>> windowEvents = null;
      List<T> expired = null;
  
      /*
       * scan the entire window to handle out of order events in
       * the case of time based windows.
       */
      windowEvents = scanEvents(true);
      expired = new ArrayList<>(expiredEvents);
      expiredEvents.clear();
      List<T> events = new ArrayList<>();
      List<T> newEvents = new ArrayList<>();
      for (Event<T> event : windowEvents) {
        events.add(event.get());
        if (!prevWindowEvents.contains(event)) {
          newEvents.add(event.get());
        }
      }
      prevWindowEvents.clear();
      if (!events.isEmpty()) {
        prevWindowEvents.addAll(windowEvents);
        LOG.fine(String.format("invoking windowLifecycleListener onActivation, [%d] events in "
            + "window.", events.size()));
        windowLifecycleListener.onActivation(events, newEvents, expired,
            evictionPolicy.getContext().getReferenceTime());
      } else {
        LOG.fine("No events in the window, skipping onActivation");
      }
      triggerPolicy.reset();
      return !events.isEmpty();
    }