public abstract static class GoogleCloudStorageReadOptions.Builder extends 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 |
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 |
setGrpcChecksumsEnabled(boolean grpcChecksumsEnabled)
Sets whether to validate checksums when doing gRPC reads.
|
abstract GoogleCloudStorageReadOptions.Builder |
setGrpcReadMessageTimeoutMillis(long grpcMessageTimeout)
Sets the property for gRPC read message timeout in milliseconds.
|
abstract GoogleCloudStorageReadOptions.Builder |
setGrpcReadMetadataTimeoutMillis(long grpcReadMetadataTimeoutMillis)
Sets the property to override the default timeout for GCS metadata reads from gRPC.
|
abstract GoogleCloudStorageReadOptions.Builder |
setGrpcReadTimeoutMillis(long grpcReadTimeoutMillis)
Sets the property to override the default GCS gRPC read stream timeout.
|
abstract GoogleCloudStorageReadOptions.Builder |
setGrpcReadZeroCopyEnabled(boolean grpcReadZeroCopyEnabled)
Sets the property to use the zero-copy deserializer for gRPC read.
|
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.
|
abstract GoogleCloudStorageReadOptions.Builder |
setSupportGzipEncoding(boolean supportGzipEncoding)
If false then reading a file with GZIP content encoding (HTTP header "Content-Encoding:
gzip") will result in failure (IOException is thrown).
|
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 setSupportGzipEncoding(boolean supportGzipEncoding)
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.
SEQUENTIAL - sends HTTP requests with unbounded Range header.
public abstract GoogleCloudStorageReadOptions.Builder setMinRangeRequestSize(int size)
public abstract GoogleCloudStorageReadOptions.Builder setGrpcChecksumsEnabled(boolean grpcChecksumsEnabled)
TODO(b/134521856): Update this to discuss per-request checksums once the server supplies them and we're validating them.
public abstract GoogleCloudStorageReadOptions.Builder setGrpcReadTimeoutMillis(long grpcReadTimeoutMillis)
public abstract GoogleCloudStorageReadOptions.Builder setGrpcReadMetadataTimeoutMillis(long grpcReadMetadataTimeoutMillis)
public abstract GoogleCloudStorageReadOptions.Builder setGrpcReadZeroCopyEnabled(boolean grpcReadZeroCopyEnabled)
public abstract GoogleCloudStorageReadOptions.Builder setGrpcReadMessageTimeoutMillis(long grpcMessageTimeout)
public GoogleCloudStorageReadOptions build()
Copyright © 2022. All rights reserved.