Package com.google.cloud.spanner.spi.v1
Class GapicSpannerRpc
java.lang.Object
com.google.cloud.spanner.spi.v1.GapicSpannerRpc
- All Implemented Interfaces:
ServiceRpc,SpannerRpc
Implementation of Cloud Spanner remote calls using Gapic libraries.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.cloud.spanner.spi.v1.SpannerRpc
SpannerRpc.Option, SpannerRpc.Paginated<T>, SpannerRpc.ResultStreamConsumer, SpannerRpc.StreamingCall -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApiFuture<com.google.protobuf.Empty>asyncDeleteSession(String sessionName, Map<SpannerRpc.Option, ?> options) batchCreateSessions(String databaseName, int sessionCount, String databaseRole, Map<String, String> labels, Map<SpannerRpc.Option, ?> options) batchWriteAtLeastOnce(BatchWriteRequest request, Map<SpannerRpc.Option, ?> options) beginTransaction(BeginTransactionRequest request, Map<SpannerRpc.Option, ?> options, boolean routeToLeader) Begins a transaction.beginTransactionAsync(BeginTransactionRequest request, Map<SpannerRpc.Option, ?> options, boolean routeToLeader) Begins a transaction asynchronously.voidcancelOperation(String name) Cancels the specified long-running operation.voidclearTransactionAffinity(com.google.protobuf.ByteString transactionId) Clears any client-side affinity associated with the given transaction id.voidclearTransactionAndChannelAffinity(com.google.protobuf.ByteString transactionId, Long channelHint) Clears any client-side transaction affinity and transport-level channel affinity associated with the given transaction.commit(CommitRequest commitRequest, Map<SpannerRpc.Option, ?> options) commitAsync(CommitRequest request, Map<SpannerRpc.Option, ?> options) copyBackup(BackupId sourceBackupId, Backup destinationBackup) Creates a copy backup from the source backup specified.static GapicSpannerRpccreate(SpannerOptions options) createBackup(Backup backupInfo) Creates a new backup from the source database specified in theBackupinstance.createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements, Database databaseInfo) createInstance(String parent, String instanceId, Instance instance) createInstanceConfig(String parent, String instanceConfigId, InstanceConfig instanceConfig, Boolean validateOnly) createSession(String databaseName, String databaseRole, Map<String, String> labels, Map<SpannerRpc.Option, ?> options) createSession(String databaseName, String databaseRole, Map<String, String> labels, Map<SpannerRpc.Option, ?> options, boolean isMultiplexed) voiddeleteBackup(String backupName) Deletes a pending or completed backup.voiddeleteInstance(String instanceName) voiddeleteInstanceConfig(String instanceConfigName, String etag, Boolean validateOnly) voiddeleteSession(String sessionName, Map<SpannerRpc.Option, ?> options) voiddropDatabase(String databaseName) executeBatchDml(ExecuteBatchDmlRequest request, Map<SpannerRpc.Option, ?> options) executeBatchDmlAsync(ExecuteBatchDmlRequest request, Map<SpannerRpc.Option, ?> options) executePartitionedDml(ExecuteSqlRequest request, Map<SpannerRpc.Option, ?> options) executeQuery(ExecuteSqlRequest request, SpannerRpc.ResultStreamConsumer consumer, Map<SpannerRpc.Option, ?> options, XGoogSpannerRequestId requestId, boolean routeToLeader) Executes a query with streaming result.executeQuery(ExecuteSqlRequest request, Map<SpannerRpc.Option, ?> options, boolean routeToLeader) Executes a query.executeQueryAsync(ExecuteSqlRequest request, Map<SpannerRpc.Option, ?> options, boolean routeToLeader) Executes a query asynchronously.executeStreamingPartitionedDml(ExecuteSqlRequest request, Map<SpannerRpc.Option, ?> options, XGoogSpannerRequestId requestId, Duration timeout) Gets the backup with the specified name.getDatabase(String databaseName) getDatabaseAdminIAMPolicy(String resource, GetPolicyOptions options) Gets the IAM policy for the given resource using theDatabaseAdminStub.Getter method to obtain the auto-generated database admin client stub settings.getDatabaseDdl(String databaseName) Returns the retryable codes for streaming query operations.Returns the retry settings for streaming query operations.getInstance(String instanceName) getInstanceAdminIAMPolicy(String resource) Gets the IAM policy for the given resource using theInstanceAdminStub.Getter method to obtain the auto-generated instance admin client stub settings.getInstanceConfig(String instanceConfigName) intgetOperation(String name) Retrieves a long running operation.Returns the retryable codes for streaming read operations.Returns the retry settings for streaming read operations.booleanisClosed()static booleanstatic booleanstatic booleanlistBackupOperations(String instanceName, int pageSize, String filter, String pageToken) List all long-running backup operations on the given instance.listBackups(String instanceName, int pageSize, String filter, String pageToken) Lists the backups in the specified instance.listDatabaseOperations(String instanceName, int pageSize, String filter, String pageToken) listDatabaseRoles(String databaseName, int pageSize, String pageToken) listDatabases(String instanceName, int pageSize, String pageToken) listInstanceConfigOperations(int pageSize, String filter, String pageToken) List all long-running instance config operations on the given project.listInstanceConfigs(int pageSize, String pageToken) listInstances(int pageSize, String pageToken, String filter) partitionQuery(PartitionQueryRequest request, Map<SpannerRpc.Option, ?> options) partitionRead(PartitionReadRequest request, Map<SpannerRpc.Option, ?> options) read(ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, Map<SpannerRpc.Option, ?> options, XGoogSpannerRequestId requestId, boolean routeToLeader) Performs a streaming read.restoreDatabase(Restore restore) Restore a backup into the given database.voidrollback(RollbackRequest request, Map<SpannerRpc.Option, ?> options) ApiFuture<com.google.protobuf.Empty>rollbackAsync(RollbackRequest request, Map<SpannerRpc.Option, ?> options) setDatabaseAdminIAMPolicy(String resource, Policy policy) Updates the IAM policy for the given resource using theDatabaseAdminStub.setInstanceAdminIAMPolicy(String resource, Policy policy) Updates the IAM policy for the given resource using theInstanceAdminStub.voidshutdown()voidtestDatabaseAdminIAMPermissions(String resource, Iterable<String> permissions) Tests the IAM permissions for the given resource using theDatabaseAdminStub.testInstanceAdminIAMPermissions(String resource, Iterable<String> permissions) Tests the IAM permissions for the given resource using theInstanceAdminStub.updateBackup(Backup backup, com.google.protobuf.FieldMask updateMask) Updates the specified backup.updateDatabase(Database database, com.google.protobuf.FieldMask updateMask) Updates the specified fields of a Cloud Spanner database.OperationFuture<com.google.protobuf.Empty,UpdateDatabaseDdlMetadata> updateDatabaseDdl(Database databaseInfo, Iterable<String> updateDatabaseStatements, String updateId) If the update database ddl operation returns an ALREADY_EXISTS error, meaning the operation id used is already in flight, this method will simply resume the original operation.updateInstance(Instance instance, com.google.protobuf.FieldMask fieldMask) updateInstanceConfig(InstanceConfig instanceConfig, Boolean validateOnly, com.google.protobuf.FieldMask fieldMask)
-
Field Details
-
EXPERIMENTAL_LOCATION_API_ENV_VAR
- See Also:
-
DEFAULT_USER_AGENT
-
DIRECTPATH_CHANNEL_CREATED
public static boolean DIRECTPATH_CHANNEL_CREATED
-
-
Constructor Details
-
GapicSpannerRpc
-
-
Method Details
-
create
-
clearTransactionAffinity
public void clearTransactionAffinity(com.google.protobuf.ByteString transactionId) Description copied from interface:SpannerRpcClears any client-side affinity associated with the given transaction id.- Specified by:
clearTransactionAffinityin interfaceSpannerRpc
-
clearTransactionAndChannelAffinity
public void clearTransactionAndChannelAffinity(com.google.protobuf.ByteString transactionId, @Nullable Long channelHint) Description copied from interface:SpannerRpcClears any client-side transaction affinity and transport-level channel affinity associated with the given transaction.- Specified by:
clearTransactionAndChannelAffinityin interfaceSpannerRpc
-
isEnableAFEServerTiming
public static boolean isEnableAFEServerTiming() -
isEnableDirectPathXdsEnv
public static boolean isEnableDirectPathXdsEnv() -
isEnableDirectPathBoundToken
public static boolean isEnableDirectPathBoundToken() -
listInstanceConfigs
public SpannerRpc.Paginated<InstanceConfig> listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException - Specified by:
listInstanceConfigsin interfaceSpannerRpc- Throws:
SpannerException
-
createInstanceConfig
public OperationFuture<InstanceConfig,CreateInstanceConfigMetadata> createInstanceConfig(String parent, String instanceConfigId, InstanceConfig instanceConfig, @Nullable Boolean validateOnly) throws SpannerException - Specified by:
createInstanceConfigin interfaceSpannerRpc- Throws:
SpannerException
-
updateInstanceConfig
public OperationFuture<InstanceConfig,UpdateInstanceConfigMetadata> updateInstanceConfig(InstanceConfig instanceConfig, @Nullable Boolean validateOnly, com.google.protobuf.FieldMask fieldMask) throws SpannerException - Specified by:
updateInstanceConfigin interfaceSpannerRpc- Throws:
SpannerException
-
getInstanceConfig
- Specified by:
getInstanceConfigin interfaceSpannerRpc- Throws:
SpannerException
-
deleteInstanceConfig
public void deleteInstanceConfig(String instanceConfigName, @Nullable String etag, @Nullable Boolean validateOnly) throws SpannerException - Specified by:
deleteInstanceConfigin interfaceSpannerRpc- Throws:
SpannerException
-
listInstanceConfigOperations
public SpannerRpc.Paginated<Operation> listInstanceConfigOperations(int pageSize, @Nullable String filter, @Nullable String pageToken) Description copied from interface:SpannerRpcList all long-running instance config operations on the given project.- Specified by:
listInstanceConfigOperationsin interfaceSpannerRpc
-
listInstances
public SpannerRpc.Paginated<Instance> listInstances(int pageSize, @Nullable String pageToken, @Nullable String filter) throws SpannerException - Specified by:
listInstancesin interfaceSpannerRpc- Throws:
SpannerException
-
createInstance
public OperationFuture<Instance,CreateInstanceMetadata> createInstance(String parent, String instanceId, Instance instance) throws SpannerException - Specified by:
createInstancein interfaceSpannerRpc- Throws:
SpannerException
-
updateInstance
public OperationFuture<Instance,UpdateInstanceMetadata> updateInstance(Instance instance, com.google.protobuf.FieldMask fieldMask) throws SpannerException - Specified by:
updateInstancein interfaceSpannerRpc- Throws:
SpannerException
-
getInstance
- Specified by:
getInstancein interfaceSpannerRpc- Throws:
SpannerException
-
deleteInstance
- Specified by:
deleteInstancein interfaceSpannerRpc- Throws:
SpannerException
-
listBackupOperations
public SpannerRpc.Paginated<Operation> listBackupOperations(String instanceName, int pageSize, @Nullable String filter, @Nullable String pageToken) Description copied from interface:SpannerRpcList all long-running backup operations on the given instance.- Specified by:
listBackupOperationsin interfaceSpannerRpc
-
listDatabaseOperations
public SpannerRpc.Paginated<Operation> listDatabaseOperations(String instanceName, int pageSize, @Nullable String filter, @Nullable String pageToken) - Specified by:
listDatabaseOperationsin interfaceSpannerRpc
-
listDatabaseRoles
public SpannerRpc.Paginated<DatabaseRole> listDatabaseRoles(String databaseName, int pageSize, @Nullable String pageToken) - Specified by:
listDatabaseRolesin interfaceSpannerRpc
-
listBackups
public SpannerRpc.Paginated<Backup> listBackups(String instanceName, int pageSize, @Nullable String filter, @Nullable String pageToken) throws SpannerException Description copied from interface:SpannerRpcLists the backups in the specified instance.- Specified by:
listBackupsin interfaceSpannerRpc- Throws:
SpannerException
-
listDatabases
public SpannerRpc.Paginated<Database> listDatabases(String instanceName, int pageSize, @Nullable String pageToken) throws SpannerException - Specified by:
listDatabasesin interfaceSpannerRpc- Throws:
SpannerException
-
createDatabase
public OperationFuture<Database,CreateDatabaseMetadata> createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements, Database databaseInfo) throws SpannerException - Specified by:
createDatabasein interfaceSpannerRpc- Throws:
SpannerException
-
updateDatabaseDdl
public OperationFuture<com.google.protobuf.Empty,UpdateDatabaseDdlMetadata> updateDatabaseDdl(Database databaseInfo, Iterable<String> updateDatabaseStatements, @Nullable String updateId) throws SpannerException If the update database ddl operation returns an ALREADY_EXISTS error, meaning the operation id used is already in flight, this method will simply resume the original operation. The returned future will be completed when the original operation finishes.This mechanism is necessary, because the update database ddl can be retried. If a retryable failure occurs, the backend has already started processing the update database ddl operation with the given id and the library issues a retry, an ALREADY_EXISTS error will be returned. If we were to bubble this error up, it would be confusing for the caller, who used originally called the method with a new operation id.
- Specified by:
updateDatabaseDdlin interfaceSpannerRpc- Throws:
SpannerException
-
dropDatabase
- Specified by:
dropDatabasein interfaceSpannerRpc- Throws:
SpannerException
-
getDatabase
- Specified by:
getDatabasein interfaceSpannerRpc- Throws:
SpannerException
-
updateDatabase
public OperationFuture<Database,UpdateDatabaseMetadata> updateDatabase(Database database, com.google.protobuf.FieldMask updateMask) throws SpannerException Description copied from interface:SpannerRpcUpdates the specified fields of a Cloud Spanner database.- Specified by:
updateDatabasein interfaceSpannerRpc- Parameters:
database- The database proto whose field values will be used as the new values in the stored database.updateMask- The fields to update. Currently, only the "enable_drop_protection" field of the database supports updates.- Returns:
- an `OperationFuture` that can be used to track the status of the update.
- Throws:
SpannerException
-
getDatabaseDdl
- Specified by:
getDatabaseDdlin interfaceSpannerRpc- Throws:
SpannerException
-
createBackup
public OperationFuture<Backup,CreateBackupMetadata> createBackup(Backup backupInfo) throws SpannerException Description copied from interface:SpannerRpcCreates a new backup from the source database specified in theBackupinstance.- Specified by:
createBackupin interfaceSpannerRpc- Parameters:
backupInfo- the backup to create. The instance, database and expireTime fields of the backup must be filled.- Returns:
- the operation that monitors the backup creation.
- Throws:
SpannerException
-
copyBackup
public OperationFuture<Backup,CopyBackupMetadata> copyBackup(BackupId sourceBackupId, Backup destinationBackup) throws SpannerException Description copied from interface:SpannerRpcCreates a copy backup from the source backup specified.- Specified by:
copyBackupin interfaceSpannerRpcdestinationBackup- the backup to create. The instance, database, and expireTime fields of the backup must be filled. It may also optionally have an encryption config set. If no encryption config has been set, the new backup will use the same encryption config as the source backup.- Returns:
- the operation that monitors the backup creation.
- Throws:
SpannerException
-
restoreDatabase
Description copied from interface:SpannerRpcRestore a backup into the given database.- Specified by:
restoreDatabasein interfaceSpannerRpc- Parameters:
restore- aRestoreinstance with the backup source and destination database
-
updateBackup
Description copied from interface:SpannerRpcUpdates the specified backup. The only supported field for updates is expireTime.- Specified by:
updateBackupin interfaceSpannerRpc
-
deleteBackup
Description copied from interface:SpannerRpcDeletes a pending or completed backup.- Specified by:
deleteBackupin interfaceSpannerRpc- Parameters:
backupName- Required. The fully qualified name of the backup to delete.
-
getBackup
Description copied from interface:SpannerRpcGets the backup with the specified name.- Specified by:
getBackupin interfaceSpannerRpc- Throws:
SpannerException
-
getOperation
Description copied from interface:SpannerRpcRetrieves a long running operation.- Specified by:
getOperationin interfaceSpannerRpc- Throws:
SpannerException
-
cancelOperation
Description copied from interface:SpannerRpcCancels the specified long-running operation.- Specified by:
cancelOperationin interfaceSpannerRpc- Throws:
SpannerException
-
batchCreateSessions
public List<Session> batchCreateSessions(String databaseName, int sessionCount, @Nullable String databaseRole, @Nullable Map<String, String> labels, @Nullable Map<SpannerRpc.Option, throws SpannerException?> options) - Specified by:
batchCreateSessionsin interfaceSpannerRpc- Throws:
SpannerException
-
createSession
public Session createSession(String databaseName, @Nullable String databaseRole, @Nullable Map<String, String> labels, @Nullable Map<SpannerRpc.Option, throws SpannerException?> options) - Specified by:
createSessionin interfaceSpannerRpc- Throws:
SpannerException
-
createSession
public Session createSession(String databaseName, @Nullable String databaseRole, @Nullable Map<String, String> labels, @Nullable Map<SpannerRpc.Option, throws SpannerException?> options, boolean isMultiplexed) - Specified by:
createSessionin interfaceSpannerRpc- Throws:
SpannerException
-
deleteSession
public void deleteSession(String sessionName, @Nullable Map<SpannerRpc.Option, ?> options) throws SpannerException- Specified by:
deleteSessionin interfaceSpannerRpc- Throws:
SpannerException
-
asyncDeleteSession
public ApiFuture<com.google.protobuf.Empty> asyncDeleteSession(String sessionName, @Nullable Map<SpannerRpc.Option, ?> options) - Specified by:
asyncDeleteSessionin interfaceSpannerRpc
-
getReadRetrySettings
Description copied from interface:SpannerRpcReturns the retry settings for streaming read operations.- Specified by:
getReadRetrySettingsin interfaceSpannerRpc
-
getReadRetryableCodes
Description copied from interface:SpannerRpcReturns the retryable codes for streaming read operations.- Specified by:
getReadRetryableCodesin interfaceSpannerRpc
-
read
public SpannerRpc.StreamingCall read(ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option, ?> options, XGoogSpannerRequestId requestId, boolean routeToLeader) Description copied from interface:SpannerRpcPerforms a streaming read.- Specified by:
readin interfaceSpannerRpcrouteToLeader- Set to true to route the request to the leader region, and false to route the request to any region. When leader aware routing is enabled, RW/PDML requests are preferred to be routed to the leader region, and RO requests (except for PartitionRead/PartitionQuery) are preferred to be routed to any region for optimal latency.
-
getExecuteQueryRetrySettings
Description copied from interface:SpannerRpcReturns the retry settings for streaming query operations.- Specified by:
getExecuteQueryRetrySettingsin interfaceSpannerRpc
-
getExecuteQueryRetryableCodes
Description copied from interface:SpannerRpcReturns the retryable codes for streaming query operations.- Specified by:
getExecuteQueryRetryableCodesin interfaceSpannerRpc
-
executeQuery
public ResultSet executeQuery(ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option, ?> options, boolean routeToLeader) Description copied from interface:SpannerRpcExecutes a query.- Specified by:
executeQueryin interfaceSpannerRpcrouteToLeader- Set to true to route the request to the leader region, and false to route the request to any region. When leader aware routing is enabled, RW/PDML requests are preferred to be routed to the leader region, and RO requests (except for PartitionRead/PartitionQuery) are preferred to be routed to any region for optimal latency.
-
executeQueryAsync
public ApiFuture<ResultSet> executeQueryAsync(ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option, ?> options, boolean routeToLeader) Description copied from interface:SpannerRpcExecutes a query asynchronously.- Specified by:
executeQueryAsyncin interfaceSpannerRpcrouteToLeader- Set to true to route the request to the leader region, and false to route the request to any region. When leader aware routing is enabled, RW/PDML requests are preferred to be routed to the leader region, and RO requests (except for PartitionRead/PartitionQuery) are preferred to be routed to any region for optimal latency.
-
executePartitionedDml
public ResultSet executePartitionedDml(ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option, ?> options) - Specified by:
executePartitionedDmlin interfaceSpannerRpc
-
getPartitionedDmlRetrySettings
- Specified by:
getPartitionedDmlRetrySettingsin interfaceSpannerRpc
-
executeStreamingPartitionedDml
public ServerStream<PartialResultSet> executeStreamingPartitionedDml(ExecuteSqlRequest request, Map<SpannerRpc.Option, ?> options, XGoogSpannerRequestId requestId, Duration timeout) - Specified by:
executeStreamingPartitionedDmlin interfaceSpannerRpc
-
batchWriteAtLeastOnce
public ServerStream<BatchWriteResponse> batchWriteAtLeastOnce(BatchWriteRequest request, @Nullable Map<SpannerRpc.Option, ?> options) - Specified by:
batchWriteAtLeastOncein interfaceSpannerRpc
-
executeQuery
public SpannerRpc.StreamingCall executeQuery(ExecuteSqlRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option, ?> options, XGoogSpannerRequestId requestId, boolean routeToLeader) Description copied from interface:SpannerRpcExecutes a query with streaming result.- Specified by:
executeQueryin interfaceSpannerRpcrouteToLeader- Set to true to route the request to the leader region, and false to route the request to any region. When leader aware routing is enabled, RW/PDML requests are preferred to be routed to the leader region, and RO requests (except for PartitionRead/PartitionQuery) are preferred to be routed to any region for optimal latency.
-
executeBatchDml
public ExecuteBatchDmlResponse executeBatchDml(ExecuteBatchDmlRequest request, @Nullable Map<SpannerRpc.Option, ?> options) - Specified by:
executeBatchDmlin interfaceSpannerRpc
-
executeBatchDmlAsync
public ApiFuture<ExecuteBatchDmlResponse> executeBatchDmlAsync(ExecuteBatchDmlRequest request, @Nullable Map<SpannerRpc.Option, ?> options) - Specified by:
executeBatchDmlAsyncin interfaceSpannerRpc
-
beginTransactionAsync
public ApiFuture<Transaction> beginTransactionAsync(BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option, ?> options, boolean routeToLeader) Description copied from interface:SpannerRpcBegins a transaction asynchronously.- Specified by:
beginTransactionAsyncin interfaceSpannerRpcrouteToLeader- Set to true to route the request to the leader region, and false to route the request to any region. When leader aware routing is enabled, RW/PDML requests are preferred to be routed to the leader region, and RO requests (except for PartitionRead/PartitionQuery) are preferred to be routed to any region for optimal latency.
-
beginTransaction
public Transaction beginTransaction(BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option, ?> options, boolean routeToLeader) throws SpannerExceptionDescription copied from interface:SpannerRpcBegins a transaction.- Specified by:
beginTransactionin interfaceSpannerRpcrouteToLeader- Set to true to route the request to the leader region, and false to route the request to any region. When leader aware routing is enabled, RW/PDML requests are preferred to be routed to the leader region, and RO requests (except for PartitionRead/PartitionQuery) are preferred to be routed to any region for optimal latency.- Throws:
SpannerException
-
commitAsync
public ApiFuture<CommitResponse> commitAsync(CommitRequest request, @Nullable Map<SpannerRpc.Option, ?> options) - Specified by:
commitAsyncin interfaceSpannerRpc
-
commit
public CommitResponse commit(CommitRequest commitRequest, @Nullable Map<SpannerRpc.Option, ?> options) throws SpannerException- Specified by:
commitin interfaceSpannerRpc- Throws:
SpannerException
-
getCommitRetrySettings
- Specified by:
getCommitRetrySettingsin interfaceSpannerRpc
-
rollbackAsync
public ApiFuture<com.google.protobuf.Empty> rollbackAsync(RollbackRequest request, @Nullable Map<SpannerRpc.Option, ?> options) - Specified by:
rollbackAsyncin interfaceSpannerRpc
-
rollback
public void rollback(RollbackRequest request, @Nullable Map<SpannerRpc.Option, ?> options) throws SpannerException- Specified by:
rollbackin interfaceSpannerRpc- Throws:
SpannerException
-
partitionQuery
public PartitionResponse partitionQuery(PartitionQueryRequest request, @Nullable Map<SpannerRpc.Option, ?> options) throws SpannerException- Specified by:
partitionQueryin interfaceSpannerRpc- Throws:
SpannerException
-
partitionRead
public PartitionResponse partitionRead(PartitionReadRequest request, @Nullable Map<SpannerRpc.Option, ?> options) throws SpannerException- Specified by:
partitionReadin interfaceSpannerRpc- Throws:
SpannerException
-
getDatabaseAdminIAMPolicy
Description copied from interface:SpannerRpcGets the IAM policy for the given resource using theDatabaseAdminStub.- Specified by:
getDatabaseAdminIAMPolicyin interfaceSpannerRpc
-
setDatabaseAdminIAMPolicy
Description copied from interface:SpannerRpcUpdates the IAM policy for the given resource using theDatabaseAdminStub. It is highly recommended to first get the current policy and base the updated policy on the returned policy. SeePolicy.Builder.setEtag(com.google.protobuf.ByteString)for information on the recommended read-modify-write cycle.- Specified by:
setDatabaseAdminIAMPolicyin interfaceSpannerRpc
-
testDatabaseAdminIAMPermissions
public TestIamPermissionsResponse testDatabaseAdminIAMPermissions(String resource, Iterable<String> permissions) Description copied from interface:SpannerRpcTests the IAM permissions for the given resource using theDatabaseAdminStub.- Specified by:
testDatabaseAdminIAMPermissionsin interfaceSpannerRpc
-
getInstanceAdminIAMPolicy
Description copied from interface:SpannerRpcGets the IAM policy for the given resource using theInstanceAdminStub.- Specified by:
getInstanceAdminIAMPolicyin interfaceSpannerRpc
-
setInstanceAdminIAMPolicy
Description copied from interface:SpannerRpcUpdates the IAM policy for the given resource using theInstanceAdminStub. It is highly recommended to first get the current policy and base the updated policy on the returned policy. SeePolicy.Builder.setEtag(com.google.protobuf.ByteString)for information on the recommended read-modify-write cycle.- Specified by:
setInstanceAdminIAMPolicyin interfaceSpannerRpc
-
testInstanceAdminIAMPermissions
public TestIamPermissionsResponse testInstanceAdminIAMPermissions(String resource, Iterable<String> permissions) Description copied from interface:SpannerRpcTests the IAM permissions for the given resource using theInstanceAdminStub.- Specified by:
testInstanceAdminIAMPermissionsin interfaceSpannerRpc
-
getRequestIdCreator
- Specified by:
getRequestIdCreatorin interfaceSpannerRpc
-
getNumActiveResponseObservers
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceSpannerRpc
-
shutdownNow
public void shutdownNow() -
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceSpannerRpc
-
getDatabaseAdminStubSettings
Description copied from interface:SpannerRpcGetter method to obtain the auto-generated database admin client stub settings.- Specified by:
getDatabaseAdminStubSettingsin interfaceSpannerRpc- Returns:
- DatabaseAdminStubSettings
-
getInstanceAdminStubSettings
Description copied from interface:SpannerRpcGetter method to obtain the auto-generated instance admin client stub settings.- Specified by:
getInstanceAdminStubSettingsin interfaceSpannerRpc- Returns:
- InstanceAdminStubSettings
-