code: @Override
      public boolean onTrigger() {
          List<Event<T>> windowEvents = null;
          List<T> expired = null;
          try {
              lock.lock();
              /*
               * 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();
          } finally {
              lock.unlock();
          }
          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.debug("invoking windowLifecycleListener onActivation, [{}] events in window.", events.size());
              windowLifecycleListener.onActivation(events, newEvents, expired);
          } else {
              LOG.debug("No events in the window, skipping onActivation");
          }
          triggerPolicy.reset();
          return !events.isEmpty();
      }
docs: The callback invoked by the trigger policy.