public interface SpannerRpc extends ServiceRpc
Each SpannerRPC
instance is bound to a particular project and set of authorization
credentials.
The interface is currently defined in terms of the generated HTTP client model classes. This is purely for expedience; a future version of this interface is likely to be independent of transport to allow switching between gRPC and HTTP.
Modifier and Type | Interface and Description |
---|---|
static class |
SpannerRpc.Option
Options passed in
SpannerRpc methods to control how an RPC is issued. |
static class |
SpannerRpc.Paginated<T>
Represents results from paginated RPCs, i.e., those where up to a maximum number of items is
returned from each call and a followup call must be made to fetch more.
|
static interface |
SpannerRpc.ResultStreamConsumer
Consumer for the results produced by a streaming read or query call.
|
static interface |
SpannerRpc.StreamingCall
Handle for cancellation of a streaming read or query call.
|
SpannerRpc.Paginated<InstanceConfig> listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException
SpannerException
InstanceConfig getInstanceConfig(String instanceConfigName) throws SpannerException
SpannerException
SpannerRpc.Paginated<Instance> listInstances(int pageSize, @Nullable String pageToken, @Nullable String filter) throws SpannerException
SpannerException
com.google.api.gax.longrunning.OperationFuture<Instance,CreateInstanceMetadata> createInstance(String parent, String instanceId, Instance instance) throws SpannerException
SpannerException
com.google.api.gax.longrunning.OperationFuture<Instance,UpdateInstanceMetadata> updateInstance(Instance instance, FieldMask fieldMask) throws SpannerException
SpannerException
Instance getInstance(String instanceName) throws SpannerException
SpannerException
void deleteInstance(String instanceName) throws SpannerException
SpannerException
SpannerRpc.Paginated<Database> listDatabases(String instanceName, int pageSize, @Nullable String pageToken) throws SpannerException
SpannerException
com.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata> createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements) throws SpannerException
SpannerException
com.google.api.gax.longrunning.OperationFuture<Empty,UpdateDatabaseDdlMetadata> updateDatabaseDdl(String databaseName, Iterable<String> updateDatabaseStatements, @Nullable String updateId) throws SpannerException
SpannerException
void dropDatabase(String databaseName) throws SpannerException
SpannerException
Database getDatabase(String databaseName) throws SpannerException
SpannerException
List<String> getDatabaseDdl(String databaseName) throws SpannerException
SpannerException
com.google.longrunning.Operation getOperation(String name) throws SpannerException
SpannerException
Session createSession(String databaseName, @Nullable Map<String,String> labels, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
void deleteSession(String sessionName, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
SpannerRpc.StreamingCall read(ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
ResultSet executeQuery(ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
SpannerRpc.StreamingCall executeQuery(ExecuteSqlRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
ExecuteBatchDmlResponse executeBatchDml(ExecuteBatchDmlRequest build, Map<SpannerRpc.Option,?> options)
Transaction beginTransaction(BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
CommitResponse commit(CommitRequest commitRequest, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
void rollback(RollbackRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
PartitionResponse partitionQuery(PartitionQueryRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
PartitionResponse partitionRead(PartitionReadRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
void shutdown()
Copyright © 2019 Google LLC. All rights reserved.