public class AradinThreadManager extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_SINGLE_POOL_NAME |
| 构造器和说明 |
|---|
AradinThreadManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Executor |
getDownloadPool()
Get the thread pool for downloading
|
static Executor |
getLongPool()
获取一个用于执行长耗时任务的线程池,避免和短耗时任务处在同一个队列 而阻塞了重要的短耗时的任务,通常用联网操作s
Get a thread pool for long-duration tasks
|
static Executor |
getShortPool()
获取一个用于执行短耗时任务的线程池,避免因为和耗时长的任务处在同一个队列而长时间得不到执行,通常用来执行本地的IO/SQL
Get a thread pool for short-duration tasks
|
static Executor |
getSinglePool()
Construct a one-thread pool for sync tasks
|
static Executor |
getSinglePool(String name) |
public static Executor getDownloadPool()
public static Executor getLongPool()
public static Executor getShortPool()
public static Executor getSinglePool()
Copyright © 2022. All rights reserved.