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:
BackgroundResource,AutoCloseable
gRPC stub implementation for the Spanner service API.
This class is for advanced usage and reflects the underlying API directly.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGrpcSpannerStub(SpannerStubSettings settings, ClientContext clientContext) Constructs an instance of GrpcSpannerStub, using the given settings.protectedGrpcSpannerStub(SpannerStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) Constructs an instance of GrpcSpannerStub, using the given settings. -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final GrpcSpannerStubcreate(ClientContext clientContext) static final GrpcSpannerStubcreate(ClientContext clientContext, GrpcStubCallableFactory callableFactory) static final GrpcSpannerStubcreate(SpannerStubSettings settings) UnaryCallable<DeleteSessionRequest,com.google.protobuf.Empty> booleanbooleanUnaryCallable<RollbackRequest,com.google.protobuf.Empty> voidshutdown()void
-
Constructor Details
-
GrpcSpannerStub
protected GrpcSpannerStub(SpannerStubSettings settings, 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, ClientContext clientContext, 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
- Throws:
IOException
-
create
public static final GrpcSpannerStub create(ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException - Throws:
IOException
-
getOperationsStub
-
createSessionCallable
- Overrides:
createSessionCallablein classSpannerStub
-
batchCreateSessionsCallable
public UnaryCallable<BatchCreateSessionsRequest,BatchCreateSessionsResponse> batchCreateSessionsCallable()- Overrides:
batchCreateSessionsCallablein classSpannerStub
-
getSessionCallable
- Overrides:
getSessionCallablein classSpannerStub
-
listSessionsCallable
- Overrides:
listSessionsCallablein classSpannerStub
-
listSessionsPagedCallable
public UnaryCallable<ListSessionsRequest,SpannerClient.ListSessionsPagedResponse> listSessionsPagedCallable()- Overrides:
listSessionsPagedCallablein classSpannerStub
-
deleteSessionCallable
- Overrides:
deleteSessionCallablein classSpannerStub
-
executeSqlCallable
- Overrides:
executeSqlCallablein classSpannerStub
-
executeStreamingSqlCallable
- Overrides:
executeStreamingSqlCallablein classSpannerStub
-
executeBatchDmlCallable
- Overrides:
executeBatchDmlCallablein classSpannerStub
-
readCallable
- Overrides:
readCallablein classSpannerStub
-
streamingReadCallable
- Overrides:
streamingReadCallablein classSpannerStub
-
beginTransactionCallable
- Overrides:
beginTransactionCallablein classSpannerStub
-
commitCallable
- Overrides:
commitCallablein classSpannerStub
-
rollbackCallable
- Overrides:
rollbackCallablein classSpannerStub
-
partitionQueryCallable
- Overrides:
partitionQueryCallablein classSpannerStub
-
partitionReadCallable
- Overrides:
partitionReadCallablein classSpannerStub
-
batchWriteCallable
- Overrides:
batchWriteCallablein 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
- Throws:
InterruptedException
-