Class GrpcAdapterStub
java.lang.Object
com.google.spanner.adapter.v1.stub.AdapterStub
com.google.spanner.adapter.v1.stub.GrpcAdapterStub
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
gRPC stub implementation for the Adapter service API.
This class is for advanced usage and reflects the underlying API directly.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGrpcAdapterStub(AdapterStubSettings settings, ClientContext clientContext) Constructs an instance of GrpcAdapterStub, using the given settings.protectedGrpcAdapterStub(AdapterStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) Constructs an instance of GrpcAdapterStub, using the given settings. -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final GrpcAdapterStubcreate(ClientContext clientContext) static final GrpcAdapterStubcreate(ClientContext clientContext, GrpcStubCallableFactory callableFactory) static final GrpcAdapterStubcreate(AdapterStubSettings settings) booleanbooleanvoidshutdown()void
-
Constructor Details
-
GrpcAdapterStub
protected GrpcAdapterStub(AdapterStubSettings settings, ClientContext clientContext) throws IOException Constructs an instance of GrpcAdapterStub, 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
-
GrpcAdapterStub
protected GrpcAdapterStub(AdapterStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException Constructs an instance of GrpcAdapterStub, 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 GrpcAdapterStub create(ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException - Throws:
IOException
-
getOperationsStub
-
createSessionCallable
- Overrides:
createSessionCallablein classAdapterStub
-
adaptMessageCallable
- Overrides:
adaptMessageCallablein classAdapterStub
-
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classAdapterStub
-
shutdown
public void shutdown() -
isShutdown
public boolean isShutdown() -
isTerminated
public boolean isTerminated() -
shutdownNow
public void shutdownNow() -
awaitTermination
- Throws:
InterruptedException
-