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
gRPC stub implementation for the Spanner service API.
This class is for advanced usage and reflects the underlying API directly.
-
Constructor Summary
ModifierConstructorDescriptionprotected
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
Modifier and TypeMethodDescriptionboolean
awaitTermination
(long duration, TimeUnit unit) com.google.api.gax.rpc.UnaryCallable<BatchCreateSessionsRequest,
BatchCreateSessionsResponse> com.google.api.gax.rpc.ServerStreamingCallable<BatchWriteRequest,
BatchWriteResponse> com.google.api.gax.rpc.UnaryCallable<BeginTransactionRequest,
Transaction> final void
close()
com.google.api.gax.rpc.UnaryCallable<CommitRequest,
CommitResponse> static final GrpcSpannerStub
create
(com.google.api.gax.rpc.ClientContext clientContext) static final GrpcSpannerStub
create
(com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory) static final GrpcSpannerStub
create
(SpannerStubSettings settings) com.google.api.gax.rpc.UnaryCallable<CreateSessionRequest,
Session> com.google.api.gax.rpc.UnaryCallable<DeleteSessionRequest,
com.google.protobuf.Empty> com.google.api.gax.rpc.UnaryCallable<ExecuteBatchDmlRequest,
ExecuteBatchDmlResponse> com.google.api.gax.rpc.UnaryCallable<ExecuteSqlRequest,
ResultSet> com.google.api.gax.rpc.ServerStreamingCallable<ExecuteSqlRequest,
PartialResultSet> com.google.longrunning.stub.GrpcOperationsStub
com.google.api.gax.rpc.UnaryCallable<GetSessionRequest,
Session> boolean
boolean
com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,
ListSessionsResponse> com.google.api.gax.rpc.UnaryCallable<ListSessionsRequest,
SpannerClient.ListSessionsPagedResponse> com.google.api.gax.rpc.UnaryCallable<PartitionQueryRequest,
PartitionResponse> com.google.api.gax.rpc.UnaryCallable<PartitionReadRequest,
PartitionResponse> com.google.api.gax.rpc.UnaryCallable<ReadRequest,
ResultSet> com.google.api.gax.rpc.UnaryCallable<RollbackRequest,
com.google.protobuf.Empty> void
shutdown()
void
com.google.api.gax.rpc.ServerStreamingCallable<ReadRequest,
PartialResultSet>
-
Constructor Details
-
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 Details
-
create
- 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
- Overrides:
createSessionCallable
in classSpannerStub
-
batchCreateSessionsCallable
public com.google.api.gax.rpc.UnaryCallable<BatchCreateSessionsRequest,BatchCreateSessionsResponse> batchCreateSessionsCallable()- Overrides:
batchCreateSessionsCallable
in classSpannerStub
-
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
- 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
- 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
- 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
-
batchWriteCallable
public com.google.api.gax.rpc.ServerStreamingCallable<BatchWriteRequest,BatchWriteResponse> batchWriteCallable()- Overrides:
batchWriteCallable
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
- Throws:
InterruptedException
-