Package com.google.cloud.logging.v2
Class ConfigSettings
@Generated("by gapic-generator-java")
public class ConfigSettings
extends ClientSettings<ConfigSettings>
Settings class to configure an instance of
ConfigClient.
The default instance has everything set to sensible defaults:
- The default service address (logging.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) of getBucket:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ConfigSettings.Builder configSettingsBuilder = ConfigSettings.newBuilder();
configSettingsBuilder
.getBucketSettings()
.setRetrySettings(
configSettingsBuilder
.getBucketSettings()
.getRetrySettings()
.toBuilder()
.setInitialRetryDelayDuration(Duration.ofSeconds(1))
.setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
.setMaxAttempts(5)
.setMaxRetryDelayDuration(Duration.ofSeconds(30))
.setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.5)
.setTotalTimeoutDuration(Duration.ofSeconds(300))
.build());
ConfigSettings configSettings = configSettingsBuilder.build();
Please refer to the [Client Side Retry
Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
retries.
To configure the RetrySettings of a Long Running Operation method, create an OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to configure the RetrySettings for createBucketAsync:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ConfigSettings.Builder configSettingsBuilder = ConfigSettings.newBuilder();
TimedRetryAlgorithm timedRetryAlgorithm =
OperationalTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(500))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelayDuration(Duration.ofMillis(5000))
.setTotalTimeoutDuration(Duration.ofHours(24))
.build());
configSettingsBuilder
.createClusterOperationSettings()
.setPollingAlgorithm(timedRetryAlgorithm)
.build();
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the object with the settings used for calls to copyLogEntries.Returns the object with the settings used for calls to copyLogEntries.static final ConfigSettingsReturns the object with the settings used for calls to createBucketAsync.Returns the object with the settings used for calls to createBucketAsync.Returns the object with the settings used for calls to createBucket.Returns the object with the settings used for calls to createExclusion.Returns the object with the settings used for calls to createLink.Returns the object with the settings used for calls to createLink.Returns the object with the settings used for calls to createSink.Returns the object with the settings used for calls to createView.Returns a builder for the default credentials for this service.Returns a builder for the default ExecutorProvider for this service.Returns a builder for the default ChannelProvider for this service.static TransportChannelProviderUnaryCallSettings<DeleteBucketRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteBucket.UnaryCallSettings<DeleteExclusionRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteExclusion.OperationCallSettings<DeleteLinkRequest,com.google.protobuf.Empty, LinkMetadata> Returns the object with the settings used for calls to deleteLink.Returns the object with the settings used for calls to deleteLink.UnaryCallSettings<DeleteSinkRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteSink.UnaryCallSettings<DeleteViewRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteView.Returns the object with the settings used for calls to getBucket.Returns the object with the settings used for calls to getCmekSettings.static StringReturns the default service endpoint.Returns the default service scopes.Returns the object with the settings used for calls to getExclusion.Returns the object with the settings used for calls to getLink.Returns the object with the settings used for calls to getSettings.Returns the object with the settings used for calls to getSink.Returns the object with the settings used for calls to getView.Returns the object with the settings used for calls to listBuckets.PagedCallSettings<ListExclusionsRequest,ListExclusionsResponse, ConfigClient.ListExclusionsPagedResponse> Returns the object with the settings used for calls to listExclusions.Returns the object with the settings used for calls to listLinks.Returns the object with the settings used for calls to listSinks.Returns the object with the settings used for calls to listViews.static ConfigSettings.BuilderReturns a new builder for this class.static ConfigSettings.BuildernewBuilder(ClientContext clientContext) Returns a new builder for this class.Returns a builder containing all the values of this settings class.UnaryCallSettings<UndeleteBucketRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to undeleteBucket.Returns the object with the settings used for calls to updateBucketAsync.Returns the object with the settings used for calls to updateBucketAsync.Returns the object with the settings used for calls to updateBucket.Returns the object with the settings used for calls to updateCmekSettings.Returns the object with the settings used for calls to updateExclusion.Returns the object with the settings used for calls to updateSettings.Returns the object with the settings used for calls to updateSink.Returns the object with the settings used for calls to updateView.Methods inherited from class com.google.api.gax.rpc.ClientSettings
getApiKey, getBackgroundExecutorProvider, getClock, getCredentialsProvider, getEndpoint, getExecutorProvider, getGdchApiAudience, getHeaderProvider, getInternalHeaderProvider, getQuotaProjectId, getStubSettings, getTransportChannelProvider, getUniverseDomain, getWatchdogCheckInterval, getWatchdogCheckIntervalDuration, getWatchdogProvider, toString
-
Constructor Details
-
ConfigSettings
- Throws:
IOException
-
-
Method Details
-
listBucketsSettings
public PagedCallSettings<ListBucketsRequest,ListBucketsResponse, listBucketsSettings()ConfigClient.ListBucketsPagedResponse> Returns the object with the settings used for calls to listBuckets. -
getBucketSettings
Returns the object with the settings used for calls to getBucket. -
createBucketAsyncSettings
Returns the object with the settings used for calls to createBucketAsync. -
createBucketAsyncOperationSettings
public OperationCallSettings<CreateBucketRequest,LogBucket, createBucketAsyncOperationSettings()BucketMetadata> Returns the object with the settings used for calls to createBucketAsync. -
updateBucketAsyncSettings
Returns the object with the settings used for calls to updateBucketAsync. -
updateBucketAsyncOperationSettings
public OperationCallSettings<UpdateBucketRequest,LogBucket, updateBucketAsyncOperationSettings()BucketMetadata> Returns the object with the settings used for calls to updateBucketAsync. -
createBucketSettings
Returns the object with the settings used for calls to createBucket. -
updateBucketSettings
Returns the object with the settings used for calls to updateBucket. -
deleteBucketSettings
Returns the object with the settings used for calls to deleteBucket. -
undeleteBucketSettings
Returns the object with the settings used for calls to undeleteBucket. -
listViewsSettings
public PagedCallSettings<ListViewsRequest,ListViewsResponse, listViewsSettings()ConfigClient.ListViewsPagedResponse> Returns the object with the settings used for calls to listViews. -
getViewSettings
Returns the object with the settings used for calls to getView. -
createViewSettings
Returns the object with the settings used for calls to createView. -
updateViewSettings
Returns the object with the settings used for calls to updateView. -
deleteViewSettings
Returns the object with the settings used for calls to deleteView. -
listSinksSettings
public PagedCallSettings<ListSinksRequest,ListSinksResponse, listSinksSettings()ConfigClient.ListSinksPagedResponse> Returns the object with the settings used for calls to listSinks. -
getSinkSettings
Returns the object with the settings used for calls to getSink. -
createSinkSettings
Returns the object with the settings used for calls to createSink. -
updateSinkSettings
Returns the object with the settings used for calls to updateSink. -
deleteSinkSettings
Returns the object with the settings used for calls to deleteSink. -
createLinkSettings
Returns the object with the settings used for calls to createLink. -
createLinkOperationSettings
Returns the object with the settings used for calls to createLink. -
deleteLinkSettings
Returns the object with the settings used for calls to deleteLink. -
deleteLinkOperationSettings
public OperationCallSettings<DeleteLinkRequest,com.google.protobuf.Empty, deleteLinkOperationSettings()LinkMetadata> Returns the object with the settings used for calls to deleteLink. -
listLinksSettings
public PagedCallSettings<ListLinksRequest,ListLinksResponse, listLinksSettings()ConfigClient.ListLinksPagedResponse> Returns the object with the settings used for calls to listLinks. -
getLinkSettings
Returns the object with the settings used for calls to getLink. -
listExclusionsSettings
public PagedCallSettings<ListExclusionsRequest,ListExclusionsResponse, listExclusionsSettings()ConfigClient.ListExclusionsPagedResponse> Returns the object with the settings used for calls to listExclusions. -
getExclusionSettings
Returns the object with the settings used for calls to getExclusion. -
createExclusionSettings
Returns the object with the settings used for calls to createExclusion. -
updateExclusionSettings
Returns the object with the settings used for calls to updateExclusion. -
deleteExclusionSettings
public UnaryCallSettings<DeleteExclusionRequest,com.google.protobuf.Empty> deleteExclusionSettings()Returns the object with the settings used for calls to deleteExclusion. -
getCmekSettingsSettings
Returns the object with the settings used for calls to getCmekSettings. -
updateCmekSettingsSettings
Returns the object with the settings used for calls to updateCmekSettings. -
getSettingsSettings
Returns the object with the settings used for calls to getSettings. -
updateSettingsSettings
Returns the object with the settings used for calls to updateSettings. -
copyLogEntriesSettings
Returns the object with the settings used for calls to copyLogEntries. -
copyLogEntriesOperationSettings
public OperationCallSettings<CopyLogEntriesRequest,CopyLogEntriesResponse, copyLogEntriesOperationSettings()CopyLogEntriesMetadata> Returns the object with the settings used for calls to copyLogEntries. -
create
- Throws:
IOException
-
defaultExecutorProviderBuilder
Returns a builder for the default ExecutorProvider for this service. -
getDefaultEndpoint
Returns the default service endpoint. -
getDefaultServiceScopes
Returns the default service scopes. -
defaultCredentialsProviderBuilder
Returns a builder for the default credentials for this service. -
defaultGrpcTransportProviderBuilder
Returns a builder for the default ChannelProvider for this service. -
defaultTransportChannelProvider
-
defaultApiClientHeaderProviderBuilder
-
newBuilder
Returns a new builder for this class. -
newBuilder
Returns a new builder for this class. -
toBuilder
Returns a builder containing all the values of this settings class.- Specified by:
toBuilderin classClientSettings<ConfigSettings>
-