public final class ParallelDownloadOptions extends Object
| Constructor and Description |
|---|
ParallelDownloadOptions()
Creates a new
ParallelDownloadOptions with default parameters applied. |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertInBounds(String param,
long value,
long min,
long max)
Asserts that the specified number is in the valid range.
|
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.
|
ProgressReceiver |
getProgressReceiver()
Gets the Progress receiver for parallel reporting
|
ParallelDownloadOptions |
setBlockSize(Long blockSize)
Sets the block size.
|
ParallelDownloadOptions |
setMaxConcurrency(Integer maxConcurrency) |
ParallelDownloadOptions |
setProgressReceiver(ProgressReceiver progressReceiver)
Sets the
ProgressReceiver. |
public ParallelDownloadOptions()
ParallelDownloadOptions with default parameters applied.public long getBlockSize()
public ParallelDownloadOptions setBlockSize(Long blockSize)
blockSize - The block size.public ProgressReceiver getProgressReceiver()
public ParallelDownloadOptions setProgressReceiver(ProgressReceiver progressReceiver)
ProgressReceiver.progressReceiver - The ProgressReceiver.public int getMaxConcurrency()
public ParallelDownloadOptions setMaxConcurrency(Integer maxConcurrency)
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 uploadFromFile 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. For buffered uploads only, the maximum number of buffers to be
allocated as part of the transfer will be maxConcurrency + 1. In those cases, memory will be allocated
lazily as needed. The amount of memory consumed by methods which buffer may be up to blockSize * maxConcurrency.
In general, upload methods which do not accept a length parameter must perform some buffering.public static void assertInBounds(String param, long value, long min, long max)
param - Name of the parametervalue - Value of the parametermin - The minimum allowed valuemax - The maximum allowed valueIllegalArgumentException - If value is less than min or value is greater than
max.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.