类 ThreadUtil
java.lang.Object
top.yqingyu.common.utils.ThreadUtil
- 版本:
- 1.0.0
- 作者:
- YYJ
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidcreatePeriodScheduled(long iniDelay, long period, TimeUnit unit, Runnable runnable) static ThreadPoolExecutorcreateQyFixedThreadPool(int size, String poolName, String threadName) static ScheduledThreadPoolExecutorcreateScheduledPool(int size, String poolName, String threadName) static voidsetThisThreadName(String name)
-
构造器详细资料
-
ThreadUtil
public ThreadUtil()
-
-
方法详细资料
-
setThisThreadName
- 参数:
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
-