public final class DefaultTransferProgressSnapshot extends Object implements ToCopyableBuilder<DefaultTransferProgressSnapshot.Builder,DefaultTransferProgressSnapshot>, TransferProgressSnapshot
TransferProgressSnapshot.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultTransferProgressSnapshot.Builder |
| Modifier and Type | Method and Description |
|---|---|
static DefaultTransferProgressSnapshot.Builder |
builder() |
Optional<Long> |
bytesRemaining()
The total number of bytes that are remaining to be transferred, or
Optional.empty() if unknown. |
long |
bytesTransferred()
The total number of bytes that have been transferred so far.
|
Optional<Double> |
ratioTransferred()
The ratio of the
TransferProgressSnapshot.transferSizeInBytes() that has been transferred so far, or Optional.empty() if unknown. |
DefaultTransferProgressSnapshot.Builder |
toBuilder() |
String |
toString() |
Optional<Long> |
transferSizeInBytes()
The total size of the transfer, in bytes, or
Optional.empty() if unknown. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopypublic static DefaultTransferProgressSnapshot.Builder builder()
public DefaultTransferProgressSnapshot.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<DefaultTransferProgressSnapshot.Builder,DefaultTransferProgressSnapshot>public long bytesTransferred()
TransferProgressSnapshotbytesTransferred in interface TransferProgressSnapshotpublic Optional<Long> transferSizeInBytes()
TransferProgressSnapshotOptional.empty() if unknown.
In the case of file-based FileUploads, transfer sizes are known up front and immediately available. In the case of
Downloads, the transfer size is not known until S3TransferManager receives a GetObjectResponse from
Amazon S3.
transferSizeInBytes in interface TransferProgressSnapshotpublic Optional<Double> ratioTransferred()
TransferProgressSnapshotTransferProgressSnapshot.transferSizeInBytes() that has been transferred so far, or Optional.empty() if unknown.
This method depends on the TransferProgressSnapshot.transferSizeInBytes() being known in order to return non-empty.
Ratio is computed as TransferProgressSnapshot.bytesTransferred() / TransferProgressSnapshot.transferSizeInBytes(), where a transfer that is
half-complete would return 0.5.
ratioTransferred in interface TransferProgressSnapshotTransferProgressSnapshot.transferSizeInBytes()public Optional<Long> bytesRemaining()
TransferProgressSnapshotOptional.empty() if unknown. This method depends
on the TransferProgressSnapshot.transferSizeInBytes() being known in order to return non-empty.bytesRemaining in interface TransferProgressSnapshotTransferProgressSnapshot.transferSizeInBytes()Copyright © 2022. All rights reserved.