Class CyclicThread

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

public class CyclicThread extends Object
Cyclic Thread
Author:
xuxueli 2025-04-06
  • Constructor Details

    • CyclicThread

      public CyclicThread(String name, Runnable runnable, long cyclicInterval)
    • CyclicThread

      public CyclicThread(String name, Runnable runnable, long cyclicInterval, boolean alignTime)
    • CyclicThread

      public CyclicThread(String name, boolean daemon, Runnable runnable, long cyclicInterval)
    • CyclicThread

      public CyclicThread(String name, boolean daemon, Runnable runnable, long cyclicInterval, boolean alignTime)
      constructor
      Parameters:
      name - thread name
      daemon - true daemon thread, will be killed when main thread exit; false user thread.
      runnable - cyclic method
      cyclicInterval - cycle interval, for millisecond
      alignTime - true: align time, all nodes run at the same time
  • Method Details

    • start

      public void start()
      start
    • stop

      public void stop()
      stop