public class ManagedKafkaConnectStubSettings extends StubSettings<ManagedKafkaConnectStubSettings>
Settings class to configure an instance of ManagedKafkaConnectStub.
The default instance has everything set to sensible defaults:
- The default service address (managedkafka.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 getConnectCluster:
// 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
ManagedKafkaConnectStubSettings.Builder managedKafkaConnectSettingsBuilder =
ManagedKafkaConnectStubSettings.newBuilder();
managedKafkaConnectSettingsBuilder
.getConnectClusterSettings()
.setRetrySettings(
managedKafkaConnectSettingsBuilder
.getConnectClusterSettings()
.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());
ManagedKafkaConnectStubSettings managedKafkaConnectSettings =
managedKafkaConnectSettingsBuilder.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 createConnectCluster:
// 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
ManagedKafkaConnectStubSettings.Builder managedKafkaConnectSettingsBuilder =
ManagedKafkaConnectStubSettings.newBuilder();
TimedRetryAlgorithm timedRetryAlgorithm =
OperationalTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(500))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelayDuration(Duration.ofMillis(5000))
.setTotalTimeoutDuration(Duration.ofHours(24))
.build());
managedKafkaConnectSettingsBuilder
.createClusterOperationSettings()
.setPollingAlgorithm(timedRetryAlgorithm)
.build();
Static Methods
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 |
defaultGrpcApiClientHeaderProviderBuilder()
public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder()
Returns | |
---|---|
Type | Description |
Builder |
defaultGrpcTransportProviderBuilder()
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()
Returns a builder for the default gRPC ChannelProvider for this service.
Returns | |
---|---|
Type | Description |
Builder |
defaultHttpJsonApiClientHeaderProviderBuilder()
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder()
Returns | |
---|---|
Type | Description |
Builder |
defaultHttpJsonTransportProviderBuilder()
public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()
Returns a builder for the default REST 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 |
getDefaultMtlsEndpoint()
public static String getDefaultMtlsEndpoint()
Returns the default mTLS 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 ManagedKafkaConnectStubSettings.Builder newBuilder()
Returns a new gRPC builder for this class.
Returns | |
---|---|
Type | Description |
ManagedKafkaConnectStubSettings.Builder |
newBuilder(ClientContext clientContext)
public static ManagedKafkaConnectStubSettings.Builder newBuilder(ClientContext clientContext)
Returns a new builder for this class.
Parameter | |
---|---|
Name | Description |
clientContext |
ClientContext |
Returns | |
---|---|
Type | Description |
ManagedKafkaConnectStubSettings.Builder |
newHttpJsonBuilder()
public static ManagedKafkaConnectStubSettings.Builder newHttpJsonBuilder()
Returns a new REST builder for this class.
Returns | |
---|---|
Type | Description |
ManagedKafkaConnectStubSettings.Builder |
Constructors
ManagedKafkaConnectStubSettings(ManagedKafkaConnectStubSettings.Builder settingsBuilder)
protected ManagedKafkaConnectStubSettings(ManagedKafkaConnectStubSettings.Builder settingsBuilder)
Parameter | |
---|---|
Name | Description |
settingsBuilder |
ManagedKafkaConnectStubSettings.Builder |
Methods
createConnectClusterOperationSettings()
public OperationCallSettings<CreateConnectClusterRequest,ConnectCluster,OperationMetadata> createConnectClusterOperationSettings()
Returns the object with the settings used for calls to createConnectCluster.
Returns | |
---|---|
Type | Description |
OperationCallSettings<CreateConnectClusterRequest,ConnectCluster,OperationMetadata> |
createConnectClusterSettings()
public UnaryCallSettings<CreateConnectClusterRequest,Operation> createConnectClusterSettings()
Returns the object with the settings used for calls to createConnectCluster.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<CreateConnectClusterRequest,Operation> |
createConnectorSettings()
public UnaryCallSettings<CreateConnectorRequest,Connector> createConnectorSettings()
Returns the object with the settings used for calls to createConnector.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<CreateConnectorRequest,Connector> |
createStub()
public ManagedKafkaConnectStub createStub()
Returns | |
---|---|
Type | Description |
ManagedKafkaConnectStub |
Exceptions | |
---|---|
Type | Description |
IOException |
deleteConnectClusterOperationSettings()
public OperationCallSettings<DeleteConnectClusterRequest,Empty,OperationMetadata> deleteConnectClusterOperationSettings()
Returns the object with the settings used for calls to deleteConnectCluster.
Returns | |
---|---|
Type | Description |
OperationCallSettings<DeleteConnectClusterRequest,Empty,OperationMetadata> |
deleteConnectClusterSettings()
public UnaryCallSettings<DeleteConnectClusterRequest,Operation> deleteConnectClusterSettings()
Returns the object with the settings used for calls to deleteConnectCluster.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<DeleteConnectClusterRequest,Operation> |
deleteConnectorSettings()
public UnaryCallSettings<DeleteConnectorRequest,Empty> deleteConnectorSettings()
Returns the object with the settings used for calls to deleteConnector.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<DeleteConnectorRequest,Empty> |
getConnectClusterSettings()
public UnaryCallSettings<GetConnectClusterRequest,ConnectCluster> getConnectClusterSettings()
Returns the object with the settings used for calls to getConnectCluster.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<GetConnectClusterRequest,ConnectCluster> |
getConnectorSettings()
public UnaryCallSettings<GetConnectorRequest,Connector> getConnectorSettings()
Returns the object with the settings used for calls to getConnector.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<GetConnectorRequest,Connector> |
getLocationSettings()
public UnaryCallSettings<GetLocationRequest,Location> getLocationSettings()
Returns the object with the settings used for calls to getLocation.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getServiceName()
public String getServiceName()
Returns the default service name.
Returns | |
---|---|
Type | Description |
String |
listConnectClustersSettings()
public PagedCallSettings<ListConnectClustersRequest,ListConnectClustersResponse,ManagedKafkaConnectClient.ListConnectClustersPagedResponse> listConnectClustersSettings()
Returns the object with the settings used for calls to listConnectClusters.
Returns | |
---|---|
Type | Description |
PagedCallSettings<ListConnectClustersRequest,ListConnectClustersResponse,ListConnectClustersPagedResponse> |
listConnectorsSettings()
public PagedCallSettings<ListConnectorsRequest,ListConnectorsResponse,ManagedKafkaConnectClient.ListConnectorsPagedResponse> listConnectorsSettings()
Returns the object with the settings used for calls to listConnectors.
Returns | |
---|---|
Type | Description |
PagedCallSettings<ListConnectorsRequest,ListConnectorsResponse,ListConnectorsPagedResponse> |
listLocationsSettings()
public PagedCallSettings<ListLocationsRequest,ListLocationsResponse,ManagedKafkaConnectClient.ListLocationsPagedResponse> listLocationsSettings()
Returns the object with the settings used for calls to listLocations.
Returns | |
---|---|
Type | Description |
PagedCallSettings<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse,ListLocationsPagedResponse> |
pauseConnectorSettings()
public UnaryCallSettings<PauseConnectorRequest,PauseConnectorResponse> pauseConnectorSettings()
Returns the object with the settings used for calls to pauseConnector.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<PauseConnectorRequest,PauseConnectorResponse> |
restartConnectorSettings()
public UnaryCallSettings<RestartConnectorRequest,RestartConnectorResponse> restartConnectorSettings()
Returns the object with the settings used for calls to restartConnector.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<RestartConnectorRequest,RestartConnectorResponse> |
resumeConnectorSettings()
public UnaryCallSettings<ResumeConnectorRequest,ResumeConnectorResponse> resumeConnectorSettings()
Returns the object with the settings used for calls to resumeConnector.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<ResumeConnectorRequest,ResumeConnectorResponse> |
stopConnectorSettings()
public UnaryCallSettings<StopConnectorRequest,StopConnectorResponse> stopConnectorSettings()
Returns the object with the settings used for calls to stopConnector.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<StopConnectorRequest,StopConnectorResponse> |
toBuilder()
public ManagedKafkaConnectStubSettings.Builder toBuilder()
Returns a builder containing all the values of this settings class.
Returns | |
---|---|
Type | Description |
ManagedKafkaConnectStubSettings.Builder |
updateConnectClusterOperationSettings()
public OperationCallSettings<UpdateConnectClusterRequest,ConnectCluster,OperationMetadata> updateConnectClusterOperationSettings()
Returns the object with the settings used for calls to updateConnectCluster.
Returns | |
---|---|
Type | Description |
OperationCallSettings<UpdateConnectClusterRequest,ConnectCluster,OperationMetadata> |
updateConnectClusterSettings()
public UnaryCallSettings<UpdateConnectClusterRequest,Operation> updateConnectClusterSettings()
Returns the object with the settings used for calls to updateConnectCluster.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<UpdateConnectClusterRequest,Operation> |
updateConnectorSettings()
public UnaryCallSettings<UpdateConnectorRequest,Connector> updateConnectorSettings()
Returns the object with the settings used for calls to updateConnector.
Returns | |
---|---|
Type | Description |
UnaryCallSettings<UpdateConnectorRequest,Connector> |