本文整理汇总了Java中org.springframework.scheduling.quartz.SimpleTriggerFactoryBean类的典型用法代码示例。如果您正苦于以下问题:Java SimpleTriggerFactoryBean类的具体用法?Java SimpleTriggerFactoryBean怎么用?Java SimpleTriggerFactoryBean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleTriggerFactoryBean类属于org.springframework.scheduling.quartz包,在下文中一共展示了SimpleTriggerFactoryBean类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: 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();
}
开发者ID:javabypatel,项目名称:spring-boot-quartz-demo,代码行数:19,代码来源:JobUtil.java
示例2: 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();
}
开发者ID:hzwy23,项目名称:batch-scheduler,代码行数:17,代码来源:BatchSchedulerConfig.java
示例3: 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;
}
开发者ID:gagoyal01,项目名称:mongodb-rdbms-sync,代码行数:9,代码来源:MvcConfiguration.java
示例4: 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;
}
开发者ID:gagoyal01,项目名称:mongodb-rdbms-sync,代码行数:9,代码来源:MvcConfiguration.java
示例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);
}
开发者ID:andrehertwig,项目名称:spring-boot-starter-quartz,代码行数:9,代码来源:TestContextConfiguration4.java
示例6: QuartzSimpleTriggerBuilder
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
public QuartzSimpleTriggerBuilder() {
triggerFactoryBean = new SimpleTriggerFactoryBean();
}
开发者ID:andrehertwig,项目名称:spring-boot-starter-quartz,代码行数:4,代码来源:QuartzUtils.java
示例7: getTriggerFactoryBean
import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean; //导入依赖的package包/类
public SimpleTriggerFactoryBean getTriggerFactoryBean() {
return triggerFactoryBean;
}
开发者ID:andrehertwig,项目名称:spring-boot-starter-quartz,代码行数:4,代码来源:QuartzUtils.java
示例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);
}
开发者ID:andrehertwig,项目名称:spring-boot-starter-quartz,代码行数:5,代码来源:TestContextConfiguration4.java
示例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();
}
开发者ID:andrehertwig,项目名称:spring-boot-starter-quartz,代码行数:26,代码来源:QuartzUtils.java
注:本文中的org.springframework.scheduling.quartz.SimpleTriggerFactoryBean类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论