Class ParallelDownloadOptions

java.lang.Object
com.azure.communication.callautomation.models.ParallelDownloadOptions

public final class ParallelDownloadOptions extends Object
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 Details

    • ParallelDownloadOptions

      public ParallelDownloadOptions()
      Creates a new ParallelDownloadOptions with default parameters applied.
  • Method Details

    • getBlockSize

      public Long getBlockSize()
      Gets the block size (chunk size) to transfer at a time.
      Returns:
      The block size.
    • setBlockSize

      public ParallelDownloadOptions setBlockSize(long blockSize)
      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 the ProgressListener.
      Parameters:
      progressListener - The ProgressListener.
      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

      public ParallelDownloadOptions setMaxConcurrency(int maxConcurrency)
      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.