public abstract class AbstractDownloadCallable extends Object implements Callable<File>
TransferManager
.PresignUrlDownloadCallable
Modifier and Type | Field and Description |
---|---|
protected File |
dstfile |
protected ExecutorService |
executor
The thread pool in which partial objects are downloaded.
|
protected List<Future<Long>> |
futures |
Modifier | Constructor and Description |
---|---|
protected |
AbstractDownloadCallable(com.ibm.cloud.objectstorage.services.s3.transfer.internal.AbstractDownloadCallableConfig options) |
Modifier and Type | Method and Description |
---|---|
File |
call()
This method must return a non-null object, or else the existing
implementation in
AbstractTransfer.waitForCompletion()
would block forever. |
protected static com.ibm.cloud.objectstorage.services.s3.transfer.internal.AbstractDownloadCallableConfig |
constructCallableConfig(ExecutorService executor,
File dstfile,
CountDownLatch latch,
AbortableTransfer download,
boolean isDownloadParallel,
ScheduledExecutorService timedExecutor,
long timeout) |
protected abstract void |
downloadAsSingleObject()
Download the object from S3 in a single request
|
protected abstract void |
downloadInParallel()
Download the object from S3 in multiple requests
|
protected abstract void |
setState(Transfer.TransferState transferState)
Set the current
Transfer.TransferState |
protected final ExecutorService executor
protected final File dstfile
protected AbstractDownloadCallable(com.ibm.cloud.objectstorage.services.s3.transfer.internal.AbstractDownloadCallableConfig options)
public File call() throws Exception
AbstractTransfer.waitForCompletion()
would block forever.protected abstract void setState(Transfer.TransferState transferState)
Transfer.TransferState
protected abstract void downloadAsSingleObject()
protected abstract void downloadInParallel() throws Exception
Exception
protected static com.ibm.cloud.objectstorage.services.s3.transfer.internal.AbstractDownloadCallableConfig constructCallableConfig(ExecutorService executor, File dstfile, CountDownLatch latch, AbortableTransfer download, boolean isDownloadParallel, ScheduledExecutorService timedExecutor, long timeout)
Copyright © 2024. All rights reserved.