public class GrpcSpannerRpc extends Object implements SpannerRpc
SpannerRpc.Option, SpannerRpc.Paginated<T>, SpannerRpc.ResultStreamConsumer, SpannerRpc.StreamingCall
Constructor and Description |
---|
GrpcSpannerRpc(SpannerOptions options) |
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) |
com.google.longrunning.Operation |
createDatabase(String instanceName,
String createDatabaseStatement,
Iterable<String> additionalStatements) |
com.google.longrunning.Operation |
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) |
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) |
com.google.longrunning.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) |
com.google.longrunning.Operation |
updateDatabaseDdl(String databaseName,
Iterable<String> updateStatements,
String operationId) |
com.google.longrunning.Operation |
updateInstance(com.google.spanner.admin.instance.v1.Instance instance,
com.google.protobuf.FieldMask fieldMask) |
public GrpcSpannerRpc(SpannerOptions options)
public SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.InstanceConfig> listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException
listInstanceConfigs
in interface SpannerRpc
SpannerException
public com.google.spanner.admin.instance.v1.InstanceConfig getInstanceConfig(String instanceConfigName) throws SpannerException
getInstanceConfig
in interface SpannerRpc
SpannerException
public SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.Instance> listInstances(int pageSize, @Nullable String pageToken, @Nullable String filter) throws SpannerException
listInstances
in interface SpannerRpc
SpannerException
public com.google.longrunning.Operation createInstance(String parent, String instanceId, com.google.spanner.admin.instance.v1.Instance instance) throws SpannerException
createInstance
in interface SpannerRpc
SpannerException
public com.google.longrunning.Operation updateInstance(com.google.spanner.admin.instance.v1.Instance instance, com.google.protobuf.FieldMask fieldMask) throws SpannerException
updateInstance
in interface SpannerRpc
SpannerException
public com.google.spanner.admin.instance.v1.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<com.google.spanner.admin.database.v1.Database> listDatabases(String instanceName, int pageSize, @Nullable String pageToken) throws SpannerException
listDatabases
in interface SpannerRpc
SpannerException
public com.google.longrunning.Operation createDatabase(String instanceName, String createDatabaseStatement, Iterable<String> additionalStatements) throws SpannerException
createDatabase
in interface SpannerRpc
SpannerException
public com.google.longrunning.Operation updateDatabaseDdl(String databaseName, Iterable<String> updateStatements, @Nullable String operationId) throws SpannerException
updateDatabaseDdl
in interface SpannerRpc
SpannerException
public void dropDatabase(String databaseName) throws SpannerException
dropDatabase
in interface SpannerRpc
SpannerException
public List<String> getDatabaseDdl(String databaseName) throws SpannerException
getDatabaseDdl
in interface SpannerRpc
SpannerException
public com.google.spanner.admin.database.v1.Database getDatabase(String databaseName) throws SpannerException
getDatabase
in interface SpannerRpc
SpannerException
public com.google.longrunning.Operation getOperation(String name) throws SpannerException
SpannerRpc
getOperation
in interface SpannerRpc
SpannerException
public com.google.spanner.v1.Session createSession(String databaseName, @Nullable Map<String,String> labels, @Nullable Map<SpannerRpc.Option,?> options)
createSession
in interface SpannerRpc
public void deleteSession(String sessionName, @Nullable Map<SpannerRpc.Option,?> options)
deleteSession
in interface SpannerRpc
public SpannerRpc.StreamingCall read(com.google.spanner.v1.ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
read
in interface SpannerRpc
public SpannerRpc.StreamingCall executeQuery(com.google.spanner.v1.ExecuteSqlRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
executeQuery
in interface SpannerRpc
public com.google.spanner.v1.Transaction beginTransaction(com.google.spanner.v1.BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option,?> options)
beginTransaction
in interface SpannerRpc
public com.google.spanner.v1.CommitResponse commit(com.google.spanner.v1.CommitRequest commitRequest, @Nullable Map<SpannerRpc.Option,?> options)
commit
in interface SpannerRpc
public void rollback(com.google.spanner.v1.RollbackRequest request, @Nullable Map<SpannerRpc.Option,?> options)
rollback
in interface SpannerRpc
public com.google.spanner.v1.PartitionResponse partitionQuery(com.google.spanner.v1.PartitionQueryRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
partitionQuery
in interface SpannerRpc
SpannerException
public com.google.spanner.v1.PartitionResponse partitionRead(com.google.spanner.v1.PartitionReadRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
partitionRead
in interface SpannerRpc
SpannerException
Copyright © 2018 Google. All rights reserved.