@Generated(value="by gapic-generator") public class SpannerSettings extends ClientSettings<SpannerSettings>
SpannerClient
.
The default instance has everything set to sensible defaults:
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 total timeout of createSession to 30 seconds:
SpannerSettings.Builder spannerSettingsBuilder =
SpannerSettings.newBuilder();
spannerSettingsBuilder.createSessionSettings().getRetrySettings().toBuilder()
.setTotalTimeout(Duration.ofSeconds(30));
SpannerSettings spannerSettings = spannerSettingsBuilder.build();
Modifier and Type | Class and Description |
---|---|
static class |
SpannerSettings.Builder
Builder for SpannerSettings.
|
Modifier | Constructor and Description |
---|---|
protected |
SpannerSettings(SpannerSettings.Builder settingsBuilder) |
Modifier and Type | Method and Description |
---|---|
UnaryCallSettings<com.google.spanner.v1.BeginTransactionRequest,com.google.spanner.v1.Transaction> |
beginTransactionSettings()
Returns the object with the settings used for calls to beginTransaction.
|
UnaryCallSettings<com.google.spanner.v1.CommitRequest,com.google.spanner.v1.CommitResponse> |
commitSettings()
Returns the object with the settings used for calls to commit.
|
static SpannerSettings |
create(SpannerStubSettings stub) |
UnaryCallSettings<com.google.spanner.v1.CreateSessionRequest,com.google.spanner.v1.Session> |
createSessionSettings()
Returns the object with the settings used for calls to createSession.
|
static ApiClientHeaderProvider.Builder |
defaultApiClientHeaderProviderBuilder() |
static GoogleCredentialsProvider.Builder |
defaultCredentialsProviderBuilder()
Returns a builder for the default credentials for this service.
|
static InstantiatingExecutorProvider.Builder |
defaultExecutorProviderBuilder()
Returns a builder for the default ExecutorProvider for this service.
|
static InstantiatingGrpcChannelProvider.Builder |
defaultGrpcTransportProviderBuilder()
Returns a builder for the default ChannelProvider for this service.
|
static TransportChannelProvider |
defaultTransportChannelProvider() |
UnaryCallSettings<com.google.spanner.v1.DeleteSessionRequest,Empty> |
deleteSessionSettings()
Returns the object with the settings used for calls to deleteSession.
|
UnaryCallSettings<com.google.spanner.v1.ExecuteBatchDmlRequest,com.google.spanner.v1.ExecuteBatchDmlResponse> |
executeBatchDmlSettings()
Returns the object with the settings used for calls to executeBatchDml.
|
UnaryCallSettings<com.google.spanner.v1.ExecuteSqlRequest,com.google.spanner.v1.ResultSet> |
executeSqlSettings()
Returns the object with the settings used for calls to executeSql.
|
ServerStreamingCallSettings<com.google.spanner.v1.ExecuteSqlRequest,com.google.spanner.v1.PartialResultSet> |
executeStreamingSqlSettings()
Returns the object with the settings used for calls to executeStreamingSql.
|
static String |
getDefaultEndpoint()
Returns the default service endpoint.
|
static List<String> |
getDefaultServiceScopes()
Returns the default service scopes.
|
UnaryCallSettings<com.google.spanner.v1.GetSessionRequest,com.google.spanner.v1.Session> |
getSessionSettings()
Returns the object with the settings used for calls to getSession.
|
PagedCallSettings<com.google.spanner.v1.ListSessionsRequest,com.google.spanner.v1.ListSessionsResponse,SpannerClient.ListSessionsPagedResponse> |
listSessionsSettings()
Returns the object with the settings used for calls to listSessions.
|
static SpannerSettings.Builder |
newBuilder()
Returns a new builder for this class.
|
static SpannerSettings.Builder |
newBuilder(ClientContext clientContext)
Returns a new builder for this class.
|
UnaryCallSettings<com.google.spanner.v1.PartitionQueryRequest,com.google.spanner.v1.PartitionResponse> |
partitionQuerySettings()
Returns the object with the settings used for calls to partitionQuery.
|
UnaryCallSettings<com.google.spanner.v1.PartitionReadRequest,com.google.spanner.v1.PartitionResponse> |
partitionReadSettings()
Returns the object with the settings used for calls to partitionRead.
|
UnaryCallSettings<com.google.spanner.v1.ReadRequest,com.google.spanner.v1.ResultSet> |
readSettings()
Returns the object with the settings used for calls to read.
|
UnaryCallSettings<com.google.spanner.v1.RollbackRequest,Empty> |
rollbackSettings()
Returns the object with the settings used for calls to rollback.
|
ServerStreamingCallSettings<com.google.spanner.v1.ReadRequest,com.google.spanner.v1.PartialResultSet> |
streamingReadSettings()
Returns the object with the settings used for calls to streamingRead.
|
SpannerSettings.Builder |
toBuilder()
Returns a builder containing all the values of this settings class.
|
getClock, getCredentialsProvider, getEndpoint, getExecutorProvider, getHeaderProvider, getInternalHeaderProvider, getStubSettings, getTransportChannelProvider, getWatchdogCheckInterval, getWatchdogProvider, toString
protected SpannerSettings(SpannerSettings.Builder settingsBuilder) throws IOException
IOException
public UnaryCallSettings<com.google.spanner.v1.CreateSessionRequest,com.google.spanner.v1.Session> createSessionSettings()
public UnaryCallSettings<com.google.spanner.v1.GetSessionRequest,com.google.spanner.v1.Session> getSessionSettings()
public PagedCallSettings<com.google.spanner.v1.ListSessionsRequest,com.google.spanner.v1.ListSessionsResponse,SpannerClient.ListSessionsPagedResponse> listSessionsSettings()
public UnaryCallSettings<com.google.spanner.v1.DeleteSessionRequest,Empty> deleteSessionSettings()
public UnaryCallSettings<com.google.spanner.v1.ExecuteSqlRequest,com.google.spanner.v1.ResultSet> executeSqlSettings()
public ServerStreamingCallSettings<com.google.spanner.v1.ExecuteSqlRequest,com.google.spanner.v1.PartialResultSet> executeStreamingSqlSettings()
public UnaryCallSettings<com.google.spanner.v1.ExecuteBatchDmlRequest,com.google.spanner.v1.ExecuteBatchDmlResponse> executeBatchDmlSettings()
public UnaryCallSettings<com.google.spanner.v1.ReadRequest,com.google.spanner.v1.ResultSet> readSettings()
public ServerStreamingCallSettings<com.google.spanner.v1.ReadRequest,com.google.spanner.v1.PartialResultSet> streamingReadSettings()
public UnaryCallSettings<com.google.spanner.v1.BeginTransactionRequest,com.google.spanner.v1.Transaction> beginTransactionSettings()
public UnaryCallSettings<com.google.spanner.v1.CommitRequest,com.google.spanner.v1.CommitResponse> commitSettings()
public UnaryCallSettings<com.google.spanner.v1.RollbackRequest,Empty> rollbackSettings()
public UnaryCallSettings<com.google.spanner.v1.PartitionQueryRequest,com.google.spanner.v1.PartitionResponse> partitionQuerySettings()
public UnaryCallSettings<com.google.spanner.v1.PartitionReadRequest,com.google.spanner.v1.PartitionResponse> partitionReadSettings()
public static final SpannerSettings create(SpannerStubSettings stub) throws IOException
IOException
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()
public static String getDefaultEndpoint()
public static List<String> getDefaultServiceScopes()
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()
public static TransportChannelProvider defaultTransportChannelProvider()
@BetaApi(value="The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
public static SpannerSettings.Builder newBuilder()
public static SpannerSettings.Builder newBuilder(ClientContext clientContext)
public SpannerSettings.Builder toBuilder()
toBuilder
in class ClientSettings<SpannerSettings>
Copyright © 2019 Google LLC. All rights reserved.