public class PoolConfig extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
ThreadPoolExecutor |
batchDownloadTaskThreadPoolExecutor
批量任务下载完成后处理线程池
|
boolean |
deleteTemporaryFile
是否删除临时文件
|
String |
directoryPath
全局保存目录
|
List<DownloadPoolListener> |
downloadPoolListenerList
线程池事件监听接口
|
ThreadPoolExecutor |
downloadThreadPoolExecutor
实际http下载线程池
|
int |
downloadTimeoutMillis
下载超时时间
|
java.util.function.BiFunction<cn.schoolwow.quickhttp.response.Response,Path,Boolean> |
fileIntegrityChecker
全局文件完整性校验函数
|
int |
maxDownloadSpeed
最大下载速度(kb/s)
|
int |
maxThreadConnection
最大线程连接个数
|
int |
retryTimes
下载失败重试次数
|
boolean |
singleThread
是否强制单线程下载
|
String |
temporaryDirectoryPath
临时文件目录
|
ThreadPoolExecutor |
threadPoolExecutor
下载任务调度线程池
|
| 构造器和说明 |
|---|
PoolConfig() |
public int retryTimes
public boolean deleteTemporaryFile
public boolean singleThread
public int downloadTimeoutMillis
public int maxThreadConnection
public int maxDownloadSpeed
public String temporaryDirectoryPath
public String directoryPath
public java.util.function.BiFunction<cn.schoolwow.quickhttp.response.Response,Path,Boolean> fileIntegrityChecker
public List<DownloadPoolListener> downloadPoolListenerList
public ThreadPoolExecutor threadPoolExecutor
public ThreadPoolExecutor downloadThreadPoolExecutor
public ThreadPoolExecutor batchDownloadTaskThreadPoolExecutor
Copyright © 2021. All rights reserved.