| Modifier and Type | Method and Description |
|---|---|
static org.apache.commons.lang3.tuple.Pair<String,DownloadIoJob> |
createNewJob(GPUdb db,
GPUdbFileHandler.Options fileHandlerOptions,
String remoteFileName,
String localFileName,
KifsFileInfo kifsFileInfo,
DownloadOptions downloadOptions,
FileDownloadListener callback)
Static helper method to create new instance of
DownloadIoJob |
String |
getDownloadFileName() |
String |
getDownloadLocalFileName() |
String |
getJobId() |
ExecutorService |
getThreadPool() |
void |
start()
This method starts the job to download the multipart file by submitting
different segments of the file according to the value returned by
getFileSizeToSplit() method of GPUdbFileHandler.Options class.
|
List<Result> |
stop()
This method is used to stop all the running
IoTask instances
by shutting down the thread pool running them after they're completed. |
public String getDownloadFileName()
public String getDownloadLocalFileName()
public static org.apache.commons.lang3.tuple.Pair<String,DownloadIoJob> createNewJob(GPUdb db, GPUdbFileHandler.Options fileHandlerOptions, String remoteFileName, String localFileName, KifsFileInfo kifsFileInfo, DownloadOptions downloadOptions, FileDownloadListener callback) throws GPUdbException
DownloadIoJobdb - - The GPUdb instancefileHandlerOptions - remoteFileName - - Name of the KIFS file to be downloadedlocalFileName - - Name of the local file with directorykifsFileInfo - - A KifsFileInfo objectdownloadOptions - - A DownloadOptions object.callback - - A FileDownloadListener implementationPair of JobId and DownloadIoJob object.GPUdbExceptionpublic String getJobId()
public ExecutorService getThreadPool()
public void start()
throws GPUdbException
IoTask which is
run in an independent threadGPUdbExceptionGPUdbFileHandler.getOptions()public List<Result> stop()
IoTask instances
by shutting down the thread pool running them after they're completed.
Each completed Future object will return a Result object
which can be examined to get the exact status of the background job.Result,
CompletionService,
- method terminateJobs().Copyright © 2025. All rights reserved.