public abstract static class GoogleCloudStorageReadOptions.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
GoogleCloudStorageReadOptions |
build() |
abstract GoogleCloudStorageReadOptions.Builder |
setBackoffInitialIntervalMillis(int backoffInitialIntervalMillis)
On exponential back-off, the initial delay before the first retry; subsequent retries then
grow as an exponential function of the current delay interval.
|
abstract GoogleCloudStorageReadOptions.Builder |
setBackoffMaxElapsedTimeMillis(int backoffMaxElapsedTimeMillis)
The maximum total time elapsed since the first retry over the course of a series of retries.
|
abstract GoogleCloudStorageReadOptions.Builder |
setBackoffMaxIntervalMillis(int backoffMaxIntervalMillis)
The maximum amount of sleep between retries; at this point, there will be no further
exponential back-off.
|
abstract GoogleCloudStorageReadOptions.Builder |
setBackoffMultiplier(double backoffMultiplier)
The base of the exponent used for exponential back-off; each subsequent sleep interval is
roughly this many times the previous interval.
|
abstract GoogleCloudStorageReadOptions.Builder |
setBackoffRandomizationFactor(double backoffRandomizationFactor)
The amount of jitter introduced when computing the next retry sleep interval so that when
many clients are retrying, they don't all retry at the same time.
|
abstract GoogleCloudStorageReadOptions.Builder |
setBufferSize(int bufferSize)
If set to a positive value, low-level streams will be wrapped inside a BufferedInputStream of
this size.
|
abstract GoogleCloudStorageReadOptions.Builder |
setFadvise(GoogleCloudStorageReadOptions.Fadvise fadvise)
Sets fadvise mode that tunes behavior to optimize HTTP GET requests for various use cases.
|
abstract GoogleCloudStorageReadOptions.Builder |
setFastFailOnNotFound(boolean fastFailOnNotFound)
True if attempts to open a new channel on a nonexistent object are required to immediately
throw an IOException.
|
abstract GoogleCloudStorageReadOptions.Builder |
setGenerationReadConsistency(GoogleCloudStorageReadOptions.GenerationReadConsistency consistency)
Sets the generation read consistency model.
|
abstract GoogleCloudStorageReadOptions.Builder |
setInplaceSeekLimit(long inplaceSeekLimit)
If seeking to a new position which is within this number of bytes in front of the current
position, then we will skip forward by reading and discarding the necessary amount of bytes
rather than trying to open a brand-new underlying stream.
|
abstract GoogleCloudStorageReadOptions.Builder |
setMinRangeRequestSize(int size)
Sets the minimum size of the HTTP Range header that could be set in GCS request when opening
new stream to read an object.
|
public abstract GoogleCloudStorageReadOptions.Builder setBackoffInitialIntervalMillis(int backoffInitialIntervalMillis)
public abstract GoogleCloudStorageReadOptions.Builder setBackoffRandomizationFactor(double backoffRandomizationFactor)
public abstract GoogleCloudStorageReadOptions.Builder setBackoffMultiplier(double backoffMultiplier)
public abstract GoogleCloudStorageReadOptions.Builder setBackoffMaxIntervalMillis(int backoffMaxIntervalMillis)
public abstract GoogleCloudStorageReadOptions.Builder setBackoffMaxElapsedTimeMillis(int backoffMaxElapsedTimeMillis)
public abstract GoogleCloudStorageReadOptions.Builder setFastFailOnNotFound(boolean fastFailOnNotFound)
public abstract GoogleCloudStorageReadOptions.Builder setBufferSize(int bufferSize)
public abstract GoogleCloudStorageReadOptions.Builder setInplaceSeekLimit(long inplaceSeekLimit)
public abstract GoogleCloudStorageReadOptions.Builder setFadvise(GoogleCloudStorageReadOptions.Fadvise fadvise)
Supported modes:
AUTO - automatically switches to RANDOM mode if backward read or
forward read for more than setInplaceSeekLimit(long) bytes is detected.
RANDOM - sends HTTP requests with Range header set to greater of
provided reade buffer by user or setBufferSize(int).
SEQUENTIAL - sends HTTP requests with unbounded Range header.
public abstract GoogleCloudStorageReadOptions.Builder setMinRangeRequestSize(int size)
public abstract GoogleCloudStorageReadOptions.Builder setGenerationReadConsistency(GoogleCloudStorageReadOptions.GenerationReadConsistency consistency)
Supported modes:
LATEST: always read the latest generation.
BEST_EFFORT: will try to read a certain generation (when the read-channel was
opened), but when that generation is deleted/overwritten, fall back to the latest
generation.
STRICT: will try to read a certain generation (when the read-channel was
opened), but when that generation is deleted/overwritten, throw an exception.
public GoogleCloudStorageReadOptions build()
Copyright © 2019. All rights reserved.