public class UploadMonitor extends Object implements Callable<UploadResult>, TransferMonitor
isDone()
and
getFuture()
Modifier and Type | Method and Description |
---|---|
UploadResult |
call() |
static UploadMonitor |
create(TransferManager manager,
UploadImpl transfer,
ExecutorService threadPool,
UploadCallable multipartUploadCallable,
PutObjectRequest putObjectRequest,
ProgressListenerChain progressListenerChain)
Constructs a new upload watcher and then immediately submits it to
the thread pool.
|
Future<UploadResult> |
getFuture()
Returns a Future to wait on.
|
boolean |
isDone()
Returns whether the transfer is completed.
|
public Future<UploadResult> getFuture()
TransferMonitor
getFuture
in interface TransferMonitor
public boolean isDone()
TransferMonitor
isDone
in interface TransferMonitor
public static UploadMonitor create(TransferManager manager, UploadImpl transfer, ExecutorService threadPool, UploadCallable multipartUploadCallable, PutObjectRequest putObjectRequest, ProgressListenerChain progressListenerChain)
manager
- The TransferManager
that owns this upload.transfer
- The transfer being processed.threadPool
- The ExecutorService
to which we should submit new
tasks.multipartUploadCallable
- The callable responsible for processing the upload
asynchronouslyputObjectRequest
- The original putObject requestprogressListenerChain
- A chain of listeners that wish to be notified of upload
progresspublic UploadResult call() throws Exception
call
in interface Callable<UploadResult>
Exception
Copyright © 2020. All rights reserved.