本文整理汇总了Java中org.camunda.bpm.engine.impl.jobexecutor.CallerRunsRejectedJobsHandler类的典型用法代码示例。如果您正苦于以下问题:Java CallerRunsRejectedJobsHandler类的具体用法?Java CallerRunsRejectedJobsHandler怎么用?Java CallerRunsRejectedJobsHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CallerRunsRejectedJobsHandler类属于org.camunda.bpm.engine.impl.jobexecutor包,在下文中一共展示了CallerRunsRejectedJobsHandler类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: jobExecutor
import org.camunda.bpm.engine.impl.jobexecutor.CallerRunsRejectedJobsHandler; //导入依赖的package包/类
@Bean
@ConditionalOnProperty(prefix = "camunda.bpm.job-execution", name = "enabled", havingValue = "true", matchIfMissing = true)
public static JobExecutor jobExecutor(@Qualifier(JobConfiguration.CAMUNDA_TASK_EXECUTOR_QUALIFIER) final TaskExecutor taskExecutor) {
final SpringJobExecutor springJobExecutor = new SpringJobExecutor();
springJobExecutor.setTaskExecutor(taskExecutor);
springJobExecutor.setRejectedJobsHandler(new CallerRunsRejectedJobsHandler());
springJobExecutor.setWaitTimeInMillis(10);
// springJobExecutor.setWaitIncreaseFactor(1.0f);
springJobExecutor.setMaxWait(20);
return springJobExecutor;
}
示例2: jobExecutor
import org.camunda.bpm.engine.impl.jobexecutor.CallerRunsRejectedJobsHandler; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(JobExecutor.class)
@ConditionalOnProperty(prefix = "camunda.bpm.job-execution", name = "enabled", havingValue = "true", matchIfMissing = true)
public static JobExecutor jobExecutor(@Qualifier(CAMUNDA_TASK_EXECUTOR_QUALIFIER) final TaskExecutor taskExecutor) {
final SpringJobExecutor springJobExecutor = new SpringJobExecutor();
springJobExecutor.setTaskExecutor(taskExecutor);
springJobExecutor.setRejectedJobsHandler(new CallerRunsRejectedJobsHandler());
return springJobExecutor;
}
示例3: RejectingJobExecutor
import org.camunda.bpm.engine.impl.jobexecutor.CallerRunsRejectedJobsHandler; //导入依赖的package包/类
public RejectingJobExecutor() {
BlockingQueue<Runnable> threadPoolQueue = new ArrayBlockingQueue<Runnable>(queueSize);
threadPoolExecutor = new ThreadPoolExecutor(corePoolSize, maxPoolSize, 0L, TimeUnit.MILLISECONDS, threadPoolQueue) {
@Override
public void execute(Runnable command) {
throw new RejectedExecutionException();
}
};
threadPoolExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy());
rejectedJobsHandler = new CallerRunsRejectedJobsHandler();
}