类 RejectedExecutionHandlers

java.lang.Object
cn.wjybxx.concurrent.RejectedExecutionHandlers

public class RejectedExecutionHandlers extends Object
作者:
wjybxx date 2023/4/11
  • 方法详细资料

    • abort

      public static RejectedExecutionHandler abort()
      抛出拒绝异常
    • callerRuns

      public static RejectedExecutionHandler callerRuns()
      调用者执行策略:调用execute方法的线程执行。 注意: 1. 必须有序执行的任务不能使用该策略。 2. 如果资源只能特定线程能访问,也不能使用该策略。
    • discard

      public static RejectedExecutionHandler discard()
      丢弃任务
    • record

      public static RejectedExecutionHandler record()
      仅仅是记录一条错误日志