public class CopyMonitor extends Object implements Callable<CopyResult>, TransferMonitor
isDone() and getFuture()| Constructor and Description |
|---|
CopyMonitor(TransferManager manager,
CopyImpl transfer,
ExecutorService threadPool,
CopyCallable multipartCopyCallable,
CopyObjectRequest copyObjectRequest,
ProgressListenerChain progressListenerChain)
Constructs a new watcher for copy operation, which immediately submits
itself to the thread pool.
|
| Modifier and Type | Method and Description |
|---|---|
CopyResult |
call() |
Future<CopyResult> |
getFuture()
Returns a Future to wait on.
|
boolean |
isDone()
Returns whether the transfer is completed.
|
void |
setTimedThreadPool(ScheduledExecutorService timedThreadPool) |
public CopyMonitor(TransferManager manager, CopyImpl transfer, ExecutorService threadPool, CopyCallable multipartCopyCallable, CopyObjectRequest copyObjectRequest, ProgressListenerChain progressListenerChain)
manager - The TransferManager that owns this copy request.threadPool - The ExecutorService to which we should submit new
tasks.multipartCopyCallable - The callable responsible for processing the copy
asynchronouslycopyObjectRequest - The original CopyObject requestpublic Future<CopyResult> getFuture()
TransferMonitorgetFuture in interface TransferMonitorpublic boolean isDone()
TransferMonitorisDone in interface TransferMonitorpublic CopyResult call() throws Exception
call in interface Callable<CopyResult>Exceptionpublic void setTimedThreadPool(ScheduledExecutorService timedThreadPool)
Copyright © 2016. All rights reserved.