java.lang.Object
com.aizuda.snailjob.server.job.task.support.timer.JobTimerWheel

public class JobTimerWheel extends Object
Since:
: 2.4.0
  • Constructor Details

    • JobTimerWheel

      public JobTimerWheel()
  • Method Details

    • registerWithWorkflow

      public static void registerWithWorkflow(Supplier<TimerTask<String>> task, Duration delay)
      定时任务添加时间轮
      Parameters:
      task - 任务
      delay - 延迟时间
    • registerWithJob

      public static void registerWithJob(Supplier<TimerTask<String>> task, Duration delay)
      工作流任务添加时间轮 虽然job和Workflow 添加时间轮方法逻辑一样为了后面做一些不同的逻辑,这里兼容分开写
      Parameters:
      task - 任务
      delay - 延迟时间
    • register

      public static void register(String idempotentKey, TimerTask<String> task, Duration delay)
    • register

      public static void register(String idempotentKey, Consumer<io.netty.util.HashedWheelTimer> consumer)
    • isExisted

      public static boolean isExisted(String idempotentKey)
    • clearCache

      public static void clearCache(String idempotentKey)