code: private void clearAllState(
  			W window,
  			AppendingState<IN, ACC> windowState,
  			MergingWindowSet<W> mergingWindows) throws Exception {
  		windowState.clear();
  		triggerContext.clear();
  		processContext.window = window;
  		processContext.clear();
  		if (mergingWindows != null) {
  			mergingWindows.retireWindow(window);
  			mergingWindows.persist();
  		}
  	}
docs: Drops all state for the given window and calls
  {@link Trigger#clear(Window, Trigger.TriggerContext)}.
  
  <p>The caller must ensure that the
  correct key is set in the state backend and the triggerContext object.