Freigeben über


ParallelDownloadOptions Class

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

public final class 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

Constructor Description
ParallelDownloadOptions()

Creates a new ParallelDownloadOptions with default parameters applied.

Method Summary

Modifier and Type Method and Description
Long getBlockSize()

Gets the block size (chunk size) to transfer at a time.

int getMaxConcurrency()

Gets the maximum number of parallel requests that will be issued at any given time.

ProgressListener getProgressListener()

Gets the Progress listener for parallel reporting

ParallelDownloadOptions setBlockSize(long blockSize)

Sets the block size.

ParallelDownloadOptions setMaxConcurrency(int maxConcurrency)

Sets the maximum number of parallel requests that will be issued at any given time.

ParallelDownloadOptions setProgressReceiver(ProgressListener progressListener)

Sets the ProgressListener.

Methods inherited from java.lang.Object

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.

getMaxConcurrency

public int getMaxConcurrency()

Gets the maximum number of parallel requests that will be issued at any given time.

Returns:

The max concurrency value.

getProgressListener

public ProgressListener getProgressListener()

Gets the Progress listener for parallel reporting

Returns:

The progress listener

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.

setMaxConcurrency

public ParallelDownloadOptions setMaxConcurrency(int maxConcurrency)

Sets the maximum number of parallel requests that will be issued at any given time.

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.

setProgressReceiver

public ParallelDownloadOptions setProgressReceiver(ProgressListener progressListener)

Sets the ProgressListener.

Parameters:

progressListener - The ProgressListener.

Returns:

The ParallelDownloadOptions object itself.

Applies to