本文整理汇总了Java中com.amazonaws.services.s3.model.UploadPartRequest.getPartNumber方法的典型用法代码示例。如果您正苦于以下问题:Java UploadPartRequest.getPartNumber方法的具体用法?Java UploadPartRequest.getPartNumber怎么用?Java UploadPartRequest.getPartNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.amazonaws.services.s3.model.UploadPartRequest
的用法示例。
在下文中一共展示了UploadPartRequest.getPartNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startWorker
import com.amazonaws.services.s3.model.UploadPartRequest; //导入方法依赖的package包/类
protected void startWorker(UploadPartRequest req, int retries) {
int id = req.getPartNumber();
CompletableFuture<Void> f = CompletableFuture
.supplyAsync(() -> s3.uploadPart(req), executor)
.handle((res, error) -> {
workers.remove(id);
if (res != null) {
done.add(res);
}
if (error != null && isOpen()) {
if (retries < failedPartUploadRetries) {
startWorker(req, retries + 1);
} else {
this.error = new IllegalStateException("Could not upload part " + id + " after "
+ retries + " retries. Aborting upload", error.getCause());
cancel();
}
}
return null;
});
workers.put(id, f);
}