Package com.google.cloud.spanner.spi.v1
Class GapicSpannerRpc
- java.lang.Object
-
- com.google.cloud.spanner.spi.v1.GapicSpannerRpc
-
- All Implemented Interfaces:
com.google.cloud.ServiceRpc
,SpannerRpc
@InternalApi public class GapicSpannerRpc extends Object implements 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 Modifier and Type Field Description static String
DEFAULT_USER_AGENT
-
Constructor Summary
Constructors Constructor Description GapicSpannerRpc(SpannerOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.core.ApiFuture<com.google.protobuf.Empty>
asyncDeleteSession(String sessionName, Map<SpannerRpc.Option,?> options)
List<Session>
batchCreateSessions(String databaseName, int sessionCount, String databaseRole, Map<String,String> labels, Map<SpannerRpc.Option,?> options)
Transaction
beginTransaction(BeginTransactionRequest request, Map<SpannerRpc.Option,?> options)
com.google.api.core.ApiFuture<Transaction>
beginTransactionAsync(BeginTransactionRequest request, Map<SpannerRpc.Option,?> options)
void
cancelOperation(String name)
Cancels the specified long-running operation.CommitResponse
commit(CommitRequest commitRequest, Map<SpannerRpc.Option,?> options)
com.google.api.core.ApiFuture<CommitResponse>
commitAsync(CommitRequest request, Map<SpannerRpc.Option,?> options)
com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata>
copyBackup(BackupId sourceBackupId, Backup destinationBackup)
Creates a copy backup from the source backup specified.static GapicSpannerRpc
create(SpannerOptions options)
com.google.api.gax.longrunning.OperationFuture<Backup,CreateBackupMetadata>
createBackup(Backup backupInfo)
Creates a new backup from the source database specified in theBackup
instance.com.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata>
createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements, Database databaseInfo)
com.google.api.gax.longrunning.OperationFuture<Instance,CreateInstanceMetadata>
createInstance(String parent, String instanceId, Instance instance)
com.google.api.gax.longrunning.OperationFuture<InstanceConfig,CreateInstanceConfigMetadata>
createInstanceConfig(String parent, String instanceConfigId, InstanceConfig instanceConfig, Boolean validateOnly)
Session
createSession(String databaseName, String databaseRole, Map<String,String> labels, Map<SpannerRpc.Option,?> options)
void
deleteBackup(String backupName)
Deletes a pending or completed backup.void
deleteInstance(String instanceName)
void
deleteInstanceConfig(String instanceConfigName, String etag, Boolean validateOnly)
void
deleteSession(String sessionName, Map<SpannerRpc.Option,?> options)
void
dropDatabase(String databaseName)
ExecuteBatchDmlResponse
executeBatchDml(ExecuteBatchDmlRequest request, Map<SpannerRpc.Option,?> options)
com.google.api.core.ApiFuture<ExecuteBatchDmlResponse>
executeBatchDmlAsync(ExecuteBatchDmlRequest request, Map<SpannerRpc.Option,?> options)
ResultSet
executePartitionedDml(ExecuteSqlRequest request, Map<SpannerRpc.Option,?> options)
SpannerRpc.StreamingCall
executeQuery(ExecuteSqlRequest request, SpannerRpc.ResultStreamConsumer consumer, Map<SpannerRpc.Option,?> options)
ResultSet
executeQuery(ExecuteSqlRequest request, Map<SpannerRpc.Option,?> options)
com.google.api.core.ApiFuture<ResultSet>
executeQueryAsync(ExecuteSqlRequest request, Map<SpannerRpc.Option,?> options)
com.google.api.gax.rpc.ServerStream<PartialResultSet>
executeStreamingPartitionedDml(ExecuteSqlRequest request, Map<SpannerRpc.Option,?> options, org.threeten.bp.Duration timeout)
Backup
getBackup(String backupName)
Gets the backup with the specified name.Database
getDatabase(String databaseName)
com.google.iam.v1.Policy
getDatabaseAdminIAMPolicy(String resource, com.google.iam.v1.GetPolicyOptions options)
Gets the IAM policy for the given resource using theDatabaseAdminStub
.List<String>
getDatabaseDdl(String databaseName)
Instance
getInstance(String instanceName)
com.google.iam.v1.Policy
getInstanceAdminIAMPolicy(String resource)
Gets the IAM policy for the given resource using theInstanceAdminStub
.InstanceConfig
getInstanceConfig(String instanceConfigName)
com.google.longrunning.Operation
getOperation(String name)
Retrieves a long running operation.com.google.api.gax.retrying.RetrySettings
getPartitionedDmlRetrySettings()
boolean
isClosed()
SpannerRpc.Paginated<com.google.longrunning.Operation>
listBackupOperations(String instanceName, int pageSize, String filter, String pageToken)
List all long-running backup operations on the given instance.SpannerRpc.Paginated<Backup>
listBackups(String instanceName, int pageSize, String filter, String pageToken)
Lists the backups in the specified instance.SpannerRpc.Paginated<com.google.longrunning.Operation>
listDatabaseOperations(String instanceName, int pageSize, String filter, String pageToken)
SpannerRpc.Paginated<DatabaseRole>
listDatabaseRoles(String databaseName, int pageSize, String pageToken)
SpannerRpc.Paginated<Database>
listDatabases(String instanceName, int pageSize, String pageToken)
SpannerRpc.Paginated<com.google.longrunning.Operation>
listInstanceConfigOperations(int pageSize, String filter, String pageToken)
List all long-running instance config operations on the given project.SpannerRpc.Paginated<InstanceConfig>
listInstanceConfigs(int pageSize, String pageToken)
SpannerRpc.Paginated<Instance>
listInstances(int pageSize, String pageToken, String filter)
PartitionResponse
partitionQuery(PartitionQueryRequest request, Map<SpannerRpc.Option,?> options)
PartitionResponse
partitionRead(PartitionReadRequest request, Map<SpannerRpc.Option,?> options)
SpannerRpc.StreamingCall
read(ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, Map<SpannerRpc.Option,?> options)
com.google.api.gax.longrunning.OperationFuture<Database,RestoreDatabaseMetadata>
restoreDatabase(Restore restore)
Restore a backup into the given database.void
rollback(RollbackRequest request, Map<SpannerRpc.Option,?> options)
com.google.api.core.ApiFuture<com.google.protobuf.Empty>
rollbackAsync(RollbackRequest request, Map<SpannerRpc.Option,?> options)
com.google.iam.v1.Policy
setDatabaseAdminIAMPolicy(String resource, com.google.iam.v1.Policy policy)
Updates the IAM policy for the given resource using theDatabaseAdminStub
.com.google.iam.v1.Policy
setInstanceAdminIAMPolicy(String resource, com.google.iam.v1.Policy policy)
Updates the IAM policy for the given resource using theInstanceAdminStub
.void
shutdown()
void
shutdownNow()
com.google.iam.v1.TestIamPermissionsResponse
testDatabaseAdminIAMPermissions(String resource, Iterable<String> permissions)
Tests the IAM permissions for the given resource using theDatabaseAdminStub
.com.google.iam.v1.TestIamPermissionsResponse
testInstanceAdminIAMPermissions(String resource, Iterable<String> permissions)
Tests the IAM permissions for the given resource using theInstanceAdminStub
.Backup
updateBackup(Backup backup, com.google.protobuf.FieldMask updateMask)
Updates the specified backup.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,UpdateDatabaseDdlMetadata>
updateDatabaseDdl(String databaseName, 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.com.google.api.gax.longrunning.OperationFuture<Instance,UpdateInstanceMetadata>
updateInstance(Instance instance, com.google.protobuf.FieldMask fieldMask)
com.google.api.gax.longrunning.OperationFuture<InstanceConfig,UpdateInstanceConfigMetadata>
updateInstanceConfig(InstanceConfig instanceConfig, Boolean validateOnly, com.google.protobuf.FieldMask fieldMask)
-
-
-
Field Detail
-
DEFAULT_USER_AGENT
public static final String DEFAULT_USER_AGENT
-
-
Constructor Detail
-
GapicSpannerRpc
public GapicSpannerRpc(SpannerOptions options)
-
-
Method Detail
-
create
public static GapicSpannerRpc create(SpannerOptions options)
-
listInstanceConfigs
public SpannerRpc.Paginated<InstanceConfig> listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException
- Specified by:
listInstanceConfigs
in interfaceSpannerRpc
- Throws:
SpannerException
-
createInstanceConfig
public com.google.api.gax.longrunning.OperationFuture<InstanceConfig,CreateInstanceConfigMetadata> createInstanceConfig(String parent, String instanceConfigId, InstanceConfig instanceConfig, @Nullable Boolean validateOnly) throws SpannerException
- Specified by:
createInstanceConfig
in interfaceSpannerRpc
- Throws:
SpannerException
-
updateInstanceConfig
public com.google.api.gax.longrunning.OperationFuture<InstanceConfig,UpdateInstanceConfigMetadata> updateInstanceConfig(InstanceConfig instanceConfig, @Nullable Boolean validateOnly, com.google.protobuf.FieldMask fieldMask) throws SpannerException
- Specified by:
updateInstanceConfig
in interfaceSpannerRpc
- Throws:
SpannerException
-
getInstanceConfig
public InstanceConfig getInstanceConfig(String instanceConfigName) throws SpannerException
- Specified by:
getInstanceConfig
in interfaceSpannerRpc
- Throws:
SpannerException
-
deleteInstanceConfig
public void deleteInstanceConfig(String instanceConfigName, @Nullable String etag, @Nullable Boolean validateOnly) throws SpannerException
- Specified by:
deleteInstanceConfig
in interfaceSpannerRpc
- Throws:
SpannerException
-
listInstanceConfigOperations
public SpannerRpc.Paginated<com.google.longrunning.Operation> listInstanceConfigOperations(int pageSize, @Nullable String filter, @Nullable String pageToken)
Description copied from interface:SpannerRpc
List all long-running instance config operations on the given project.- Specified by:
listInstanceConfigOperations
in interfaceSpannerRpc
-
listInstances
public SpannerRpc.Paginated<Instance> listInstances(int pageSize, @Nullable String pageToken, @Nullable String filter) throws SpannerException
- Specified by:
listInstances
in interfaceSpannerRpc
- Throws:
SpannerException
-
createInstance
public com.google.api.gax.longrunning.OperationFuture<Instance,CreateInstanceMetadata> createInstance(String parent, String instanceId, Instance instance) throws SpannerException
- Specified by:
createInstance
in interfaceSpannerRpc
- Throws:
SpannerException
-
updateInstance
public com.google.api.gax.longrunning.OperationFuture<Instance,UpdateInstanceMetadata> updateInstance(Instance instance, com.google.protobuf.FieldMask fieldMask) throws SpannerException
- Specified by:
updateInstance
in interfaceSpannerRpc
- Throws:
SpannerException
-
getInstance
public Instance getInstance(String instanceName) throws SpannerException
- Specified by:
getInstance
in interfaceSpannerRpc
- Throws:
SpannerException
-
deleteInstance
public void deleteInstance(String instanceName) throws SpannerException
- Specified by:
deleteInstance
in interfaceSpannerRpc
- Throws:
SpannerException
-
listBackupOperations
public SpannerRpc.Paginated<com.google.longrunning.Operation> listBackupOperations(String instanceName, int pageSize, @Nullable String filter, @Nullable String pageToken)
Description copied from interface:SpannerRpc
List all long-running backup operations on the given instance.- Specified by:
listBackupOperations
in interfaceSpannerRpc
-
listDatabaseOperations
public SpannerRpc.Paginated<com.google.longrunning.Operation> listDatabaseOperations(String instanceName, int pageSize, @Nullable String filter, @Nullable String pageToken)
- Specified by:
listDatabaseOperations
in interfaceSpannerRpc
-
listDatabaseRoles
public SpannerRpc.Paginated<DatabaseRole> listDatabaseRoles(String databaseName, int pageSize, @Nullable String pageToken)
- Specified by:
listDatabaseRoles
in interfaceSpannerRpc
-
listBackups
public SpannerRpc.Paginated<Backup> listBackups(String instanceName, int pageSize, @Nullable String filter, @Nullable String pageToken) throws SpannerException
Description copied from interface:SpannerRpc
Lists the backups in the specified instance.- Specified by:
listBackups
in interfaceSpannerRpc
- Throws:
SpannerException
-
listDatabases
public SpannerRpc.Paginated<Database> listDatabases(String instanceName, int pageSize, @Nullable String pageToken) throws SpannerException
- Specified by:
listDatabases
in interfaceSpannerRpc
- Throws:
SpannerException
-
createDatabase
public com.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata> createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements, Database databaseInfo) throws SpannerException
- Specified by:
createDatabase
in interfaceSpannerRpc
- Throws:
SpannerException
-
updateDatabaseDdl
public com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,UpdateDatabaseDdlMetadata> updateDatabaseDdl(String databaseName, 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:
updateDatabaseDdl
in interfaceSpannerRpc
- Throws:
SpannerException
-
dropDatabase
public void dropDatabase(String databaseName) throws SpannerException
- Specified by:
dropDatabase
in interfaceSpannerRpc
- Throws:
SpannerException
-
getDatabase
public Database getDatabase(String databaseName) throws SpannerException
- Specified by:
getDatabase
in interfaceSpannerRpc
- Throws:
SpannerException
-
getDatabaseDdl
public List<String> getDatabaseDdl(String databaseName) throws SpannerException
- Specified by:
getDatabaseDdl
in interfaceSpannerRpc
- Throws:
SpannerException
-
createBackup
public com.google.api.gax.longrunning.OperationFuture<Backup,CreateBackupMetadata> createBackup(Backup backupInfo) throws SpannerException
Description copied from interface:SpannerRpc
Creates a new backup from the source database specified in theBackup
instance.- Specified by:
createBackup
in 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 com.google.api.gax.longrunning.OperationFuture<Backup,CopyBackupMetadata> copyBackup(BackupId sourceBackupId, Backup destinationBackup) throws SpannerException
Description copied from interface:SpannerRpc
Creates a copy backup from the source backup specified.- Specified by:
copyBackup
in interfaceSpannerRpc
destinationBackup
- 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
public com.google.api.gax.longrunning.OperationFuture<Database,RestoreDatabaseMetadata> restoreDatabase(Restore restore)
Description copied from interface:SpannerRpc
Restore a backup into the given database.- Specified by:
restoreDatabase
in interfaceSpannerRpc
- Parameters:
restore
- aRestore
instance with the backup source and destination database
-
updateBackup
public Backup updateBackup(Backup backup, com.google.protobuf.FieldMask updateMask)
Description copied from interface:SpannerRpc
Updates the specified backup. The only supported field for updates is expireTime.- Specified by:
updateBackup
in interfaceSpannerRpc
-
deleteBackup
public void deleteBackup(String backupName)
Description copied from interface:SpannerRpc
Deletes a pending or completed backup.- Specified by:
deleteBackup
in interfaceSpannerRpc
- Parameters:
backupName
- Required. The fully qualified name of the backup to delete.
-
getBackup
public Backup getBackup(String backupName) throws SpannerException
Description copied from interface:SpannerRpc
Gets the backup with the specified name.- Specified by:
getBackup
in interfaceSpannerRpc
- Throws:
SpannerException
-
getOperation
public com.google.longrunning.Operation getOperation(String name) throws SpannerException
Description copied from interface:SpannerRpc
Retrieves a long running operation.- Specified by:
getOperation
in interfaceSpannerRpc
- Throws:
SpannerException
-
cancelOperation
public void cancelOperation(String name) throws SpannerException
Description copied from interface:SpannerRpc
Cancels the specified long-running operation.- Specified by:
cancelOperation
in interfaceSpannerRpc
- Throws:
SpannerException
-
batchCreateSessions
public List<Session> batchCreateSessions(String databaseName, int sessionCount, @Nullable String databaseRole, @Nullable Map<String,String> labels, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
- Specified by:
batchCreateSessions
in interfaceSpannerRpc
- Throws:
SpannerException
-
createSession
public Session createSession(String databaseName, @Nullable String databaseRole, @Nullable Map<String,String> labels, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
- Specified by:
createSession
in interfaceSpannerRpc
- Throws:
SpannerException
-
deleteSession
public void deleteSession(String sessionName, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
- Specified by:
deleteSession
in interfaceSpannerRpc
- Throws:
SpannerException
-
asyncDeleteSession
public com.google.api.core.ApiFuture<com.google.protobuf.Empty> asyncDeleteSession(String sessionName, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
asyncDeleteSession
in interfaceSpannerRpc
-
read
public SpannerRpc.StreamingCall read(ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
read
in interfaceSpannerRpc
-
executeQuery
public ResultSet executeQuery(ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
executeQuery
in interfaceSpannerRpc
-
executeQueryAsync
public com.google.api.core.ApiFuture<ResultSet> executeQueryAsync(ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
executeQueryAsync
in interfaceSpannerRpc
-
executePartitionedDml
public ResultSet executePartitionedDml(ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
executePartitionedDml
in interfaceSpannerRpc
-
getPartitionedDmlRetrySettings
public com.google.api.gax.retrying.RetrySettings getPartitionedDmlRetrySettings()
- Specified by:
getPartitionedDmlRetrySettings
in interfaceSpannerRpc
-
executeStreamingPartitionedDml
public com.google.api.gax.rpc.ServerStream<PartialResultSet> executeStreamingPartitionedDml(ExecuteSqlRequest request, Map<SpannerRpc.Option,?> options, org.threeten.bp.Duration timeout)
- Specified by:
executeStreamingPartitionedDml
in interfaceSpannerRpc
-
executeQuery
public SpannerRpc.StreamingCall executeQuery(ExecuteSqlRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
executeQuery
in interfaceSpannerRpc
-
executeBatchDml
public ExecuteBatchDmlResponse executeBatchDml(ExecuteBatchDmlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
executeBatchDml
in interfaceSpannerRpc
-
executeBatchDmlAsync
public com.google.api.core.ApiFuture<ExecuteBatchDmlResponse> executeBatchDmlAsync(ExecuteBatchDmlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
executeBatchDmlAsync
in interfaceSpannerRpc
-
beginTransactionAsync
public com.google.api.core.ApiFuture<Transaction> beginTransactionAsync(BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
beginTransactionAsync
in interfaceSpannerRpc
-
beginTransaction
public Transaction beginTransaction(BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
- Specified by:
beginTransaction
in interfaceSpannerRpc
- Throws:
SpannerException
-
commitAsync
public com.google.api.core.ApiFuture<CommitResponse> commitAsync(CommitRequest request, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
commitAsync
in interfaceSpannerRpc
-
commit
public CommitResponse commit(CommitRequest commitRequest, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
- Specified by:
commit
in interfaceSpannerRpc
- Throws:
SpannerException
-
rollbackAsync
public com.google.api.core.ApiFuture<com.google.protobuf.Empty> rollbackAsync(RollbackRequest request, @Nullable Map<SpannerRpc.Option,?> options)
- Specified by:
rollbackAsync
in interfaceSpannerRpc
-
rollback
public void rollback(RollbackRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
- Specified by:
rollback
in interfaceSpannerRpc
- Throws:
SpannerException
-
partitionQuery
public PartitionResponse partitionQuery(PartitionQueryRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
- Specified by:
partitionQuery
in interfaceSpannerRpc
- Throws:
SpannerException
-
partitionRead
public PartitionResponse partitionRead(PartitionReadRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
- Specified by:
partitionRead
in interfaceSpannerRpc
- Throws:
SpannerException
-
getDatabaseAdminIAMPolicy
public com.google.iam.v1.Policy getDatabaseAdminIAMPolicy(String resource, @Nullable com.google.iam.v1.GetPolicyOptions options)
Description copied from interface:SpannerRpc
Gets the IAM policy for the given resource using theDatabaseAdminStub
.- Specified by:
getDatabaseAdminIAMPolicy
in interfaceSpannerRpc
-
setDatabaseAdminIAMPolicy
public com.google.iam.v1.Policy setDatabaseAdminIAMPolicy(String resource, com.google.iam.v1.Policy policy)
Description copied from interface:SpannerRpc
Updates 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:
setDatabaseAdminIAMPolicy
in interfaceSpannerRpc
-
testDatabaseAdminIAMPermissions
public com.google.iam.v1.TestIamPermissionsResponse testDatabaseAdminIAMPermissions(String resource, Iterable<String> permissions)
Description copied from interface:SpannerRpc
Tests the IAM permissions for the given resource using theDatabaseAdminStub
.- Specified by:
testDatabaseAdminIAMPermissions
in interfaceSpannerRpc
-
getInstanceAdminIAMPolicy
public com.google.iam.v1.Policy getInstanceAdminIAMPolicy(String resource)
Description copied from interface:SpannerRpc
Gets the IAM policy for the given resource using theInstanceAdminStub
.- Specified by:
getInstanceAdminIAMPolicy
in interfaceSpannerRpc
-
setInstanceAdminIAMPolicy
public com.google.iam.v1.Policy setInstanceAdminIAMPolicy(String resource, com.google.iam.v1.Policy policy)
Description copied from interface:SpannerRpc
Updates 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:
setInstanceAdminIAMPolicy
in interfaceSpannerRpc
-
testInstanceAdminIAMPermissions
public com.google.iam.v1.TestIamPermissionsResponse testInstanceAdminIAMPermissions(String resource, Iterable<String> permissions)
Description copied from interface:SpannerRpc
Tests the IAM permissions for the given resource using theInstanceAdminStub
.- Specified by:
testInstanceAdminIAMPermissions
in interfaceSpannerRpc
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceSpannerRpc
-
shutdownNow
public void shutdownNow()
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceSpannerRpc
-
-