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
SpannerExceptionInstanceConfig getInstanceConfig(String instanceConfigName) throws SpannerException
SpannerExceptionSpannerRpc.Paginated<Instance> listInstances(int pageSize, @Nullable String pageToken, @Nullable String filter) throws SpannerException
SpannerExceptioncom.google.api.gax.longrunning.OperationFuture<Instance,CreateInstanceMetadata> createInstance(String parent, String instanceId, Instance instance) throws SpannerException
SpannerExceptioncom.google.api.gax.longrunning.OperationFuture<Instance,UpdateInstanceMetadata> updateInstance(Instance instance, FieldMask fieldMask) throws SpannerException
SpannerExceptionInstance getInstance(String instanceName) throws SpannerException
SpannerExceptionvoid deleteInstance(String instanceName) throws SpannerException
SpannerExceptionSpannerRpc.Paginated<Database> listDatabases(String instanceName, int pageSize, @Nullable String pageToken) throws SpannerException
SpannerExceptioncom.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata> createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements) throws SpannerException
SpannerExceptioncom.google.api.gax.longrunning.OperationFuture<Empty,UpdateDatabaseDdlMetadata> updateDatabaseDdl(String databaseName, Iterable<String> updateDatabaseStatements, @Nullable String updateId) throws SpannerException
SpannerExceptionvoid dropDatabase(String databaseName) throws SpannerException
SpannerExceptionDatabase getDatabase(String databaseName) throws SpannerException
SpannerExceptionList<String> getDatabaseDdl(String databaseName) throws SpannerException
SpannerExceptioncom.google.longrunning.Operation getOperation(String name) throws SpannerException
SpannerExceptionSession createSession(String databaseName, @Nullable Map<String,String> labels, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerExceptionvoid deleteSession(String sessionName, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerExceptionSpannerRpc.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
SpannerExceptionCommitResponse commit(CommitRequest commitRequest, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerExceptionvoid rollback(RollbackRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerExceptionPartitionResponse partitionQuery(PartitionQueryRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerExceptionPartitionResponse partitionRead(PartitionReadRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerExceptionvoid shutdown()
Copyright © 2019 Google LLC. All rights reserved.