Class DefaultTransferProgressSnapshot
java.lang.Object
software.amazon.awssdk.transfer.s3.internal.progress.DefaultTransferProgressSnapshot
- All Implemented Interfaces:
TransferProgressSnapshot,ToCopyableBuilder<DefaultTransferProgressSnapshot.Builder,DefaultTransferProgressSnapshot>
public final class DefaultTransferProgressSnapshot
extends Object
implements ToCopyableBuilder<DefaultTransferProgressSnapshot.Builder,DefaultTransferProgressSnapshot>, TransferProgressSnapshot
An SDK-internal implementation of
TransferProgressSnapshot.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleaninthashCode()The ratio of theTransferProgressSnapshot.totalBytes()that has been transferred so far, orOptional.empty()if unknown.The total number of bytes that are remaining to be transferred, orOptional.empty()if unknown.The SDK response, orOptional.empty()if unknown.Take this object and create a builder that contains all of the current property values of this object.toString()The total size of the transfer, in bytes, orOptional.empty()if unknown.longThe total number of bytes that have been transferred so far.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
builder
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<DefaultTransferProgressSnapshot.Builder,DefaultTransferProgressSnapshot> - Returns:
- a builder for type T
-
transferredBytes
public long transferredBytes()Description copied from interface:TransferProgressSnapshotThe total number of bytes that have been transferred so far.- Specified by:
transferredBytesin interfaceTransferProgressSnapshot
-
totalBytes
Description copied from interface:TransferProgressSnapshotThe total size of the transfer, in bytes, orOptional.empty()if unknown.In the case of file-based
FileUploads, transfer sizes are known up front and immediately available. In the case ofDownloads, the transfer size is not known untilS3TransferManagerreceives aGetObjectResponsefrom Amazon S3.- Specified by:
totalBytesin interfaceTransferProgressSnapshot
-
sdkResponse
Description copied from interface:TransferProgressSnapshotThe SDK response, orOptional.empty()if unknown.In the case of
Download, the response isGetObjectResponse, and the response is known before it starts streaming. In the case ofUpload, the response isPutObjectResponse, and the response is not known until streaming finishes.- Specified by:
sdkResponsein interfaceTransferProgressSnapshot
-
ratioTransferred
Description copied from interface:TransferProgressSnapshotThe ratio of theTransferProgressSnapshot.totalBytes()that has been transferred so far, orOptional.empty()if unknown. This method depends on theTransferProgressSnapshot.totalBytes()being known in order to return non-empty.Ratio is computed as
TransferProgressSnapshot.transferredBytes()/TransferProgressSnapshot.totalBytes(), where a transfer that is half-complete would return0.5.- Specified by:
ratioTransferredin interfaceTransferProgressSnapshot- See Also:
-
equals
-
hashCode
-
remainingBytes
Description copied from interface:TransferProgressSnapshotThe total number of bytes that are remaining to be transferred, orOptional.empty()if unknown. This method depends on theTransferProgressSnapshot.totalBytes()being known in order to return non-empty.- Specified by:
remainingBytesin interfaceTransferProgressSnapshot- See Also:
-
toString
-