private void cancelTrigger(TriggerKey<K> triggerKey, boolean shouldRemove) {
    TriggerImplHandler triggerImplHandler = triggers.get(triggerKey);
    if (triggerImplHandler != null) {
      triggerImplHandler.cancel();
    }
    if (shouldRemove && triggerKey != null) {
      triggers.remove(triggerKey);
    }
  }
Cancels the firing of the {@link TriggerImpl} identified by this {@link TriggerKey} and optionally removes it.
samza-core/src/main/java/org/apache/samza/operators/impl/WindowOperatorImpl.java