Package com.azure.storage.blob.options
Class BlobParallelUploadOptions
- java.lang.Object
-
- com.azure.storage.blob.options.BlobParallelUploadOptions
-
public class BlobParallelUploadOptions extends Object
Extended options that may be passed when uploading a Block Blob in parallel.
-
-
Constructor Summary
Constructors Constructor Description BlobParallelUploadOptions(com.azure.core.util.BinaryData data)
Constructs a newBlobParallelUploadOptions
.BlobParallelUploadOptions(InputStream dataStream)
Constructs a newBlobParallelUploadOptions
.BlobParallelUploadOptions(InputStream dataStream, long length)
Deprecated.length is no longer necessary; useBlobParallelUploadOptions(InputStream)
instead.BlobParallelUploadOptions(Flux<ByteBuffer> dataFlux)
Constructs a newBlobParallelUploadOptions
.
-
Method Summary
-
-
-
Constructor Detail
-
BlobParallelUploadOptions
public BlobParallelUploadOptions(Flux<ByteBuffer> dataFlux)
Constructs a newBlobParallelUploadOptions
.- Parameters:
dataFlux
- The data to write to the blob. Unlike other upload methods, this method does not require that theFlux
be replayable. In other words, it does not have to support multiple subscribers and is not expected to produce the same values across subscriptions.
-
BlobParallelUploadOptions
@Deprecated public BlobParallelUploadOptions(InputStream dataStream, long length)
Deprecated.length is no longer necessary; useBlobParallelUploadOptions(InputStream)
instead.Constructs a newBlobParallelUploadOptions
. UseBlobParallelUploadOptions(InputStream)
instead to supply an InputStream without knowing the exact length beforehand.- Parameters:
dataStream
- The data to write to the blob.length
- The exact length of the data. It is important that this value match precisely the length of the data provided in theInputStream
.
-
BlobParallelUploadOptions
public BlobParallelUploadOptions(InputStream dataStream)
Constructs a newBlobParallelUploadOptions
.- Parameters:
dataStream
- The data to write to the blob.
-
BlobParallelUploadOptions
public BlobParallelUploadOptions(com.azure.core.util.BinaryData data)
Constructs a newBlobParallelUploadOptions
.- Parameters:
data
- The data to write to the blob.
-
-
Method Detail
-
getDataFlux
public Flux<ByteBuffer> getDataFlux()
Gets the data source.- Returns:
- The data to write to the blob.
-
getDataStream
public InputStream getDataStream()
Gets the data source.- Returns:
- The data to write to the blob.
-
getLength
@Deprecated public long getLength()
Deprecated.usegetOptionalLength()
to have safe access to a length that will not always exist.Gets the length of the data.- Returns:
- The exact length of the data. It is important that this value match precisely the length of the
data provided in the
InputStream
.
-
getOptionalLength
public Long getOptionalLength()
Gets the length of the data.- Returns:
- The exact length of the data. It is important that this value match precisely the length of the
data provided in the
InputStream
.
-
getParallelTransferOptions
public ParallelTransferOptions getParallelTransferOptions()
Gets theParallelTransferOptions
.- Returns:
ParallelTransferOptions
-
setParallelTransferOptions
public BlobParallelUploadOptions setParallelTransferOptions(ParallelTransferOptions parallelTransferOptions)
Sets theParallelTransferOptions
.- Parameters:
parallelTransferOptions
-ParallelTransferOptions
- Returns:
- The updated options.
-
getHeaders
public BlobHttpHeaders getHeaders()
Gets theBlobHttpHeaders
.- Returns:
BlobHttpHeaders
-
setHeaders
public BlobParallelUploadOptions setHeaders(BlobHttpHeaders headers)
Sets theBlobHttpHeaders
.- Parameters:
headers
-BlobHttpHeaders
- Returns:
- The updated options
-
getMetadata
public Map<String,String> getMetadata()
Gets the metadata.- Returns:
- The metadata to associate with the blob.
-
setMetadata
public BlobParallelUploadOptions setMetadata(Map<String,String> metadata)
Sets the metadata.- Parameters:
metadata
- The metadata to associate with the blob.- Returns:
- The updated options.
-
getTags
public Map<String,String> getTags()
Get the tags.- Returns:
- The tags to associate with the blob.
-
setTags
public BlobParallelUploadOptions setTags(Map<String,String> tags)
Set the tags.- Parameters:
tags
- The tags to associate with the blob.- Returns:
- The updated options.
-
getTier
public AccessTier getTier()
Gets theAccessTier
.- Returns:
AccessTier
-
setTier
public BlobParallelUploadOptions setTier(AccessTier tier)
Sets theAccessTier
.- Parameters:
tier
-AccessTier
- Returns:
- The updated options.
-
getRequestConditions
public BlobRequestConditions getRequestConditions()
Gets theBlobRequestConditions
.- Returns:
BlobRequestConditions
-
setRequestConditions
public BlobParallelUploadOptions setRequestConditions(BlobRequestConditions requestConditions)
Sets theBlobRequestConditions
.- Parameters:
requestConditions
-BlobRequestConditions
- Returns:
- The updated options.
-
isComputeMd5
public boolean isComputeMd5()
- Returns:
- Whether or not the library should calculate the md5 and send it for the service to verify.
-
setComputeMd5
public BlobParallelUploadOptions setComputeMd5(boolean computeMd5)
Sets the computeMd5 property.- Parameters:
computeMd5
- Whether or not the library should calculate the md5 and send it for the service to verify.- Returns:
- The updated options.
-
getTimeout
@Deprecated public Duration getTimeout()
Deprecated.UseBlobClient.uploadWithResponse(BlobParallelUploadOptions, Duration, Context)
to specify timeout.Gets the timeout.- Returns:
- An optional timeout value beyond which a
RuntimeException
will be raised.
-
setTimeout
@Deprecated public BlobParallelUploadOptions setTimeout(Duration timeout)
Deprecated.UseBlobClient.uploadWithResponse(BlobParallelUploadOptions, Duration, Context)
to specify timeout.Sets the timeout.- Parameters:
timeout
- An optional timeout value beyond which aRuntimeException
will be raised.- Returns:
- The updated options
-
getImmutabilityPolicy
public BlobImmutabilityPolicy getImmutabilityPolicy()
- Returns:
BlobImmutabilityPolicy
-
setImmutabilityPolicy
public BlobParallelUploadOptions setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy)
Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.- Parameters:
immutabilityPolicy
-BlobImmutabilityPolicy
- Returns:
- The updated options.
-
isLegalHold
public Boolean isLegalHold()
- Returns:
- If a legal hold should be placed on the blob.
-
setLegalHold
public BlobParallelUploadOptions setLegalHold(Boolean legalHold)
Note that this parameter is only applicable to a blob within a container that has immutable storage with versioning enabled.- Parameters:
legalHold
- Indicates if a legal hold should be placed on the blob.- Returns:
- The updated options.
-
-