Job {
public void execute(JobContext ctx) {
final TimerNodeJobContext timerJobCtx = (TimerNodeJobContext) ctx;
Trigger trigger = timerJobCtx.getTrigger();
LeftTupleList leftTuples = timerJobCtx.getTimerNodeMemory().getInsertOrUpdateLeftTuples();
LeftTuple lt = timerJobCtx.getLeftTuple();
if ( log.isTraceEnabled() ) {
log.trace( "Timer Executor {} {}", timerJobCtx.getTrigger(), lt );
}
synchronized ( leftTuples ) {
if ( timerJobCtx.getJobHandle().isCancel() ) {
// this is to force a sync point, as during update propagate it can cancel the FH
// we cannot have an update processed at the same timer is firing
return;
}
if ( lt.getMemory() == null ) {
// don't add it, if it's already added, which could happen with interval or cron timers
leftTuples.add( lt );
}
}
timerJobCtx.getTimerNodeMemory().setNodeDirtyWithoutNotify();