Class FileParallelUploadOptions
java.lang.Object
com.azure.storage.file.datalake.options.FileParallelUploadOptions
Extended options that may be passed when uploading a file in parallel.
-
Constructor Summary
ConstructorsConstructorDescriptionFileParallelUploadOptions(com.azure.core.util.BinaryData data) Constructs a newFileParallelUploadOptions.FileParallelUploadOptions(InputStream dataStream) Constructs a newFileParallelUploadOptions.FileParallelUploadOptions(InputStream dataStream, long length) Deprecated.FileParallelUploadOptions(Flux<ByteBuffer> dataFlux) Constructs a newFileParallelUploadOptions. -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.util.BinaryDatagetData()Gets the data source.Gets the data source.Gets the data source.Encryption context that is set on the file.Gets thePathHttpHeaders.longDeprecated.usegetOptionalLength()to have safe access to a length that will not always exist.Gets the metadata.Gets the length of the data.com.azure.storage.common.ParallelTransferOptionsGets theParallelTransferOptions.Gets the permissions.Gets theDataLakeRequestConditions.getUmask()Gets the umask.setEncryptionContext(String encryptionContext) Optional encryption context that can be set on the file.setHeaders(PathHttpHeaders headers) Sets thePathHttpHeaders.setMetadata(Map<String, String> metadata) Sets the metadata.setParallelTransferOptions(com.azure.storage.common.ParallelTransferOptions parallelTransferOptions) Sets theParallelTransferOptions.setPermissions(String permissions) Sets the permissions.setRequestConditions(DataLakeRequestConditions requestConditions) Sets theDataLakeRequestConditions.Sets the umask.
-
Constructor Details
-
FileParallelUploadOptions
Constructs a newFileParallelUploadOptions.- Parameters:
dataFlux- The data to write to the file. Unlike other upload methods, this method does not require that theFluxbe replayable. In other words, it does not have to support multiple subscribers and is not expected to produce the same values across subscriptions.- Throws:
NullPointerException- IfdataFluxis null.
-
FileParallelUploadOptions
public FileParallelUploadOptions(com.azure.core.util.BinaryData data) Constructs a newFileParallelUploadOptions.- Parameters:
data- TheBinaryDatato write to the file.- Throws:
NullPointerException- Ifdatais null.
-
FileParallelUploadOptions
Deprecated.length is no longer necessary; useFileParallelUploadOptions(InputStream)instead.Constructs a newFileParallelUploadOptions.Use
FileParallelUploadOptions(InputStream)instead to supply an InputStream without knowing the exact length beforehand.- Parameters:
dataStream- The data to write to the blob. The data must be markable. This is in order to support retries. If the data is not markable, consider wrapping your data source in aBufferedInputStreamto add mark support.length- The exact length of the data. It is important that this value match precisely the length of the data provided in theInputStream.- Throws:
NullPointerException- IfdataStreamis null.IllegalArgumentException- Iflengthis less than 0 or greater thanLong.MAX_VALUE.
-
FileParallelUploadOptions
Constructs a newFileParallelUploadOptions.- Parameters:
dataStream- The data to write to the blob. The data must be markable. This is in order to support retries. If the data is not markable, consider wrapping your data source in aBufferedInputStreamto add mark support.- Throws:
NullPointerException- IfdataStreamis null.
-
-
Method Details
-
getDataFlux
Gets the data source.- Returns:
- The data to write to the file.
-
getDataStream
Gets the data source.- Returns:
- The data to write to the file.
-
getData
public com.azure.core.util.BinaryData getData()Gets the data source.- Returns:
- The data to write to the file.
-
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
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 com.azure.storage.common.ParallelTransferOptions getParallelTransferOptions()Gets theParallelTransferOptions.- Returns:
ParallelTransferOptions
-
setParallelTransferOptions
public FileParallelUploadOptions setParallelTransferOptions(com.azure.storage.common.ParallelTransferOptions parallelTransferOptions) Sets theParallelTransferOptions.- Parameters:
parallelTransferOptions-ParallelTransferOptions- Returns:
- The updated options.
-
getHeaders
Gets thePathHttpHeaders.- Returns:
PathHttpHeaders
-
setHeaders
Sets thePathHttpHeaders.- Parameters:
headers-PathHttpHeaders- Returns:
- The updated options
-
getMetadata
Gets the metadata.- Returns:
- The metadata to associate with the file.
-
setMetadata
Sets the metadata.- Parameters:
metadata- The metadata to associate with the blob.- Returns:
- The updated options.
-
getPermissions
Gets the permissions.- Returns:
- the POSIX access permissions for the resource owner, the resource owning group, and others.
-
setPermissions
Sets the permissions.- Parameters:
permissions- the POSIX access permissions for the resource owner, the resource owning group, and others.- Returns:
- The updated options
-
getUmask
Gets the umask.- Returns:
- the umask.
-
setUmask
Sets the umask.- Parameters:
umask- Restricts permissions of the resource to be created.- Returns:
- The updated options
-
getRequestConditions
Gets theDataLakeRequestConditions.- Returns:
DataLakeRequestConditions
-
setRequestConditions
Sets theDataLakeRequestConditions.- Parameters:
requestConditions-DataLakeRequestConditions- Returns:
- The updated options.
-
getEncryptionContext
Encryption context that is set on the file.- Returns:
- Encryption context that is set on the file.
-
setEncryptionContext
Optional encryption context that can be set on the file. Encryption context is intended to store metadata that can be used to decrypt the blob.- Parameters:
encryptionContext- the encryption context to be set on the file.- Returns:
- The updated options.
-
FileParallelUploadOptions(InputStream)instead.