Examples of scheduleJob()


Examples of org.drools.time.TimerService.scheduleJob()

                JobContext jobctx = new BehaviorJobContext( nodeId,
                                                            workingMemory,
                                                            stw,
                                                            memory,
                                                            context );
                JobHandle handle = clock.scheduleJob( job,
                                                      jobctx,
                                                      new PointInTimeTrigger( nextTimestamp, null, null ) );
                jobctx.setJobHandle( handle );
            }
        }
View Full Code Here

Examples of org.drools.time.TimerService.scheduleJob()

            long nextTimestamp = Math.max( clock.getCurrentTime(),
                                           ((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 );
View Full Code Here

Examples of org.drools.time.TimerService.scheduleJob()

            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 );
View Full Code Here

Examples of org.drools.time.TimerService.scheduleJob()

           
            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 );
View Full Code Here

Examples of org.drools.time.TimerService.scheduleJob()

        if ( rightTuple != null ) {
            long nextTimestamp = ((EventFactHandle) rightTuple.getFactHandle()).getStartTimestamp() + this.size;
            JobContext jobctx = new BehaviorJobContext( workingMemory,
                                                        this,
                                                        context );
            JobHandle handle = clock.scheduleJob( job,
                                                  jobctx,
                                                  new PointInTimeTrigger( nextTimestamp, null, null ) );
            jobctx.setJobHandle( handle );
        }
    }
View Full Code Here

Examples of org.drools.time.TimerService.scheduleJob()

            long nextTimestamp = ((EventFactHandle) rightTuple.getFactHandle()).getStartTimestamp() + this.size;
            JobContext jobctx = new BehaviorJobContext( workingMemory,
                                                        this,
                                                        context );
            BehaviorJob job = new BehaviorJob();
            JobHandle handle = clock.scheduleJob( job,
                                                  jobctx,
                                                  new PointInTimeTrigger( nextTimestamp ) );
            jobctx.setJobHandle( handle );
        }
    }
View Full Code Here

Examples of org.drools.time.impl.JDKTimerService.scheduleJob()


        Long evictionWakeUpTime = contextTemp.getEvictionWakeUpTime();


        timer.scheduleJob(new EvictionJob(contextTemp), new MockJobContext(), new MockTrigger(new Date(), evictionWakeUpTime));
        //Set the timestamp for the first time
        contextTemp.set("myvalue", "value");

        Thread.sleep(1000);
       
View Full Code Here

Examples of org.quartz.Scheduler.scheduleJob()

      trigger.setGroup(LOG_DISPLAYER_GROUP);
      trigger.setCronExpression("* * * * * ?");
      // Schedule job now
      Scheduler scheduler = (Scheduler) CoreSpringFactory.getBean("schedulerFactoryBean");
      scheduler.addJobListener(this);
      scheduler.scheduleJob(jobDetail, trigger);
    } catch (ParseException e) {
      logError("Can not parse log viewer cron expression", e);
    } catch (SchedulerException e) {
      logError("Problem when creating log viewer scheduler", e);
    }
View Full Code Here

Examples of org.quartz.Scheduler.scheduleJob()

      }
      // Use this cron expression for debugging, tries to send data every minute
      //trigger.setCronExpression("0 * * * * ?");
      trigger.setCronExpression(cronExpression);
      // Schedule job now
      scheduler.scheduleJob(jobDetail, trigger);
    } catch (ParseException e) {

      logError("Illegal cron expression for scheduling translation status generator", e);
    } catch (SchedulerException e) {
      logError("Can not start translation status generator scheduler", e);
View Full Code Here

Examples of org.quartz.Scheduler.scheduleJob()

      JobDetail jobDetail = new JobDetail("LDAP_Cron_Syncer_Job", Scheduler.DEFAULT_GROUP, LDAPUserSynchronizerJob.class);
      CronTrigger trigger = new CronTrigger();
      trigger.setName("LDAP_Cron_Syncer_Trigger");
      trigger.setCronExpression(ldapSyncCronSyncExpression);
      // Schedule job now
      scheduler.scheduleJob(jobDetail, trigger);
      log.info("LDAP cron syncer is enabled with expression::" + ldapSyncCronSyncExpression);
    } catch (ParseException e) {
      setLdapSyncCronSync(false);
      log
          .error(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.