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 protectedGrpcSpannerStub(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext)Constructs an instance of GrpcSpannerStub, using the given settings.protectedGrpcSpannerStub(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 booleanawaitTermination(long duration, TimeUnit unit)com.google.api.gax.rpc.UnaryCallable<BatchCreateSessionsRequest,BatchCreateSessionsResponse>batchCreateSessionsCallable()com.google.api.gax.rpc.UnaryCallable<BeginTransactionRequest,Transaction>beginTransactionCallable()voidclose()com.google.api.gax.rpc.UnaryCallable<CommitRequest,CommitResponse>commitCallable()static GrpcSpannerStubcreate(com.google.api.gax.rpc.ClientContext clientContext)static GrpcSpannerStubcreate(com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory)static GrpcSpannerStubcreate(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.GrpcOperationsStubgetOperationsStub()com.google.api.gax.rpc.UnaryCallable<GetSessionRequest,Session>getSessionCallable()booleanisShutdown()booleanisTerminated()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()voidshutdown()voidshutdownNow()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:
createSessionCallablein classSpannerStub
-
batchCreateSessionsCallable
public com.google.api.gax.rpc.UnaryCallable<BatchCreateSessionsRequest,BatchCreateSessionsResponse> batchCreateSessionsCallable()
- Overrides:
batchCreateSessionsCallablein classSpannerStub
-
getSessionCallable
public com.google.api.gax.rpc.UnaryCallable<GetSessionRequest,Session> getSessionCallable()
- Overrides:
getSessionCallablein classSpannerStub
-
listSessionsCallable
public com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,ListSessionsResponse> listSessionsCallable()
- Overrides:
listSessionsCallablein classSpannerStub
-
listSessionsPagedCallable
public com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,SpannerClient.ListSessionsPagedResponse> listSessionsPagedCallable()
- Overrides:
listSessionsPagedCallablein classSpannerStub
-
deleteSessionCallable
public com.google.api.gax.rpc.UnaryCallable<DeleteSessionRequest,com.google.protobuf.Empty> deleteSessionCallable()
- Overrides:
deleteSessionCallablein classSpannerStub
-
executeSqlCallable
public com.google.api.gax.rpc.UnaryCallable<ExecuteSqlRequest,ResultSet> executeSqlCallable()
- Overrides:
executeSqlCallablein classSpannerStub
-
executeStreamingSqlCallable
public com.google.api.gax.rpc.ServerStreamingCallable<ExecuteSqlRequest,PartialResultSet> executeStreamingSqlCallable()
- Overrides:
executeStreamingSqlCallablein classSpannerStub
-
executeBatchDmlCallable
public com.google.api.gax.rpc.UnaryCallable<ExecuteBatchDmlRequest,ExecuteBatchDmlResponse> executeBatchDmlCallable()
- Overrides:
executeBatchDmlCallablein classSpannerStub
-
readCallable
public com.google.api.gax.rpc.UnaryCallable<ReadRequest,ResultSet> readCallable()
- Overrides:
readCallablein classSpannerStub
-
streamingReadCallable
public com.google.api.gax.rpc.ServerStreamingCallable<ReadRequest,PartialResultSet> streamingReadCallable()
- Overrides:
streamingReadCallablein classSpannerStub
-
beginTransactionCallable
public com.google.api.gax.rpc.UnaryCallable<BeginTransactionRequest,Transaction> beginTransactionCallable()
- Overrides:
beginTransactionCallablein classSpannerStub
-
commitCallable
public com.google.api.gax.rpc.UnaryCallable<CommitRequest,CommitResponse> commitCallable()
- Overrides:
commitCallablein classSpannerStub
-
rollbackCallable
public com.google.api.gax.rpc.UnaryCallable<RollbackRequest,com.google.protobuf.Empty> rollbackCallable()
- Overrides:
rollbackCallablein classSpannerStub
-
partitionQueryCallable
public com.google.api.gax.rpc.UnaryCallable<PartitionQueryRequest,PartitionResponse> partitionQueryCallable()
- Overrides:
partitionQueryCallablein classSpannerStub
-
partitionReadCallable
public com.google.api.gax.rpc.UnaryCallable<PartitionReadRequest,PartitionResponse> partitionReadCallable()
- Overrides:
partitionReadCallablein classSpannerStub
-
close
public final void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein 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
-
-