com.qcloud.cos.transfer.MultipleFileTransferMonitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cos_api Show documentation
Show all versions of cos_api Show documentation
qcloud cos sdk for inner tencentyun
The newest version!
package com.qcloud.cos.transfer;
import java.util.Collection;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public class MultipleFileTransferMonitor implements TransferMonitor {
private final Collection extends AbstractTransfer> subTransfers;
private final AbstractTransfer transfer;
private final Future> future;
public MultipleFileTransferMonitor(AbstractTransfer transfer,
Collection extends AbstractTransfer> subTransfers) {
this.subTransfers = subTransfers;
this.transfer = transfer;
/*
* The future object is not publicly exposed, so we only need to worry about implementing
* get(). The other methods are implemented badly, just to meet the interface contract.
*/
this.future = new Future