public interface DownloadPoolConfig
| 限定符和类型 | 方法和说明 |
|---|---|
DownloadPoolConfig |
deleteTemporaryFile(boolean deleteTemporaryFile)
是否删除临时文件(默认删除)
|
DownloadPoolConfig |
directoryPath(String directoryPath)
指定全局文件保存目录
|
DownloadPoolConfig |
downloadPoolListener(DownloadPoolListener downloadPoolListener)
指定线程池事件监听接口
|
DownloadPoolConfig |
fileIntegrityChecker(java.util.function.BiFunction<cn.schoolwow.quickhttp.response.Response,Path,Boolean> fileIntegrityChecker)
指定全局文件完整性校验函数
|
DownloadPoolConfig |
maxDownloadSpeed(int maxDownloadSpeed)
指定最大下载速度(kb/s)
|
DownloadPoolConfig |
maxDownloadTimeout(int downloadTimeoutMillis)
指定全局下载任务超时时间
|
DownloadPoolConfig |
maxThreadConnection(int maxThreadConnection)
指定全局最大线程连接个数
|
DownloadPoolConfig |
parallelDownloadCount(int parallelDownloadCount)
指定最大同时下载任务个数
|
DownloadPoolConfig |
retryTimes(int retryTimes)
下载失败重试次数(默认3次)
|
DownloadPoolConfig |
singleThread(boolean singleThread)
是否强制单线程下载
|
DownloadPoolConfig |
temporaryDirectoryPath(String temporaryDirectoryPath)
指定临时文件目录
|
DownloadPoolConfig temporaryDirectoryPath(String temporaryDirectoryPath)
temporaryDirectoryPath - 临时文件目录DownloadPoolConfig retryTimes(int retryTimes)
retryTimes - 下载失败重试次数DownloadPoolConfig deleteTemporaryFile(boolean deleteTemporaryFile)
deleteTemporaryFile - 是否删除临时文件DownloadPoolConfig singleThread(boolean singleThread)
singleThread - 是否强制单线程下载DownloadPoolConfig maxDownloadTimeout(int downloadTimeoutMillis)
downloadTimeoutMillis - 下载任务超时时间(ms)DownloadPoolConfig maxDownloadSpeed(int maxDownloadSpeed)
maxDownloadSpeed - 最大下载速度(kb/s)DownloadPoolConfig maxThreadConnection(int maxThreadConnection)
maxThreadConnection - 最大线程连接个数(默认个数为CPU核心数*2)DownloadPoolConfig directoryPath(String directoryPath)
directoryPath - 文件保存目录DownloadPoolConfig parallelDownloadCount(int parallelDownloadCount)
parallelDownloadCount - 最大同时下载任务个数(默认个数为CPU核心数)DownloadPoolConfig fileIntegrityChecker(java.util.function.BiFunction<cn.schoolwow.quickhttp.response.Response,Path,Boolean> fileIntegrityChecker)
fileIntegrityChecker - 文件完整性校验函数DownloadPoolConfig downloadPoolListener(DownloadPoolListener downloadPoolListener)
downloadPoolListener - 线程池事件监听接口Copyright © 2021. All rights reserved.