public class UploadMonitor extends Object implements Callable<UploadResult>, TransferMonitor
isDone()
and
getFuture()
构造器和说明 |
---|
UploadMonitor(TransferManager manager,
UploadImpl transfer,
ExecutorService threadPool,
UploadCallable multipartUploadCallable,
PutObjectRequest putObjectRequest,
ProgressListenerChain progressListenerChain)
Constructs a new upload watcher, which immediately submits itself to the
thread pool.
|
UploadMonitor(TransferManager manager,
UploadImpl transfer,
ExecutorService threadPool,
UploadCallable multipartUploadCallable,
PutObjectRequest putObjectRequest,
ProgressListenerChain progressListenerChain)
|
限定符和类型 | 方法和说明 |
---|---|
UploadResult |
call() |
Future<UploadResult> |
getFuture()
Returns a Future to wait on.
|
boolean |
isDone()
Returns whether the transfer is completed.
|
void |
setTimedThreadPool(ScheduledExecutorService timedThreadPool) |
public UploadMonitor(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
progress@Deprecated public UploadMonitor(TransferManager manager, UploadImpl transfer, ExecutorService threadPool, UploadCallable multipartUploadCallable, PutObjectRequest putObjectRequest, ProgressListenerChain progressListenerChain)
public Future<UploadResult> getFuture()
TransferMonitor
getFuture
在接口中 TransferMonitor
public boolean isDone()
TransferMonitor
isDone
在接口中 TransferMonitor
public void setTimedThreadPool(ScheduledExecutorService timedThreadPool)
public UploadResult call() throws Exception
call
在接口中 Callable<UploadResult>
Exception
Copyright © 2016. All rights reserved.