Class ConfigSettings (3.20.6)

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 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 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)
             .setMaxRetryDelay(Duration.ofMillis(5000))
             .setTotalTimeoutDuration(Duration.ofHours(24))
             .build());
 configSettingsBuilder
     .createClusterOperationSettings()
     .setPollingAlgorithm(timedRetryAlgorithm)
     .build();
 

Inheritance

java.lang.Object > ClientSettings > ConfigSettings

Static Methods

create(ConfigServiceV2StubSettings stub)

public static final ConfigSettings create(ConfigServiceV2StubSettings stub)
Parameter
Name Description
stub ConfigServiceV2StubSettings
Returns
Type Description
ConfigSettings
Exceptions
Type Description
IOException

defaultApiClientHeaderProviderBuilder()

public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
Returns
Type Description
Builder

defaultCredentialsProviderBuilder()

public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()

Returns a builder for the default credentials for this service.

Returns
Type Description
Builder

defaultExecutorProviderBuilder()

public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()

Returns a builder for the default ExecutorProvider for this service.

Returns
Type Description
Builder

defaultGrpcTransportProviderBuilder()

public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()

Returns a builder for the default ChannelProvider for this service.

Returns
Type Description
Builder

defaultTransportChannelProvider()

public static TransportChannelProvider defaultTransportChannelProvider()
Returns
Type Description
TransportChannelProvider

getDefaultEndpoint()

public static String getDefaultEndpoint()

Returns the default service endpoint.

Returns
Type Description
String

getDefaultServiceScopes()

public static List<String> getDefaultServiceScopes()

Returns the default service scopes.

Returns
Type Description
List<String>

newBuilder()

public static ConfigSettings.Builder newBuilder()

Returns a new builder for this class.

Returns
Type Description
ConfigSettings.Builder

newBuilder(ClientContext clientContext)

public static ConfigSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
ConfigSettings.Builder

Constructors

ConfigSettings(ConfigSettings.Builder settingsBuilder)

protected ConfigSettings(ConfigSettings.Builder settingsBuilder)
Parameter
Name Description
settingsBuilder ConfigSettings.Builder

Methods

copyLogEntriesOperationSettings()

public OperationCallSettings<CopyLogEntriesRequest,CopyLogEntriesResponse,CopyLogEntriesMetadata> copyLogEntriesOperationSettings()

Returns the object with the settings used for calls to copyLogEntries.

Returns
Type Description
OperationCallSettings<CopyLogEntriesRequest,CopyLogEntriesResponse,CopyLogEntriesMetadata>

copyLogEntriesSettings()

public UnaryCallSettings<CopyLogEntriesRequest,Operation> copyLogEntriesSettings()

Returns the object with the settings used for calls to copyLogEntries.

Returns
Type Description
UnaryCallSettings<CopyLogEntriesRequest,Operation>

createBucketAsyncOperationSettings()

public OperationCallSettings<CreateBucketRequest,LogBucket,BucketMetadata> createBucketAsyncOperationSettings()

Returns the object with the settings used for calls to createBucketAsync.

Returns
Type Description
OperationCallSettings<CreateBucketRequest,LogBucket,BucketMetadata>

createBucketAsyncSettings()

public UnaryCallSettings<CreateBucketRequest,Operation> createBucketAsyncSettings()

Returns the object with the settings used for calls to createBucketAsync.

Returns
Type Description
UnaryCallSettings<CreateBucketRequest,Operation>

createBucketSettings()

public UnaryCallSettings<CreateBucketRequest,LogBucket> createBucketSettings()

Returns the object with the settings used for calls to createBucket.

Returns
Type Description
UnaryCallSettings<CreateBucketRequest,LogBucket>

createExclusionSettings()

public UnaryCallSettings<CreateExclusionRequest,LogExclusion> createExclusionSettings()

Returns the object with the settings used for calls to createExclusion.

Returns
Type Description
UnaryCallSettings<CreateExclusionRequest,LogExclusion>

createLinkOperationSettings()

public OperationCallSettings<CreateLinkRequest,Link,LinkMetadata> createLinkOperationSettings()

Returns the object with the settings used for calls to createLink.

Returns
Type Description
OperationCallSettings<CreateLinkRequest,Link,LinkMetadata>

createLinkSettings()

public UnaryCallSettings<CreateLinkRequest,Operation> createLinkSettings()

Returns the object with the settings used for calls to createLink.

Returns
Type Description
UnaryCallSettings<CreateLinkRequest,Operation>

createSinkSettings()

public UnaryCallSettings<CreateSinkRequest,LogSink> createSinkSettings()

Returns the object with the settings used for calls to createSink.

Returns
Type Description
UnaryCallSettings<CreateSinkRequest,LogSink>

createViewSettings()

public UnaryCallSettings<CreateViewRequest,LogView> createViewSettings()

Returns the object with the settings used for calls to createView.

Returns
Type Description
UnaryCallSettings<CreateViewRequest,LogView>

deleteBucketSettings()

public UnaryCallSettings<DeleteBucketRequest,Empty> deleteBucketSettings()

Returns the object with the settings used for calls to deleteBucket.

Returns
Type Description
UnaryCallSettings<DeleteBucketRequest,Empty>

deleteExclusionSettings()

public UnaryCallSettings<DeleteExclusionRequest,Empty> deleteExclusionSettings()

Returns the object with the settings used for calls to deleteExclusion.

Returns
Type Description
UnaryCallSettings<DeleteExclusionRequest,Empty>

deleteLinkOperationSettings()

public OperationCallSettings<DeleteLinkRequest,Empty,LinkMetadata> deleteLinkOperationSettings()

Returns the object with the settings used for calls to deleteLink.

Returns
Type Description
OperationCallSettings<DeleteLinkRequest,Empty,LinkMetadata>

deleteLinkSettings()

public UnaryCallSettings<DeleteLinkRequest,Operation> deleteLinkSettings()

Returns the object with the settings used for calls to deleteLink.

Returns
Type Description
UnaryCallSettings<DeleteLinkRequest,Operation>

deleteSinkSettings()

public UnaryCallSettings<DeleteSinkRequest,Empty> deleteSinkSettings()

Returns the object with the settings used for calls to deleteSink.

Returns
Type Description
UnaryCallSettings<DeleteSinkRequest,Empty>

deleteViewSettings()

public UnaryCallSettings<DeleteViewRequest,Empty> deleteViewSettings()

Returns the object with the settings used for calls to deleteView.

Returns
Type Description
UnaryCallSettings<DeleteViewRequest,Empty>

getBucketSettings()

public UnaryCallSettings<GetBucketRequest,LogBucket> getBucketSettings()

Returns the object with the settings used for calls to getBucket.

Returns
Type Description
UnaryCallSettings<GetBucketRequest,LogBucket>

getCmekSettingsSettings()

public UnaryCallSettings<GetCmekSettingsRequest,CmekSettings> getCmekSettingsSettings()

Returns the object with the settings used for calls to getCmekSettings.

Returns
Type Description
UnaryCallSettings<GetCmekSettingsRequest,CmekSettings>

getExclusionSettings()

public UnaryCallSettings<GetExclusionRequest,LogExclusion> getExclusionSettings()

Returns the object with the settings used for calls to getExclusion.

Returns
Type Description
UnaryCallSettings<GetExclusionRequest,LogExclusion>

getLinkSettings()

public UnaryCallSettings<GetLinkRequest,Link> getLinkSettings()

Returns the object with the settings used for calls to getLink.

Returns
Type Description
UnaryCallSettings<GetLinkRequest,Link>

getSettingsSettings()

public UnaryCallSettings<GetSettingsRequest,Settings> getSettingsSettings()

Returns the object with the settings used for calls to getSettings.

Returns
Type Description
UnaryCallSettings<GetSettingsRequest,Settings>

getSinkSettings()

public UnaryCallSettings<GetSinkRequest,LogSink> getSinkSettings()

Returns the object with the settings used for calls to getSink.

Returns
Type Description
UnaryCallSettings<GetSinkRequest,LogSink>

getViewSettings()

public UnaryCallSettings<GetViewRequest,LogView> getViewSettings()

Returns the object with the settings used for calls to getView.

Returns
Type Description
UnaryCallSettings<GetViewRequest,LogView>

listBucketsSettings()

public PagedCallSettings<ListBucketsRequest,ListBucketsResponse,ConfigClient.ListBucketsPagedResponse> listBucketsSettings()

Returns the object with the settings used for calls to listBuckets.

Returns
Type Description
PagedCallSettings<ListBucketsRequest,ListBucketsResponse,ListBucketsPagedResponse>

listExclusionsSettings()

public PagedCallSettings<ListExclusionsRequest,ListExclusionsResponse,ConfigClient.ListExclusionsPagedResponse> listExclusionsSettings()

Returns the object with the settings used for calls to listExclusions.

Returns
Type Description
PagedCallSettings<ListExclusionsRequest,ListExclusionsResponse,ListExclusionsPagedResponse>

listLinksSettings()

public PagedCallSettings<ListLinksRequest,ListLinksResponse,ConfigClient.ListLinksPagedResponse> listLinksSettings()

Returns the object with the settings used for calls to listLinks.

Returns
Type Description
PagedCallSettings<ListLinksRequest,ListLinksResponse,ListLinksPagedResponse>

listSinksSettings()

public PagedCallSettings<ListSinksRequest,ListSinksResponse,ConfigClient.ListSinksPagedResponse> listSinksSettings()

Returns the object with the settings used for calls to listSinks.

Returns
Type Description
PagedCallSettings<ListSinksRequest,ListSinksResponse,ListSinksPagedResponse>

listViewsSettings()

public PagedCallSettings<ListViewsRequest,ListViewsResponse,ConfigClient.ListViewsPagedResponse> listViewsSettings()

Returns the object with the settings used for calls to listViews.

Returns
Type Description
PagedCallSettings<ListViewsRequest,ListViewsResponse,ListViewsPagedResponse>

toBuilder()

public ConfigSettings.Builder toBuilder()

Returns a builder containing all the values of this settings class.

Returns
Type Description
ConfigSettings.Builder
Overrides

undeleteBucketSettings()

public UnaryCallSettings<UndeleteBucketRequest,Empty> undeleteBucketSettings()

Returns the object with the settings used for calls to undeleteBucket.

Returns
Type Description
UnaryCallSettings<UndeleteBucketRequest,Empty>

updateBucketAsyncOperationSettings()

public OperationCallSettings<UpdateBucketRequest,LogBucket,BucketMetadata> updateBucketAsyncOperationSettings()

Returns the object with the settings used for calls to updateBucketAsync.

Returns
Type Description
OperationCallSettings<UpdateBucketRequest,LogBucket,BucketMetadata>

updateBucketAsyncSettings()

public UnaryCallSettings<UpdateBucketRequest,Operation> updateBucketAsyncSettings()

Returns the object with the settings used for calls to updateBucketAsync.

Returns
Type Description
UnaryCallSettings<UpdateBucketRequest,Operation>

updateBucketSettings()

public UnaryCallSettings<UpdateBucketRequest,LogBucket> updateBucketSettings()

Returns the object with the settings used for calls to updateBucket.

Returns
Type Description
UnaryCallSettings<UpdateBucketRequest,LogBucket>

updateCmekSettingsSettings()

public UnaryCallSettings<UpdateCmekSettingsRequest,CmekSettings> updateCmekSettingsSettings()

Returns the object with the settings used for calls to updateCmekSettings.

Returns
Type Description
UnaryCallSettings<UpdateCmekSettingsRequest,CmekSettings>

updateExclusionSettings()

public UnaryCallSettings<UpdateExclusionRequest,LogExclusion> updateExclusionSettings()

Returns the object with the settings used for calls to updateExclusion.

Returns
Type Description
UnaryCallSettings<UpdateExclusionRequest,LogExclusion>

updateSettingsSettings()

public UnaryCallSettings<UpdateSettingsRequest,Settings> updateSettingsSettings()

Returns the object with the settings used for calls to updateSettings.

Returns
Type Description
UnaryCallSettings<UpdateSettingsRequest,Settings>

updateSinkSettings()

public UnaryCallSettings<UpdateSinkRequest,LogSink> updateSinkSettings()

Returns the object with the settings used for calls to updateSink.

Returns
Type Description
UnaryCallSettings<UpdateSinkRequest,LogSink>

updateViewSettings()

public UnaryCallSettings<UpdateViewRequest,LogView> updateViewSettings()

Returns the object with the settings used for calls to updateView.

Returns
Type Description
UnaryCallSettings<UpdateViewRequest,LogView>