public class GapicSpannerRpc extends Object implements SpannerRpc
SpannerRpc.Option, SpannerRpc.Paginated<T>, SpannerRpc.ResultStreamConsumer, SpannerRpc.StreamingCall
Constructor and Description |
---|
GapicSpannerRpc(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) |
static GapicSpannerRpc |
create(SpannerOptions 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 request,
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) |
public GapicSpannerRpc(SpannerOptions options)
public static GapicSpannerRpc create(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 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
createInstance
in interface SpannerRpc
SpannerException
public 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
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 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
createDatabase
in interface SpannerRpc
SpannerException
public OperationFuture<Empty,com.google.spanner.admin.database.v1.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 com.google.spanner.admin.database.v1.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 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) 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(com.google.spanner.v1.ReadRequest request, SpannerRpc.ResultStreamConsumer consumer, @Nullable Map<SpannerRpc.Option,?> options)
read
in interface SpannerRpc
public com.google.spanner.v1.ResultSet executeQuery(com.google.spanner.v1.ExecuteSqlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
executeQuery
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.ExecuteBatchDmlResponse executeBatchDml(com.google.spanner.v1.ExecuteBatchDmlRequest request, @Nullable Map<SpannerRpc.Option,?> options)
executeBatchDml
in interface SpannerRpc
public com.google.spanner.v1.Transaction beginTransaction(com.google.spanner.v1.BeginTransactionRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
beginTransaction
in interface SpannerRpc
SpannerException
public com.google.spanner.v1.CommitResponse commit(com.google.spanner.v1.CommitRequest commitRequest, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
commit
in interface SpannerRpc
SpannerException
public void rollback(com.google.spanner.v1.RollbackRequest request, @Nullable Map<SpannerRpc.Option,?> options) throws SpannerException
rollback
in interface SpannerRpc
SpannerException
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
public void shutdown()
shutdown
in interface SpannerRpc
Copyright © 2019 Google LLC. All rights reserved.