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.Builderself()setAttemptDirectPath(boolean attemptDirectPath) Option which signifies the client should attempt to connect to gcs via Direct Google Access.setBlobWriteSessionConfig(@NonNull BlobWriteSessionConfig blobWriteSessionConfig) setClientLibToken(String clientLibToken) setClock(com.google.api.core.ApiClock clock) setCredentials(com.google.auth.Credentials credentials) setEnableGrpcClientMetrics(boolean enableGrpcClientMetrics) Option for whether this client should emit internal gRPC client internal metrics to Cloud Monitoring.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, setApiTracerFactory, 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 Google Access.NOTEThere is no need to specify a new endpoint via
setHost(String)as the underlying code will translate the normalhttps://storage.googleapis.com:443into the proper Direct Google Access URI for you.- Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-
setEnableGrpcClientMetrics
@BetaApi public GrpcStorageOptions.Builder setEnableGrpcClientMetrics(boolean enableGrpcClientMetrics) Option for whether this client should emit internal gRPC client internal metrics to Cloud Monitoring. To disable metric reporting, set this to false. True by default. Emitting metrics is free and requires minimal CPU and memory.- Since:
- 2.41.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:
setTransportOptionsin 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:
setStorageRetryStrategyin 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:
selfin classcom.google.cloud.ServiceOptions.Builder<Storage,StorageOptions, StorageOptions.Builder>
-
setServiceFactory
@BetaApi public GrpcStorageOptions.Builder setServiceFactory(com.google.cloud.ServiceFactory<Storage, StorageOptions> serviceFactory) - Overrides:
setServiceFactoryin 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:
setClockin 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:
setProjectIdin 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:
setHostin 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:
setCredentialsin 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:
setRetrySettingsin 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:
setServiceRpcFactoryin 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:
setHeaderProviderin 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:
setClientLibTokenin 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:
setQuotaProjectIdin 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) - Specified by:
setBlobWriteSessionConfigin classStorageOptions.Builder- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
build
- Specified by:
buildin classStorageOptions.Builder- Since:
- 2.14.0 This new api is in preview and is subject to breaking changes.
-