当前位置: 首页>>代码示例>>Java>>正文


Java CallerRunsRejectedJobsHandler类代码示例

本文整理汇总了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;
  }
 
开发者ID:flowing,项目名称:flowing-retail,代码行数:14,代码来源:CamundaJobExecutorConfiguration.java

示例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;
}
 
开发者ID:camunda,项目名称:camunda-bpm-spring-boot-starter,代码行数:11,代码来源:DefaultJobConfiguration.java

示例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();
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:14,代码来源:JobExecutorMetricsTest.java


注:本文中的org.camunda.bpm.engine.impl.jobexecutor.CallerRunsRejectedJobsHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。