类 ThreadUtil

java.lang.Object
top.yqingyu.common.utils.ThreadUtil

public class ThreadUtil extends Object
版本:
1.0.0
作者:
YYJ
  • 构造器详细资料

    • ThreadUtil

      public ThreadUtil()
  • 方法详细资料

    • setThisThreadName

      public static void setThisThreadName(String name)
      参数:
      name - 当前线程名称
    • createQyFixedThreadPool

      public static ThreadPoolExecutor createQyFixedThreadPool(int size, String poolName, String threadName)
      参数:
      size - 线程数
      poolName - 池名
      threadName - 线程名
    • createScheduledPool

      public static ScheduledThreadPoolExecutor createScheduledPool(int size, String poolName, String threadName)
      参数:
      size - 线程数
      poolName - 池名
      threadName - 线程名
    • createPeriodScheduled

      public static void createPeriodScheduled(long iniDelay, long period, TimeUnit unit, Runnable runnable)
      参数:
      iniDelay - 启动时间
      period - 间隔时间
      unit - 时间单位
      runnable - run obj