*/
private static void updateNextExpiration(final RightTuple rightTuple,
final InternalWorkingMemory workingMemory,
final SlidingTimeWindow stw,
final Object context) {
TimerService clock = workingMemory.getTimerService();
if ( rightTuple != null ) {
long nextTimestamp = ((EventFactHandle) rightTuple.getFactHandle()).getStartTimestamp() + stw.getSize();
JobContext jobctx = new BehaviorJobContext( workingMemory,
stw,
context );
JobHandle handle = clock.scheduleJob( job,
jobctx,
new PointInTimeTrigger( nextTimestamp, null, null ) );
jobctx.setJobHandle( handle );
}
}