public class GapicSpannerRpc extends Object implements SpannerRpc
SpannerRpc.Option, SpannerRpc.Paginated<T>, SpannerRpc.ResultStreamConsumer, SpannerRpc.StreamingCall
Constructor and Description |
---|
GapicSpannerRpc(SpannerOptions options) |
public GapicSpannerRpc(SpannerOptions options)
public static GapicSpannerRpc create(SpannerOptions options)
public SpannerRpc.Paginated<InstanceConfig> listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException
listInstanceConfigs
in interface SpannerRpc
SpannerException
public InstanceConfig getInstanceConfig(String instanceConfigName) throws SpannerException
getInstanceConfig
in interface SpannerRpc
SpannerException
public SpannerRpc.Paginated<Instance> listInstances(int pageSize, @Nullable String pageToken, @Nullable String filter) throws SpannerException
listInstances
in interface SpannerRpc
SpannerException
public com.google.api.gax.longrunning.OperationFuture<Instance,CreateInstanceMetadata> createInstance(String parent, String instanceId, Instance instance) throws SpannerException
createInstance
in interface SpannerRpc
SpannerException
public com.google.api.gax.longrunning.OperationFuture<Instance,UpdateInstanceMetadata> updateInstance(Instance instance, FieldMask fieldMask) throws SpannerException
updateInstance
in interface SpannerRpc
SpannerException
public Instance getInstance(String instanceName) throws SpannerException
getInstance
in interface SpannerRpc
SpannerException
public void deleteInstance(String instanceName) throws SpannerException
deleteInstance
in interface SpannerRpc
SpannerException
public SpannerRpc.Paginated<Database> listDatabases(String instanceName, int pageSize, @Nullable String pageToken) throws SpannerException
listDatabases
in interface SpannerRpc
SpannerException
public com.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata> createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements) throws SpannerException
createDatabase
in interface SpannerRpc
SpannerException
public com.google.api.gax.longrunning.OperationFuture<Empty,UpdateDatabaseDdlMetadata> updateDatabaseDdl(String databaseName, Iterable<String> updateDatabaseStatements, @Nullable String updateId) throws SpannerException
updateDatabaseDdl
in interface SpannerRpc
SpannerException
public void dropDatabase(String databaseName) throws SpannerException
dropDatabase
in interface SpannerRpc
SpannerException
public Database getDatabase(String databaseName) throws SpannerException
getDatabase
in interface SpannerRpc
SpannerException
public List<String> getDatabaseDdl(String databaseName) throws SpannerException
getDatabaseDdl
in interface SpannerRpc
SpannerException
public com.google.longrunning.Operation getOperation(String name) throws SpannerException
SpannerRpc
getOperation
in interface SpannerRpc
SpannerException
public Session createSession(String databaseName, @Nullable Map<String,String> labels, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
createSession
in interface SpannerRpc
SpannerException
public void deleteSession(String sessionName, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
deleteSession
in interface SpannerRpc
SpannerException
public SpannerRpc.StreamingCall read(ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
read
in interface SpannerRpc
public ResultSet executeQuery(ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
executeQuery
in interface SpannerRpc
public SpannerRpc.StreamingCall executeQuery(ExecuteSqlRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
executeQuery
in interface SpannerRpc
public ExecuteBatchDmlResponse executeBatchDml(ExecuteBatchDmlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
executeBatchDml
in interface SpannerRpc
public Transaction beginTransaction(BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
beginTransaction
in interface SpannerRpc
SpannerException
public CommitResponse commit(CommitRequest commitRequest, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
commit
in interface SpannerRpc
SpannerException
public void rollback(RollbackRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
rollback
in interface SpannerRpc
SpannerException
public PartitionResponse partitionQuery(PartitionQueryRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
partitionQuery
in interface SpannerRpc
SpannerException
public PartitionResponse partitionRead(PartitionReadRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
partitionRead
in interface SpannerRpc
SpannerException
public void shutdown()
shutdown
in interface SpannerRpc
Copyright © 2019 Google LLC. All rights reserved.