@ProviderType public interface BlobUpload
BlobAccessProvider.initiateBlobUpload(long, int)which returns an instance of this type. The client then uses the provided URIs via
getUploadURIs()to upload the binary. After this is done, the client calls
BlobAccessProvider.completeBlobUpload(String)passing in the upload token string obtained from this object via
|Modifier and Type||Method and Description|
The largest part size the client can send in a multi-part upload.
The smallest part size the client can send in a multi-part upload (not counting the final part).
Returns a token that uniquely identifies this upload.
Returns a collection of direct-writable upload URIs for uploading a file, or file part in the case of multi-part uploading.
@NotNull @NotNull java.lang.String getUploadToken()
Note that some backends have lower-bound limits for the size of a part of a multi-part upload. You should consult the documentation for your specific service provider for details.
maxUploadSizeInBytesspecified in the original call.
A smaller upload part size may also be used so long as it exceeds the
value returned by
getMinPartSize(). Such smaller values may be
more desirable for clients who wish to tune uploads to match network
conditions; however, the only guarantee offered by the API is that using
parts of the size returned by this method will work without using more
URIs than those available in the Collection returned by
If a client calls
BlobAccessProvider.initiateBlobUpload(long, int) with a value of
maxUploadSizeInBytes that ends up being smaller than the actual
size of the binary to be uploaded, it may not be possible to complete the
upload with the URIs provided. The client should initiate the
transaction again with the correct size.
Note that some backends have upper-bound limits for the size of a part of a multi-part upload. You should consult the documentation for your specific service provider for details.
@NotNull @NotNull java.util.Collection<java.net.URI> getUploadURIs()
maxNumberOfURIsin a call to
BlobAccessProvider.initiateBlobUpload(long, int), OR - If the implementing data store does not support multi-part uploading, OR - If the client-specified value for
maxUploadSizeInBytesin a call to
BlobAccessProvider.initiateBlobUpload(long, int)is less than or equal to the minimum supported size of a multi-part upload part.
If the collection contains only a single URI the client should treat that URI as a direct single-put upload and write the entire binary to the single URI. Otherwise the client may choose to consume any number of URIs in the collection, up to the entire collection of URIs provided.
Note that ordering matters; URIs should be consumed in sequence and should not be skipped.
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.