Enum Class ExpirationPolicy

java.lang.Object
java.lang.Enum<ExpirationPolicy>
cool.scx.scheduling.ExpirationPolicy
All Implemented Interfaces:
Serializable, Comparable<ExpirationPolicy>, Constable

public enum ExpirationPolicy extends Enum<ExpirationPolicy>
过期策略
Version:
0.0.1
Author:
scx567888
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    回溯补偿 针对单次任务 可以理解为立即执行 和 IMMEDIATE_COMPENSATION 相同 针对多次任务 会计算未执行的次数 然后立即执行 之后按照正常调度时间点处理
    回溯忽略 针对单次任务 可以理解为不执行 针对多次任务 会计算距离当前最近的调度时间点 之前的跳过 (runCount 会增加) 可以理解为之前的任务执行了 (实际并没有,被忽略了) 但是 runCount 还是会增加
    立即补偿 针对单次任务 可以理解为立即执行 针对多次任务 会立即执行一次 之后按照正常调度时间点处理
    立即忽略 针对单次任务 可以理解为不执行 针对多次任务 会计算距离当前最近的调度时间点 之前的跳过 (runCount 不会增加)
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • IMMEDIATE_IGNORE

      public static final ExpirationPolicy IMMEDIATE_IGNORE
      立即忽略 针对单次任务 可以理解为不执行 针对多次任务 会计算距离当前最近的调度时间点 之前的跳过 (runCount 不会增加)
    • BACKTRACKING_IGNORE

      public static final ExpirationPolicy BACKTRACKING_IGNORE
      回溯忽略 针对单次任务 可以理解为不执行 针对多次任务 会计算距离当前最近的调度时间点 之前的跳过 (runCount 会增加) 可以理解为之前的任务执行了 (实际并没有,被忽略了) 但是 runCount 还是会增加
    • IMMEDIATE_COMPENSATION

      public static final ExpirationPolicy IMMEDIATE_COMPENSATION
      立即补偿 针对单次任务 可以理解为立即执行 针对多次任务 会立即执行一次 之后按照正常调度时间点处理
    • BACKTRACKING_COMPENSATION

      public static final ExpirationPolicy BACKTRACKING_COMPENSATION
      回溯补偿 针对单次任务 可以理解为立即执行 和 IMMEDIATE_COMPENSATION 相同 针对多次任务 会计算未执行的次数 然后立即执行 之后按照正常调度时间点处理
  • Method Details

    • values

      public static ExpirationPolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ExpirationPolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null