public class ThreadUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
AVAILABLE_PROCESSORS |
static int |
CORE_POOL_SIZE |
static long |
KEEP_ALIVE_TIME |
static int |
MAX_POOL_SIZE_FOR_GROUP |
static int |
MAX_POOL_SIZE_FOR_TIO |
| Modifier and Type | Method and Description |
|---|---|
static ExecutorService |
getBizExecutor(int poolSize)
获取 biz 业务线程池
|
static ExecutorService |
getGroupExecutor()
getGroupExecutor
|
static ExecutorService |
getGroupExecutor(int groupPoolSize)
获取 tio group 线程池
|
static SynThreadPoolExecutor |
getTioExecutor()
getTioExecutor
|
static SynThreadPoolExecutor |
getTioExecutor(int tioPoolSize)
获取 getTioExecutor 线程池
|
static boolean |
sleep(long millis)
挂起当前线程
|
static String |
stackTrace()
stackTrace
|
public static final int AVAILABLE_PROCESSORS
public static final int CORE_POOL_SIZE
public static final int MAX_POOL_SIZE_FOR_GROUP
public static final int MAX_POOL_SIZE_FOR_TIO
public static final long KEEP_ALIVE_TIME
public static ExecutorService getGroupExecutor()
public static SynThreadPoolExecutor getTioExecutor()
public static boolean sleep(long millis)
millis - 挂起的毫秒数public static ExecutorService getGroupExecutor(int groupPoolSize)
groupPoolSize - group 线程大小public static SynThreadPoolExecutor getTioExecutor(int tioPoolSize)
tioPoolSize - tio 线程池大小public static ExecutorService getBizExecutor(int poolSize)
poolSize - 业务线程池大小public static String stackTrace()
Copyright © 2025. All rights reserved.