Add the given {@link org.quartz.JobDetail} to the Scheduler, and associate the given {@link Trigger} with it.
{@link org.quartz.JobDetail}
{@link Trigger}
If the given Trigger does not reference any Job, then it will be set to reference the Job passed with it into this method.
Job
716717718719720721722723724725726
TimerService clock = inCtx.wm.getTimerService(); JobContext jobctx = new ExpireJobContext( new WorkingMemoryReteExpireAction(factHandle, otn), inCtx.wm ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( _expire.getNextFireTimestamp(), null, null ) ); jobctx.setJobHandle( handle );
243244245246247248249250251252253
// but the engine silently accepts them anyway, resulting in possibly undesirable behaviors workingMemory.queueWorkingMemoryAction( new BehaviorExpireWMAction( nodeId, stw, memory, context, pctx ) ); } else { JobContext jobctx = new BehaviorJobContext( nodeId, workingMemory, stw, memory, context, pctx); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimestamp, null, null ) ); jobctx.setJobHandle( handle ); } }
306307308309310311312313314315316
long nextTimestamp = Math.max( clock.getCurrentTime() + this.expirationOffset, ((EventFactHandle) factHandle).getEndTimestamp() + this.expirationOffset ); JobContext jobctx = new ExpireJobContext( expire, workingMemory ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimestamp, null, null ) ); jobctx.setJobHandle( handle );
720721722723724725726727728729730
TimerService clock = inCtx.wm.getTimerService(); JobContext jobctx = new ExpireJobContext( new WorkingMemoryReteExpireAction( factHandle, otn ), inCtx.wm ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimeStamp, null, null ) ); jobctx.setJobHandle( handle );
122123124125126127128129130131132
} catch ( ClassNotFoundException ex ) { Logger.getLogger( SchedulerClient.class.getName() ).log( Level.SEVERE, null, ex ); } return sched.scheduleJob( job, ctx, trigger ); } // If we have a service configuration int redundancy = 1;
678679680681682683684685686687688
TimerService clock = inCtx.wm.getTimerService(); JobContext jobctx = new ExpireJobContext( new WorkingMemoryReteExpireAction(factHandle, otn), inCtx.wm ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimeStamp, null, null ) ); jobctx.setJobHandle( handle );
699700701702703704705706707708709
224225226227228229230231232233234
long nextTimestamp = Math.max( clock.getCurrentTime() + this.expirationOffset, ((EventFactHandle) factHandle).getStartTimestamp() + this.expirationOffset ); JobContext jobctx = new ExpireJobContext( expire, workingMemory ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimestamp, null, null ) ); jobctx.setJobHandle( handle );
242243244245246247248249250251252
655656657658659660661662663664665