Class ParallelDownloadOptions
java.lang.Object
com.azure.communication.callautomation.models.ParallelDownloadOptions
This class contains configuration used to parallelize data transfer operations. Note that not all values are used
by every method which accepts this type. Please refer to the javadoc on specific methods for these cases.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the block size (chunk size) to transfer at a time.int
Gets the maximum number of parallel requests that will be issued at any given time.com.azure.core.util.ProgressListener
Gets the Progress listener for parallel reportingsetBlockSize
(long blockSize) Sets the block size.setMaxConcurrency
(int maxConcurrency) setProgressReceiver
(com.azure.core.util.ProgressListener progressListener) Sets theProgressListener
.
-
Constructor Details
-
ParallelDownloadOptions
public ParallelDownloadOptions()Creates a newParallelDownloadOptions
with default parameters applied.
-
-
Method Details
-
getBlockSize
Gets the block size (chunk size) to transfer at a time.- Returns:
- The block size.
-
setBlockSize
Sets the block size. The block size is the size of each data chunk returned from the service. For both applications, If block size is large, download will make fewer network calls, but each individual call will receive more data and will therefore take longer.- Parameters:
blockSize
- The block size.- Returns:
- The ParallelDownloadOptions object itself.
-
getProgressListener
public com.azure.core.util.ProgressListener getProgressListener()Gets the Progress listener for parallel reporting- Returns:
- The progress listener
-
setProgressReceiver
public ParallelDownloadOptions setProgressReceiver(com.azure.core.util.ProgressListener progressListener) Sets theProgressListener
.- Parameters:
progressListener
- TheProgressListener
.- Returns:
- The ParallelDownloadOptions object itself.
-
getMaxConcurrency
public int getMaxConcurrency()Gets the maximum number of parallel requests that will be issued at any given time.- Returns:
- The max concurrency value.
-
setMaxConcurrency
- Parameters:
maxConcurrency
- The maximum number of parallel requests that will be issued at any given time as a part of a single parallel transfer. This value applies per api. For example, if two calls to downloadTo are made at the same time, and each specifies a maxConcurrency of 5, there may be up to 10 outstanding, concurrent requests, up to 5 for each of the upload operations. The amount of memory consumed by methods which buffer may be up to blockSize * maxConcurrency.- Returns:
- The ParallelDownloadOptions object itself.
-