Class TimeWheel

java.lang.Object
com.xxl.tool.concurrent.TimeWheel

public class TimeWheel extends Object
time wheel
Author:
xuxueli 2025-04-18
  • Constructor Details

    • TimeWheel

      public TimeWheel(int ticksCount, long tickDuration)
    • TimeWheel

      public TimeWheel(int ticksCount, long tickDuration, int taskExecutorCoreSize, int taskExecutorMaxSize, int taskExecutorQueueSize)
    • TimeWheel

      public TimeWheel(int ticksCount, long tickDuration, ExecutorService taskExecutor)
      constructor
      Parameters:
      ticksCount - ticks count
      tickDuration - tick duration, by millisecond
  • Method Details

    • start

      public void start()
      start time wheel
    • stop

      public void stop()
      stop time wheel
    • submitTask

      public boolean submitTask(long executeTime, Runnable task)
      submit task
      Parameters:
      executeTime -
      task -
      Returns: