public class ResumableDownloadTask<Requst extends ResumableDownloadRequest,Result extends ResumableDownloadResult>
extends java.lang.Object
implements java.util.concurrent.Callable<Result>
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
checkpointPath |
protected long |
completedPartSize |
protected int |
CPU_SIZE |
protected long |
downloadPartSize |
protected int |
KEEP_ALIVE_TIME |
protected int |
MAX_CORE_POOL_SIZE |
protected int |
MAX_IMUM_POOL_SIZE |
protected int |
MAX_QUEUE_SIZE |
protected java.lang.Exception |
mDownloadException |
protected java.lang.Object |
mLock |
protected long |
mPartExceptionCount |
protected java.util.concurrent.ThreadPoolExecutor |
mPoolExecutor |
protected int |
PART_SIZE_ALIGN_NUM |
protected static java.lang.String |
TEMP_SUFFIX |
限定符和类型 | 方法和说明 |
---|---|
Result |
call() |
protected void |
checkCancel() |
protected void |
checkException() |
protected void |
checkInitData() |
protected boolean |
checkWaitCondition(int partNum) |
protected ResumableDownloadResult |
doMultipartDownload() |
protected void |
notifyMultipartThread() |
protected void |
processException(java.lang.Exception e) |
protected void |
releasePool() |
protected boolean |
removeFile(java.lang.String filePath) |
protected final int CPU_SIZE
protected final int MAX_CORE_POOL_SIZE
protected final int MAX_IMUM_POOL_SIZE
protected final int KEEP_ALIVE_TIME
protected final int PART_SIZE_ALIGN_NUM
protected final int MAX_QUEUE_SIZE
protected static final java.lang.String TEMP_SUFFIX
protected java.util.concurrent.ThreadPoolExecutor mPoolExecutor
protected java.lang.Object mLock
protected java.lang.Exception mDownloadException
protected long completedPartSize
protected long downloadPartSize
protected long mPartExceptionCount
protected java.lang.String checkpointPath
public Result call() throws java.lang.Exception
call
在接口中 java.util.concurrent.Callable<Result extends ResumableDownloadResult>
java.lang.Exception
protected void checkInitData() throws ClientException, ServiceException, java.io.IOException
ClientException
ServiceException
java.io.IOException
protected boolean removeFile(java.lang.String filePath)
protected ResumableDownloadResult doMultipartDownload() throws ClientException, ServiceException, java.io.IOException, java.lang.InterruptedException
ClientException
ServiceException
java.io.IOException
java.lang.InterruptedException
protected void notifyMultipartThread()
protected void processException(java.lang.Exception e)
protected void releasePool()
protected void checkException() throws java.io.IOException, ServiceException, ClientException
java.io.IOException
ServiceException
ClientException
protected boolean checkWaitCondition(int partNum)
protected void checkCancel() throws ClientException
ClientException