AWS SDK for C++AWS SDK for C++ Version 1.11.440 |
#include <TransferHandle.h>
This is the interface for interacting with an in-process transfer. All operations from TransferManager return an instance of this class. In addition to the status of the transfer and details about what operation is being performed, this class also has the Cancel() operation which is used to cancel a transfer, and WaitUntilCompleted() which will cause the calling thread to block until the transfer is finished.
In the context that by the time you are using this class, it is thread safe.
Definition at line 132 of file TransferHandle.h.
Initialize with required information for an UPLOAD
Initialize with required information for a DOWNLOAD
""
Alternate DOWNLOAD constructor
""
Alternate DOWNLOAD constructor
Add a new entry to or update an existed entry of m_metadata, useful when users want to get ETag directly from metadata.
Definition at line 325 of file TransferHandle.h.
Set a part to pending. Used for all transfers.
Set a part to queued. Used for all transfers.
Cancel the transfer. This will happen asynchronously, so if you need to wait for it to be canceled, either handle the callbacks, or call WaitUntilFinished.
Set a pending part to completed along with its etag. Used fore all transfers.
Set a pending part to failed. Used for all transfers.
Get all parts using transactions, mostly for internal purposes.
Bucket portion of the object location in Amazon S3.
Definition at line 282 of file TransferHandle.h.
Gets the total bytes that is already transferred and available to users starting from the beginning of the file. For multiple-part downloads, it's guaranteed that these bytes are committed to the underlying stream already. For single-part downloads, it's also true since we write() directly to the underlying stream. A potential use case is to poll and stream bytes to users as we are still doing multi-part downloading.
Definition at line 277 of file TransferHandle.h.
The offset from which to start downloading
Definition at line 261 of file TransferHandle.h.
The calculated total size of the object being transferred.
Definition at line 265 of file TransferHandle.h.
Total bytes transferred successfully on this transfer operation. We implement transfer progress with two invariants: (1) Never lock; given a callback that can happen hundreds of times a second or more on a solid connection, it isn't acceptable to lock each time (2) Never go backwards, in spite of part upload/download failures. Negative progress (canceling a highly concurrent transfer can lead to an enormous step backwards if many parts are aborted at once) is a confusing and undesirable user experience. In this sense, progress represents a high-water mark, and in the presence of heavy failures or cancellation, it may appear to pause until the necessary retries exceed the previous high-water mark.
Definition at line 252 of file TransferHandle.h.
Returns a copy of the completed parts, in the structure of <partId, ETag>. Used for all transfers.
Content type of the object being transferred
Definition at line 306 of file TransferHandle.h.
Returns arbitrary user context or nullptr if it's not set.
Definition at line 335 of file TransferHandle.h.
Definition at line 361 of file TransferHandle.h.
Returns a copy of the failed parts. Used for all transfers.
Key of the object location in Amazon S3.
Definition at line 286 of file TransferHandle.h.
The last error that was encountered by the transfer. You can handle each error individually via the errorCallback callback function in the TransferConfiguration.
Definition at line 350 of file TransferHandle.h.
In case of an upload, this is the metadata that was placed on the object when it was uploaded. In the case of a download, this is the object metadata from the GetObject operation.
Definition at line 315 of file TransferHandle.h.
If this is a multi-part transfer, this is the ID of it. e.g. UploadId for UploadPart
Definition at line 171 of file TransferHandle.h.
Returns a copy of the pending parts. Used for all transfers.
Returns a copy of the queued parts. Used for all transfers.
The current status of the operation
If known, this is the location of the local file being uploaded from, or downloaded to. If you use the stream api however, this will always be blank.
Definition at line 291 of file TransferHandle.h.
Upload or Download?
Definition at line 302 of file TransferHandle.h.
(Download only) version id of the object to retrieve; if not specified in constructor, then latest is used
Definition at line 296 of file TransferHandle.h.
Returns true or false if there are currently any failed parts.
Returns true or false if any parts have been created for this transfer
Returns true or false if there are currently any pending parts.
Returns true or false if there are currently any queued parts.
Whether or not this transfer is being performed using parallel parts via a multi-part s3 api.
Definition at line 163 of file TransferHandle.h.
Definition at line 371 of file TransferHandle.h.
Reset the cancellation status for a retry. This will be done automatically by Transfer Manager.
Sets the total size of the object being transferred.
Definition at line 269 of file TransferHandle.h.
Content type of the object being transferred
Definition at line 310 of file TransferHandle.h.
Arbitrary user context that can be accessed from the callbacks
Definition at line 330 of file TransferHandle.h.
The last error that was encountered by the transfer. You can handle each error individually via the errorCallback callback function in the TransferConfiguration.
Definition at line 355 of file TransferHandle.h.
Whether or not this transfer is being performed using parallel parts via a multi-part s3 api.
Definition at line 167 of file TransferHandle.h.
In case of an upload, this is the metadata that was placed on the object when it was uploaded. In the case of a download, this is the object metadata from the GetObject operation.
Definition at line 320 of file TransferHandle.h.
If this is a multi-part transfer, this is the ID of it. e.g. UploadId for UploadPart
Definition at line 175 of file TransferHandle.h.
Definition at line 297 of file TransferHandle.h.
Returns false if Cancel has been called. Largely for internal use.
Total bytes transferred successfully on this transfer operation.
Definition at line 256 of file TransferHandle.h.
The current status of the operation
Blocks the calling thread until the operation has finished. This function does not busy wait. It is safe for your CPU.
Write @partStream to the configured output (f)stream. Return empty string on success, string with error message on error.