Class DatastreamSettings (1.50.0)

public class DatastreamSettings extends ClientSettings<DatastreamSettings>

Settings class to configure an instance of DatastreamClient.

The default instance has everything set to sensible defaults:

  • The default service address (datastream.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 getConnectionProfile:


 // 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
 DatastreamSettings.Builder datastreamSettingsBuilder = DatastreamSettings.newBuilder();
 datastreamSettingsBuilder
     .getConnectionProfileSettings()
     .setRetrySettings(
         datastreamSettingsBuilder
             .getConnectionProfileSettings()
             .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());
 DatastreamSettings datastreamSettings = datastreamSettingsBuilder.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 createConnectionProfile:


 // 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
 DatastreamSettings.Builder datastreamSettingsBuilder = DatastreamSettings.newBuilder();
 TimedRetryAlgorithm timedRetryAlgorithm =
     OperationalTimedPollAlgorithm.create(
         RetrySettings.newBuilder()
             .setInitialRetryDelayDuration(Duration.ofMillis(500))
             .setRetryDelayMultiplier(1.5)
             .setMaxRetryDelay(Duration.ofMillis(5000))
             .setTotalTimeoutDuration(Duration.ofHours(24))
             .build());
 datastreamSettingsBuilder
     .createClusterOperationSettings()
     .setPollingAlgorithm(timedRetryAlgorithm)
     .build();
 

Inheritance

java.lang.Object > ClientSettings > DatastreamSettings

Static Methods

create(DatastreamStubSettings stub)

public static final DatastreamSettings create(DatastreamStubSettings stub)
Parameter
Name Description
stub DatastreamStubSettings
Returns
Type Description
DatastreamSettings
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 gRPC ChannelProvider for this service.

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

getDefaultServiceScopes()

public static List<String> getDefaultServiceScopes()

Returns the default service scopes.

Returns
Type Description
List<String>

newBuilder()

public static DatastreamSettings.Builder newBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description
DatastreamSettings.Builder

newBuilder(ClientContext clientContext)

public static DatastreamSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
DatastreamSettings.Builder

newHttpJsonBuilder()

public static DatastreamSettings.Builder newHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description
DatastreamSettings.Builder

Constructors

DatastreamSettings(DatastreamSettings.Builder settingsBuilder)

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

Methods

createConnectionProfileOperationSettings()

public OperationCallSettings<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata> createConnectionProfileOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreateConnectionProfileRequest,ConnectionProfile,OperationMetadata>

createConnectionProfileSettings()

public UnaryCallSettings<CreateConnectionProfileRequest,Operation> createConnectionProfileSettings()

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

Returns
Type Description
UnaryCallSettings<CreateConnectionProfileRequest,Operation>

createPrivateConnectionOperationSettings()

public OperationCallSettings<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata> createPrivateConnectionOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata>

createPrivateConnectionSettings()

public UnaryCallSettings<CreatePrivateConnectionRequest,Operation> createPrivateConnectionSettings()

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

Returns
Type Description
UnaryCallSettings<CreatePrivateConnectionRequest,Operation>

createRouteOperationSettings()

public OperationCallSettings<CreateRouteRequest,Route,OperationMetadata> createRouteOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreateRouteRequest,Route,OperationMetadata>

createRouteSettings()

public UnaryCallSettings<CreateRouteRequest,Operation> createRouteSettings()

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

Returns
Type Description
UnaryCallSettings<CreateRouteRequest,Operation>

createStreamOperationSettings()

public OperationCallSettings<CreateStreamRequest,Stream,OperationMetadata> createStreamOperationSettings()

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

Returns
Type Description
OperationCallSettings<CreateStreamRequest,Stream,OperationMetadata>

createStreamSettings()

public UnaryCallSettings<CreateStreamRequest,Operation> createStreamSettings()

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

Returns
Type Description
UnaryCallSettings<CreateStreamRequest,Operation>

deleteConnectionProfileOperationSettings()

public OperationCallSettings<DeleteConnectionProfileRequest,Empty,OperationMetadata> deleteConnectionProfileOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteConnectionProfileRequest,Empty,OperationMetadata>

deleteConnectionProfileSettings()

public UnaryCallSettings<DeleteConnectionProfileRequest,Operation> deleteConnectionProfileSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteConnectionProfileRequest,Operation>

deletePrivateConnectionOperationSettings()

public OperationCallSettings<DeletePrivateConnectionRequest,Empty,OperationMetadata> deletePrivateConnectionOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeletePrivateConnectionRequest,Empty,OperationMetadata>

deletePrivateConnectionSettings()

public UnaryCallSettings<DeletePrivateConnectionRequest,Operation> deletePrivateConnectionSettings()

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

Returns
Type Description
UnaryCallSettings<DeletePrivateConnectionRequest,Operation>

deleteRouteOperationSettings()

public OperationCallSettings<DeleteRouteRequest,Empty,OperationMetadata> deleteRouteOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteRouteRequest,Empty,OperationMetadata>

deleteRouteSettings()

public UnaryCallSettings<DeleteRouteRequest,Operation> deleteRouteSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteRouteRequest,Operation>

deleteStreamOperationSettings()

public OperationCallSettings<DeleteStreamRequest,Empty,OperationMetadata> deleteStreamOperationSettings()

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

Returns
Type Description
OperationCallSettings<DeleteStreamRequest,Empty,OperationMetadata>

deleteStreamSettings()

public UnaryCallSettings<DeleteStreamRequest,Operation> deleteStreamSettings()

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

Returns
Type Description
UnaryCallSettings<DeleteStreamRequest,Operation>

discoverConnectionProfileSettings()

public UnaryCallSettings<DiscoverConnectionProfileRequest,DiscoverConnectionProfileResponse> discoverConnectionProfileSettings()

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

Returns
Type Description
UnaryCallSettings<DiscoverConnectionProfileRequest,DiscoverConnectionProfileResponse>

fetchStaticIpsSettings()

public PagedCallSettings<FetchStaticIpsRequest,FetchStaticIpsResponse,DatastreamClient.FetchStaticIpsPagedResponse> fetchStaticIpsSettings()

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

Returns
Type Description
PagedCallSettings<FetchStaticIpsRequest,FetchStaticIpsResponse,FetchStaticIpsPagedResponse>

getConnectionProfileSettings()

public UnaryCallSettings<GetConnectionProfileRequest,ConnectionProfile> getConnectionProfileSettings()

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

Returns
Type Description
UnaryCallSettings<GetConnectionProfileRequest,ConnectionProfile>

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>

getPrivateConnectionSettings()

public UnaryCallSettings<GetPrivateConnectionRequest,PrivateConnection> getPrivateConnectionSettings()

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

Returns
Type Description
UnaryCallSettings<GetPrivateConnectionRequest,PrivateConnection>

getRouteSettings()

public UnaryCallSettings<GetRouteRequest,Route> getRouteSettings()

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

Returns
Type Description
UnaryCallSettings<GetRouteRequest,Route>

getStreamObjectSettings()

public UnaryCallSettings<GetStreamObjectRequest,StreamObject> getStreamObjectSettings()

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

Returns
Type Description
UnaryCallSettings<GetStreamObjectRequest,StreamObject>

getStreamSettings()

public UnaryCallSettings<GetStreamRequest,Stream> getStreamSettings()

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

Returns
Type Description
UnaryCallSettings<GetStreamRequest,Stream>

listConnectionProfilesSettings()

public PagedCallSettings<ListConnectionProfilesRequest,ListConnectionProfilesResponse,DatastreamClient.ListConnectionProfilesPagedResponse> listConnectionProfilesSettings()

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

Returns
Type Description
PagedCallSettings<ListConnectionProfilesRequest,ListConnectionProfilesResponse,ListConnectionProfilesPagedResponse>

listLocationsSettings()

public PagedCallSettings<ListLocationsRequest,ListLocationsResponse,DatastreamClient.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>

listPrivateConnectionsSettings()

public PagedCallSettings<ListPrivateConnectionsRequest,ListPrivateConnectionsResponse,DatastreamClient.ListPrivateConnectionsPagedResponse> listPrivateConnectionsSettings()

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

Returns
Type Description
PagedCallSettings<ListPrivateConnectionsRequest,ListPrivateConnectionsResponse,ListPrivateConnectionsPagedResponse>

listRoutesSettings()

public PagedCallSettings<ListRoutesRequest,ListRoutesResponse,DatastreamClient.ListRoutesPagedResponse> listRoutesSettings()

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

Returns
Type Description
PagedCallSettings<ListRoutesRequest,ListRoutesResponse,ListRoutesPagedResponse>

listStreamObjectsSettings()

public PagedCallSettings<ListStreamObjectsRequest,ListStreamObjectsResponse,DatastreamClient.ListStreamObjectsPagedResponse> listStreamObjectsSettings()

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

Returns
Type Description
PagedCallSettings<ListStreamObjectsRequest,ListStreamObjectsResponse,ListStreamObjectsPagedResponse>

listStreamsSettings()

public PagedCallSettings<ListStreamsRequest,ListStreamsResponse,DatastreamClient.ListStreamsPagedResponse> listStreamsSettings()

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

Returns
Type Description
PagedCallSettings<ListStreamsRequest,ListStreamsResponse,ListStreamsPagedResponse>

lookupStreamObjectSettings()

public UnaryCallSettings<LookupStreamObjectRequest,StreamObject> lookupStreamObjectSettings()

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

Returns
Type Description
UnaryCallSettings<LookupStreamObjectRequest,StreamObject>

startBackfillJobSettings()

public UnaryCallSettings<StartBackfillJobRequest,StartBackfillJobResponse> startBackfillJobSettings()

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

Returns
Type Description
UnaryCallSettings<StartBackfillJobRequest,StartBackfillJobResponse>

stopBackfillJobSettings()

public UnaryCallSettings<StopBackfillJobRequest,StopBackfillJobResponse> stopBackfillJobSettings()

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

Returns
Type Description
UnaryCallSettings<StopBackfillJobRequest,StopBackfillJobResponse>

toBuilder()

public DatastreamSettings.Builder toBuilder()

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

Returns
Type Description
DatastreamSettings.Builder
Overrides

updateConnectionProfileOperationSettings()

public OperationCallSettings<UpdateConnectionProfileRequest,ConnectionProfile,OperationMetadata> updateConnectionProfileOperationSettings()

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

Returns
Type Description
OperationCallSettings<UpdateConnectionProfileRequest,ConnectionProfile,OperationMetadata>

updateConnectionProfileSettings()

public UnaryCallSettings<UpdateConnectionProfileRequest,Operation> updateConnectionProfileSettings()

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

Returns
Type Description
UnaryCallSettings<UpdateConnectionProfileRequest,Operation>

updateStreamOperationSettings()

public OperationCallSettings<UpdateStreamRequest,Stream,OperationMetadata> updateStreamOperationSettings()

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

Returns
Type Description
OperationCallSettings<UpdateStreamRequest,Stream,OperationMetadata>

updateStreamSettings()

public UnaryCallSettings<UpdateStreamRequest,Operation> updateStreamSettings()

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

Returns
Type Description
UnaryCallSettings<UpdateStreamRequest,Operation>