Package com.google.cloud.spanner.v1.stub
Class GrpcSpannerStub
- java.lang.Object
-
- com.google.cloud.spanner.v1.stub.SpannerStub
-
- com.google.cloud.spanner.v1.stub.GrpcSpannerStub
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource
,AutoCloseable
@Generated("by gapic-generator-java") public class GrpcSpannerStub extends SpannerStub
gRPC stub implementation for the Spanner service API.This class is for advanced usage and reflects the underlying API directly.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GrpcSpannerStub(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext)
Constructs an instance of GrpcSpannerStub, using the given settings.protected
GrpcSpannerStub(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory)
Constructs an instance of GrpcSpannerStub, using the given settings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long duration, TimeUnit unit)
com.google.api.gax.rpc.UnaryCallable<BatchCreateSessionsRequest,BatchCreateSessionsResponse>
batchCreateSessionsCallable()
com.google.api.gax.rpc.UnaryCallable<BeginTransactionRequest,Transaction>
beginTransactionCallable()
void
close()
com.google.api.gax.rpc.UnaryCallable<CommitRequest,CommitResponse>
commitCallable()
static GrpcSpannerStub
create(com.google.api.gax.rpc.ClientContext clientContext)
static GrpcSpannerStub
create(com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory)
static GrpcSpannerStub
create(SpannerStubSettings settings)
com.google.api.gax.rpc.UnaryCallable<CreateSessionRequest,Session>
createSessionCallable()
com.google.api.gax.rpc.UnaryCallable<DeleteSessionRequest,com.google.protobuf.Empty>
deleteSessionCallable()
com.google.api.gax.rpc.UnaryCallable<ExecuteBatchDmlRequest,ExecuteBatchDmlResponse>
executeBatchDmlCallable()
com.google.api.gax.rpc.UnaryCallable<ExecuteSqlRequest,ResultSet>
executeSqlCallable()
com.google.api.gax.rpc.ServerStreamingCallable<ExecuteSqlRequest,PartialResultSet>
executeStreamingSqlCallable()
com.google.longrunning.stub.GrpcOperationsStub
getOperationsStub()
com.google.api.gax.rpc.UnaryCallable<GetSessionRequest,Session>
getSessionCallable()
boolean
isShutdown()
boolean
isTerminated()
com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,ListSessionsResponse>
listSessionsCallable()
com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,SpannerClient.ListSessionsPagedResponse>
listSessionsPagedCallable()
com.google.api.gax.rpc.UnaryCallable<PartitionQueryRequest,PartitionResponse>
partitionQueryCallable()
com.google.api.gax.rpc.UnaryCallable<PartitionReadRequest,PartitionResponse>
partitionReadCallable()
com.google.api.gax.rpc.UnaryCallable<ReadRequest,ResultSet>
readCallable()
com.google.api.gax.rpc.UnaryCallable<RollbackRequest,com.google.protobuf.Empty>
rollbackCallable()
void
shutdown()
void
shutdownNow()
com.google.api.gax.rpc.ServerStreamingCallable<ReadRequest,PartialResultSet>
streamingReadCallable()
-
-
-
Constructor Detail
-
GrpcSpannerStub
protected GrpcSpannerStub(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext) throws IOException
Constructs an instance of GrpcSpannerStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
GrpcSpannerStub
protected GrpcSpannerStub(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory) throws IOException
Constructs an instance of GrpcSpannerStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
-
Method Detail
-
create
public static final GrpcSpannerStub create(SpannerStubSettings settings) throws IOException
- Throws:
IOException
-
create
public static final GrpcSpannerStub create(com.google.api.gax.rpc.ClientContext clientContext) throws IOException
- Throws:
IOException
-
create
public static final GrpcSpannerStub create(com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory) throws IOException
- Throws:
IOException
-
getOperationsStub
public com.google.longrunning.stub.GrpcOperationsStub getOperationsStub()
-
createSessionCallable
public com.google.api.gax.rpc.UnaryCallable<CreateSessionRequest,Session> createSessionCallable()
- Overrides:
createSessionCallable
in classSpannerStub
-
batchCreateSessionsCallable
public com.google.api.gax.rpc.UnaryCallable<BatchCreateSessionsRequest,BatchCreateSessionsResponse> batchCreateSessionsCallable()
- Overrides:
batchCreateSessionsCallable
in classSpannerStub
-
getSessionCallable
public com.google.api.gax.rpc.UnaryCallable<GetSessionRequest,Session> getSessionCallable()
- Overrides:
getSessionCallable
in classSpannerStub
-
listSessionsCallable
public com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,ListSessionsResponse> listSessionsCallable()
- Overrides:
listSessionsCallable
in classSpannerStub
-
listSessionsPagedCallable
public com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,SpannerClient.ListSessionsPagedResponse> listSessionsPagedCallable()
- Overrides:
listSessionsPagedCallable
in classSpannerStub
-
deleteSessionCallable
public com.google.api.gax.rpc.UnaryCallable<DeleteSessionRequest,com.google.protobuf.Empty> deleteSessionCallable()
- Overrides:
deleteSessionCallable
in classSpannerStub
-
executeSqlCallable
public com.google.api.gax.rpc.UnaryCallable<ExecuteSqlRequest,ResultSet> executeSqlCallable()
- Overrides:
executeSqlCallable
in classSpannerStub
-
executeStreamingSqlCallable
public com.google.api.gax.rpc.ServerStreamingCallable<ExecuteSqlRequest,PartialResultSet> executeStreamingSqlCallable()
- Overrides:
executeStreamingSqlCallable
in classSpannerStub
-
executeBatchDmlCallable
public com.google.api.gax.rpc.UnaryCallable<ExecuteBatchDmlRequest,ExecuteBatchDmlResponse> executeBatchDmlCallable()
- Overrides:
executeBatchDmlCallable
in classSpannerStub
-
readCallable
public com.google.api.gax.rpc.UnaryCallable<ReadRequest,ResultSet> readCallable()
- Overrides:
readCallable
in classSpannerStub
-
streamingReadCallable
public com.google.api.gax.rpc.ServerStreamingCallable<ReadRequest,PartialResultSet> streamingReadCallable()
- Overrides:
streamingReadCallable
in classSpannerStub
-
beginTransactionCallable
public com.google.api.gax.rpc.UnaryCallable<BeginTransactionRequest,Transaction> beginTransactionCallable()
- Overrides:
beginTransactionCallable
in classSpannerStub
-
commitCallable
public com.google.api.gax.rpc.UnaryCallable<CommitRequest,CommitResponse> commitCallable()
- Overrides:
commitCallable
in classSpannerStub
-
rollbackCallable
public com.google.api.gax.rpc.UnaryCallable<RollbackRequest,com.google.protobuf.Empty> rollbackCallable()
- Overrides:
rollbackCallable
in classSpannerStub
-
partitionQueryCallable
public com.google.api.gax.rpc.UnaryCallable<PartitionQueryRequest,PartitionResponse> partitionQueryCallable()
- Overrides:
partitionQueryCallable
in classSpannerStub
-
partitionReadCallable
public com.google.api.gax.rpc.UnaryCallable<PartitionReadRequest,PartitionResponse> partitionReadCallable()
- Overrides:
partitionReadCallable
in classSpannerStub
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classSpannerStub
-
shutdown
public void shutdown()
-
isShutdown
public boolean isShutdown()
-
isTerminated
public boolean isTerminated()
-
shutdownNow
public void shutdownNow()
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
- Throws:
InterruptedException
-
-