Package org.springframework.scheduling.support

Examples of org.springframework.scheduling.support.DelegatingErrorHandlingRunnable


   * @param task the ScheduledExecutorTask to schedule
   * @return the actual Runnable to schedule (may be a decorator)
   */
  protected Runnable getRunnableToSchedule(ScheduledExecutorTask task) {
    return (this.continueScheduledExecutionAfterException ?
        new DelegatingErrorHandlingRunnable(task.getRunnable(), TaskUtils.LOG_AND_SUPPRESS_ERROR_HANDLER) :
        new DelegatingErrorHandlingRunnable(task.getRunnable(), TaskUtils.LOG_AND_PROPAGATE_ERROR_HANDLER));
  }
View Full Code Here


   * @param task the ScheduledExecutorTask to schedule
   * @return the actual Runnable to schedule (may be a decorator)
   */
  protected Runnable getRunnableToSchedule(ScheduledExecutorTask task) {
    return this.continueScheduledExecutionAfterException
        ? new DelegatingErrorHandlingRunnable(task.getRunnable(), TaskUtils.LOG_AND_SUPPRESS_ERROR_HANDLER)
        : new DelegatingErrorHandlingRunnable(task.getRunnable(), TaskUtils.LOG_AND_PROPAGATE_ERROR_HANDLER);
  }
View Full Code Here

  @PostConstruct
  public void start() throws Exception {
    Assert.isTrue(period > 0);

    //任何异常不会中断schedule执行
    Runnable task = new DelegatingErrorHandlingRunnable(this, TaskUtils.LOG_AND_SUPPRESS_ERROR_HANDLER);

    scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(new CustomizableThreadFactory(
        "JdkExecutorJob"));

    //scheduleAtFixedRatefixRate() 固定任务两次启动之间的时间间隔.
View Full Code Here

TOP

Related Classes of org.springframework.scheduling.support.DelegatingErrorHandlingRunnable

Copyright © 2018 www.massapicom. 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.