Package com.google.cloud.storage
Class GrpcStorageOptions.Builder
java.lang.Object
com.google.cloud.ServiceOptions.Builder<Storage,StorageOptions,StorageOptions.Builder>
com.google.cloud.storage.StorageOptions.Builder
com.google.cloud.storage.GrpcStorageOptions.Builder
- Enclosing class:
- GrpcStorageOptions
- Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
Field Summary
Fields inherited from class com.google.cloud.ServiceOptions.Builder
credentials
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
protected GrpcStorageOptions.Builder
self()
setAttemptDirectPath
(boolean attemptDirectPath) Option which signifies the client should attempt to connect to gcs via Direct Path.setBlobWriteSessionConfig
(@NonNull BlobWriteSessionConfig blobWriteSessionConfig) setClientLibToken
(String clientLibToken) setClock
(com.google.api.core.ApiClock clock) setCredentials
(com.google.auth.Credentials credentials) setGrpcInterceptorProvider
(@NonNull com.google.api.gax.grpc.GrpcInterceptorProvider grpcInterceptorProvider) setHeaderProvider
(com.google.api.gax.rpc.HeaderProvider headerProvider) setProjectId
(String projectId) setQuotaProjectId
(String quotaProjectId) setRetrySettings
(com.google.api.gax.retrying.RetrySettings retrySettings) setServiceFactory
(com.google.cloud.ServiceFactory<Storage, StorageOptions> serviceFactory) setServiceRpcFactory
(com.google.cloud.spi.ServiceRpcFactory<StorageOptions> serviceRpcFactory) setStorageRetryStrategy
(StorageRetryStrategy storageRetryStrategy) Override the default retry handling behavior with an alternate strategy.setTerminationAwaitDuration
(org.threeten.bp.Duration terminationAwaitDuration) Set the maximum duration in which to await termination of any outstanding requests when callingStorage.close()
setTransportOptions
(com.google.cloud.TransportOptions transportOptions) Methods inherited from class com.google.cloud.ServiceOptions.Builder
getAllowedClientLibTokens, setUniverseDomain
-
Method Details
-
setTerminationAwaitDuration
@BetaApi public GrpcStorageOptions.Builder setTerminationAwaitDuration(org.threeten.bp.Duration terminationAwaitDuration) Set the maximum duration in which to await termination of any outstanding requests when callingStorage.close()
- Parameters:
terminationAwaitDuration
- a non-null Duration to use- Returns:
- the builder
- Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setAttemptDirectPath
Option which signifies the client should attempt to connect to gcs via Direct Path.NOTEThere is no need to specify a new endpoint via
setHost(String)
as the underlying code will translate the normalhttps://storage.googleapis.com:443
into the proper Direct Path URI for you.- Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setTransportOptions
@BetaApi public GrpcStorageOptions.Builder setTransportOptions(com.google.cloud.TransportOptions transportOptions) - Overrides:
setTransportOptions
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setStorageRetryStrategy
@BetaApi public GrpcStorageOptions.Builder setStorageRetryStrategy(StorageRetryStrategy storageRetryStrategy) Override the default retry handling behavior with an alternate strategy.- Specified by:
setStorageRetryStrategy
in classStorageOptions.Builder
- Parameters:
storageRetryStrategy
- a non-null storageRetryStrategy to use- Returns:
- the builder
- Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
self
- Overrides:
self
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder>
-
setServiceFactory
@BetaApi public GrpcStorageOptions.Builder setServiceFactory(com.google.cloud.ServiceFactory<Storage, StorageOptions> serviceFactory) - Overrides:
setServiceFactory
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setClock
- Overrides:
setClock
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setProjectId
- Overrides:
setProjectId
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setHost
- Overrides:
setHost
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setCredentials
- Overrides:
setCredentials
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setRetrySettings
@BetaApi public GrpcStorageOptions.Builder setRetrySettings(com.google.api.gax.retrying.RetrySettings retrySettings) - Overrides:
setRetrySettings
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setServiceRpcFactory
@BetaApi public GrpcStorageOptions.Builder setServiceRpcFactory(com.google.cloud.spi.ServiceRpcFactory<StorageOptions> serviceRpcFactory) - Overrides:
setServiceRpcFactory
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setHeaderProvider
@BetaApi public GrpcStorageOptions.Builder setHeaderProvider(com.google.api.gax.rpc.HeaderProvider headerProvider) - Overrides:
setHeaderProvider
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setClientLibToken
- Overrides:
setClientLibToken
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setQuotaProjectId
- Overrides:
setQuotaProjectId
in classcom.google.cloud.ServiceOptions.Builder<Storage,
StorageOptions, StorageOptions.Builder> - Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setGrpcInterceptorProvider
@BetaApi public GrpcStorageOptions.Builder setGrpcInterceptorProvider(@NonNull com.google.api.gax.grpc.GrpcInterceptorProvider grpcInterceptorProvider) - Since:
- 2.22.3 This new api is in preview and is subject to breaking changes.
-
setBlobWriteSessionConfig
@BetaApi public GrpcStorageOptions.Builder setBlobWriteSessionConfig(@NonNull BlobWriteSessionConfig blobWriteSessionConfig) - Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
build
- Specified by:
build
in classStorageOptions.Builder
- Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-