本文整理汇总了Java中org.springframework.scheduling.quartz.SimpleTriggerFactoryBean类的典型用法代码示例。如果您正苦于以下问题:Java SimpleTriggerFactoryBean类的具体用法?Java SimpleTriggerFactoryBean怎么用?Java SimpleTriggerFactoryBean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleTriggerFactoryBean类属于org.springframework.scheduling.quartz包,在下文中一共展示了SimpleTriggerFactoryBean类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEventJobTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
@Bean
public SimpleTriggerFactoryBean getEventJobTrigger(){
SimpleTriggerFactoryBean bean = new SimpleTriggerFactoryBean();
bean.setJobDetail(getEventJob().getObject());
bean.setStartDelay(40000);
bean.setRepeatInterval(60000);
return bean;
}
示例2: createSingleTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
/**
* Create a Single trigger.
*
* @param triggerName Trigger name.
* @param startTime Trigger start time.
* @param misFireInstruction Misfire instruction (what to do in case of misfire happens).
*
* @return Trigger
*/
protected static Trigger createSingleTrigger(String triggerName, Date startTime, int misFireInstruction){
SimpleTriggerFactoryBean factoryBean = new SimpleTriggerFactoryBean();
factoryBean.setName(triggerName);
factoryBean.setStartTime(startTime);
factoryBean.setMisfireInstruction(misFireInstruction);
factoryBean.setRepeatCount(0);
factoryBean.afterPropertiesSet();
return factoryBean.getObject();
}
示例3: createSimpleTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
/**
* 将任务与触发器关联
* 每一个任务,对应着一个触发器
* 每一个触发器,也只对应一个任务
*/
private SimpleTrigger createSimpleTrigger(String jobName) throws DuplicateJobException {
SimpleTriggerFactoryBean simpleTriggerFactoryBean = new SimpleTriggerFactoryBean();
JobDetail job = jobDetailFactoryBean(jobName).getObject();
simpleTriggerFactoryBean.setJobDetail(job);
simpleTriggerFactoryBean.setRepeatCount(0);
simpleTriggerFactoryBean.setRepeatInterval(12);
simpleTriggerFactoryBean.setGroup(jobName);
simpleTriggerFactoryBean.setName(jobName);
simpleTriggerFactoryBean.afterPropertiesSet();
return simpleTriggerFactoryBean.getObject();
}
示例4: getMonitorJobTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
@Bean
public SimpleTriggerFactoryBean getMonitorJobTrigger(){
SimpleTriggerFactoryBean bean = new SimpleTriggerFactoryBean();
bean.setJobDetail(getMonitorJob().getObject());
bean.setStartDelay(120000);
bean.setRepeatInterval(60000);
return bean;
}
示例5: createSimpleTrigger2
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
@Bean(name="simpleJobTrigger2")
public SimpleTriggerFactoryBean createSimpleTrigger2(@Qualifier("simpleJobDetail") JobDetail jobDetail) {
Map<String, Object> map = new HashMap<>(1);
map.put("myKey", "myValue");
return QuartzUtils.createSimpleTrigger(jobDetail, "STName2", "STGroup2", "STDesc2", 10000L, 30000L,
SimpleTrigger.REPEAT_INDEFINITELY,
SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT, map, 1000);
}
示例6: QuartzSimpleTriggerBuilder
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
public QuartzSimpleTriggerBuilder() {
triggerFactoryBean = new SimpleTriggerFactoryBean();
}
示例7: getTriggerFactoryBean
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
public SimpleTriggerFactoryBean getTriggerFactoryBean() {
return triggerFactoryBean;
}
示例8: createSimpleTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
@Bean(name="simpleJobTrigger")
public SimpleTriggerFactoryBean createSimpleTrigger(@Qualifier("simpleJobDetail") JobDetail jobDetail) {
return QuartzUtils.createSimpleTrigger(jobDetail, null, null, "Simple trigger 1", 5000L, 60000L, null);
}
示例9: createSimpleTrigger
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
/**
* creates a SimpleTriggerFactoryBean regarding the parameters with {@link SimpleTrigger#REPEAT_INDEFINITELY} and
* {@link SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT}
*
* @see QuartzUtils#createSimpleTrigger(JobDetail, String, String, String, long, long, int, int, Map, int)
*
* @param jobDetail
* @param triggerName (optional)
* @param triggerGroup (optional)
* @param triggerDescription (optional)
* @param startDelay
* @param repeatInterval
* @param jobData (optional)
* @return
*/
public static SimpleTriggerFactoryBean createSimpleTrigger(JobDetail jobDetail, String triggerName,
String triggerGroup, String triggerDescription, long startDelay, long repeatInterval,
Map<String, ?> jobData) {
return QuartzUtils.simpleTriggerBuilder().jobDetail(jobDetail).name(triggerName).group(triggerGroup)
.description(triggerDescription).startDelay(startDelay).repeatInterval(repeatInterval)
.repeatCount(SimpleTrigger.REPEAT_INDEFINITELY)
.misfireInstruction(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT)
.putJobData(jobData).getTriggerFactoryBean();
}