/**
  * Clear the state used for executing triggers, but leave the finished set to indicate the window
  * is closed.
  */
 public void clearState(W window, Timers timers, StateAccessor<?> state) throws Exception {
   // Don't need to clone, because we'll be clearing the finished bits anyways.
   FinishedTriggers finishedSet = readFinishedBits(state.access(FINISHED_BITS_TAG));
   rootTrigger.invokeClear(contextFactory.base(window, timers, rootTrigger, finishedSet));
 }