本文整理了Java中com.amazonaws.services.s3.transfer.Upload.getDescription()
方法的一些代码示例,展示了Upload.getDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Upload.getDescription()
方法的具体详情如下:
包路径:com.amazonaws.services.s3.transfer.Upload
类名称:Upload
方法名:getDescription
暂无
代码示例来源:origin: awsdocs/aws-doc-sdk-examples
System.out.println("\nSubtransfer progress:\n");
for (Upload u : sub_xfers) {
System.out.println(" " + u.getDescription());
if (u.isDone()) {
TransferState xfer_state = u.getState();
代码示例来源:origin: conveyal/r5
@Override
public void progressChanged(ProgressEvent progressEvent) {
final ProgressEventType eventType = progressEvent.getEventType();
if (eventType == ProgressEventType.REQUEST_BYTE_TRANSFER_EVENT ||
eventType == ProgressEventType.TRANSFER_COMPLETED_EVENT) {
long now = System.currentTimeMillis();
if (now > lastLogTime + LOG_INTERVAL_SECONDS * 1000 ||
eventType == ProgressEventType.TRANSFER_COMPLETED_EVENT) {
TransferProgress transferProgress = upload.getProgress();
double durationSec = (now - beginTime) / 1000D;
LOG.info("{} transferred {} of {} ({} percent), duration {}, speed {})",
upload.getDescription(),
human(transferProgress.getBytesTransferred(), "B"),
human(transferProgress.getTotalBytesToTransfer(), "B"),
transferProgress.getPercentTransferred(),
human(durationSec, "s"),
human(transferProgress.getBytesTransferred() / durationSec, "B/sec"));
lastLogTime = now;
}
} else if (eventType == ProgressEventType.TRANSFER_FAILED_EVENT) {
LOG.error("{}: TRANSFER FAILED.", upload.getDescription());
}
}
}
代码示例来源:origin: com.conveyal/r5
@Override
public void progressChanged(ProgressEvent progressEvent) {
final ProgressEventType eventType = progressEvent.getEventType();
if (eventType == ProgressEventType.REQUEST_BYTE_TRANSFER_EVENT ||
eventType == ProgressEventType.TRANSFER_COMPLETED_EVENT) {
long now = System.currentTimeMillis();
if (now > lastLogTime + LOG_INTERVAL_SECONDS * 1000 ||
eventType == ProgressEventType.TRANSFER_COMPLETED_EVENT) {
TransferProgress transferProgress = upload.getProgress();
double durationSec = (now - beginTime) / 1000D;
LOG.info("{} transferred {} of {} ({} percent), duration {}, speed {})",
upload.getDescription(),
human(transferProgress.getBytesTransferred(), "B"),
human(transferProgress.getTotalBytesToTransfer(), "B"),
transferProgress.getPercentTransferred(),
human(durationSec, "s"),
human(transferProgress.getBytesTransferred() / durationSec, "B/sec"));
lastLogTime = now;
}
} else if (eventType == ProgressEventType.TRANSFER_FAILED_EVENT) {
LOG.error("{}: TRANSFER FAILED.", upload.getDescription());
}
}
}
代码示例来源:origin: jenkinsci/pipeline-aws-plugin
upload.addProgressListener((ProgressListener) progressEvent -> {
if (progressEvent.getEventType() == ProgressEventType.TRANSFER_COMPLETED_EVENT) {
RemoteUploader.this.taskListener.getLogger().println("Finished: " + upload.getDescription());
upload.addProgressListener((ProgressListener) progressEvent -> {
if (progressEvent.getEventType() == ProgressEventType.TRANSFER_COMPLETED_EVENT) {
RemoteUploader.this.taskListener.getLogger().println("Finished: " + upload.getDescription());
代码示例来源:origin: jenkinsci/pipeline-aws-plugin
upload.addProgressListener((ProgressListener) progressEvent -> {
if (progressEvent.getEventType() == ProgressEventType.TRANSFER_COMPLETED_EVENT) {
RemoteListUploader.this.taskListener.getLogger().println("Finished: " + upload.getDescription());
内容来源于网络,如有侵权,请联系作者删除!