@Override public TriggerResult answer(InvocationOnMock invocation) throws Exception { @SuppressWarnings("unchecked") Trigger.TriggerContext context = (Trigger.TriggerContext) invocation.getArguments()[3]; context.deleteEventTimeTimer(timestamp); return TriggerResult.CONTINUE; } })
@Override public Object answer(InvocationOnMock invocation) throws Exception { Trigger.TriggerContext context = (Trigger.TriggerContext) invocation.getArguments()[1]; context.deleteEventTimeTimer(0L); context.getPartitionedState(valueStateDescriptor).clear(); return null; } }).when(mockTrigger).clear(anyTimeWindow(), anyTriggerContext());
@Override public void clear(TimeWindow window, TriggerContext ctx) throws Exception { ctx.deleteEventTimeTimer(window.maxTimestamp()); }
@Override public void clear(TimeWindow window, TriggerContext ctx) throws Exception { ctx.deleteEventTimeTimer(window.maxTimestamp()); }
@Override public void clear(TimeWindow window, TriggerContext ctx) throws Exception { ctx.deleteEventTimeTimer(window.maxTimestamp()); }
@Override public void clear(W window, TriggerContext ctx) throws Exception { ReducingState<Long> fireTimestamp = ctx.getPartitionedState(stateDesc); Long timestamp = fireTimestamp.get(); if (timestamp != null) { ctx.deleteEventTimeTimer(timestamp); fireTimestamp.clear(); } }
@Override public void clear(W window, TriggerContext ctx) throws Exception { ReducingState<Long> fireTimestamp = ctx.getPartitionedState(stateDesc); Long timestamp = fireTimestamp.get(); if (timestamp != null) { ctx.deleteEventTimeTimer(timestamp); fireTimestamp.clear(); } }
@Override public void clear(W window, TriggerContext ctx) throws Exception { ReducingState<Long> fireTimestamp = ctx.getPartitionedState(stateDesc); Long timestamp = fireTimestamp.get(); if (timestamp != null) { ctx.deleteEventTimeTimer(timestamp); fireTimestamp.clear(); } }
@Override public void clear(TimeWindow window, TriggerContext ctx) throws Exception { ctx.deleteEventTimeTimer(window.maxTimestamp()); }
@Override public void clear(TimeWindow window, TriggerContext ctx) throws Exception { ctx.deleteEventTimeTimer(window.maxTimestamp()); }
@Override public void deleteTimer(Trigger.TriggerContext ctx, long timestamp) { ctx.deleteEventTimeTimer(timestamp); }
@Override public void clear(W window, TriggerContext ctx) throws Exception { ReducingState<Long> fireTimestamp = ctx.getPartitionedState(stateDesc); Long timestamp = fireTimestamp.get(); if (timestamp != null) { ctx.deleteEventTimeTimer(timestamp); fireTimestamp.clear(); } }