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.
|
Modifier and Type | Method and Description |
---|---|
com.google.spanner.v1.Transaction |
beginTransaction(com.google.spanner.v1.BeginTransactionRequest request,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.CommitResponse |
commit(com.google.spanner.v1.CommitRequest commitRequest,
Map<SpannerRpc.Option,?> options) |
OperationFuture<com.google.spanner.admin.database.v1.Database,com.google.spanner.admin.database.v1.CreateDatabaseMetadata> |
createDatabase(String instanceName,
String createDatabaseStatement,
Iterable<String> additionalStatements) |
OperationFuture<com.google.spanner.admin.instance.v1.Instance,com.google.spanner.admin.instance.v1.CreateInstanceMetadata> |
createInstance(String parent,
String instanceId,
com.google.spanner.admin.instance.v1.Instance instance) |
com.google.spanner.v1.Session |
createSession(String databaseName,
Map<String,String> labels,
Map<SpannerRpc.Option,?> options) |
void |
deleteInstance(String instanceName) |
void |
deleteSession(String sessionName,
Map<SpannerRpc.Option,?> options) |
void |
dropDatabase(String databaseName) |
com.google.spanner.v1.ExecuteBatchDmlResponse |
executeBatchDml(com.google.spanner.v1.ExecuteBatchDmlRequest build,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.ResultSet |
executeQuery(com.google.spanner.v1.ExecuteSqlRequest request,
Map<SpannerRpc.Option,?> options) |
SpannerRpc.StreamingCall |
executeQuery(com.google.spanner.v1.ExecuteSqlRequest request,
SpannerRpc.ResultStreamConsumer consumer,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.admin.database.v1.Database |
getDatabase(String databaseName) |
List<String> |
getDatabaseDdl(String databaseName) |
com.google.spanner.admin.instance.v1.Instance |
getInstance(String instanceName) |
com.google.spanner.admin.instance.v1.InstanceConfig |
getInstanceConfig(String instanceConfigName) |
Operation |
getOperation(String name)
Retrieves a long running operation.
|
SpannerRpc.Paginated<com.google.spanner.admin.database.v1.Database> |
listDatabases(String instanceName,
int pageSize,
String pageToken) |
SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.InstanceConfig> |
listInstanceConfigs(int pageSize,
String pageToken) |
SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.Instance> |
listInstances(int pageSize,
String pageToken,
String filter) |
com.google.spanner.v1.PartitionResponse |
partitionQuery(com.google.spanner.v1.PartitionQueryRequest request,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.PartitionResponse |
partitionRead(com.google.spanner.v1.PartitionReadRequest request,
Map<SpannerRpc.Option,?> options) |
SpannerRpc.StreamingCall |
read(com.google.spanner.v1.ReadRequest request,
SpannerRpc.ResultStreamConsumer consumer,
Map<SpannerRpc.Option,?> options) |
void |
rollback(com.google.spanner.v1.RollbackRequest request,
Map<SpannerRpc.Option,?> options) |
void |
shutdown() |
OperationFuture<Empty,com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata> |
updateDatabaseDdl(String databaseName,
Iterable<String> updateDatabaseStatements,
String updateId) |
OperationFuture<com.google.spanner.admin.instance.v1.Instance,com.google.spanner.admin.instance.v1.UpdateInstanceMetadata> |
updateInstance(com.google.spanner.admin.instance.v1.Instance instance,
FieldMask fieldMask) |
SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.InstanceConfig> listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException
SpannerException
com.google.spanner.admin.instance.v1.InstanceConfig getInstanceConfig(String instanceConfigName) throws SpannerException
SpannerException
SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.Instance> listInstances(int pageSize, @Nullable String pageToken, @Nullable String filter) throws SpannerException
SpannerException
OperationFuture<com.google.spanner.admin.instance.v1.Instance,com.google.spanner.admin.instance.v1.CreateInstanceMetadata> createInstance(String parent, String instanceId, com.google.spanner.admin.instance.v1.Instance instance) throws SpannerException
SpannerException
OperationFuture<com.google.spanner.admin.instance.v1.Instance,com.google.spanner.admin.instance.v1.UpdateInstanceMetadata> updateInstance(com.google.spanner.admin.instance.v1.Instance instance, FieldMask fieldMask) throws SpannerException
SpannerException
com.google.spanner.admin.instance.v1.Instance getInstance(String instanceName) throws SpannerException
SpannerException
void deleteInstance(String instanceName) throws SpannerException
SpannerException
SpannerRpc.Paginated<com.google.spanner.admin.database.v1.Database> listDatabases(String instanceName, int pageSize, @Nullable String pageToken) throws SpannerException
SpannerException
OperationFuture<com.google.spanner.admin.database.v1.Database,com.google.spanner.admin.database.v1.CreateDatabaseMetadata> createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements) throws SpannerException
SpannerException
OperationFuture<Empty,com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata> updateDatabaseDdl(String databaseName, Iterable<String> updateDatabaseStatements, @Nullable String updateId) throws SpannerException
SpannerException
void dropDatabase(String databaseName) throws SpannerException
SpannerException
com.google.spanner.admin.database.v1.Database getDatabase(String databaseName) throws SpannerException
SpannerException
List<String> getDatabaseDdl(String databaseName) throws SpannerException
SpannerException
Operation getOperation(String name) throws SpannerException
SpannerException
com.google.spanner.v1.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(com.google.spanner.v1.ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
com.google.spanner.v1.ResultSet executeQuery(com.google.spanner.v1.ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
SpannerRpc.StreamingCall executeQuery(com.google.spanner.v1.ExecuteSqlRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
com.google.spanner.v1.ExecuteBatchDmlResponse executeBatchDml(com.google.spanner.v1.ExecuteBatchDmlRequest build, Map<SpannerRpc.Option,?> options)
com.google.spanner.v1.Transaction beginTransaction(com.google.spanner.v1.BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
com.google.spanner.v1.CommitResponse commit(com.google.spanner.v1.CommitRequest commitRequest, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
void rollback(com.google.spanner.v1.RollbackRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
com.google.spanner.v1.PartitionResponse partitionQuery(com.google.spanner.v1.PartitionQueryRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
com.google.spanner.v1.PartitionResponse partitionRead(com.google.spanner.v1.PartitionReadRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
SpannerException
void shutdown()
Copyright © 2019 Google LLC. All rights reserved.