Package com.google.cloud.spanner.v1.stub
Class HttpJsonSpannerStub
java.lang.Object
com.google.cloud.spanner.v1.stub.SpannerStub
com.google.cloud.spanner.v1.stub.HttpJsonSpannerStub
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource
,AutoCloseable
REST stub implementation for the Spanner service API.
This class is for advanced usage and reflects the underlying API directly.
-
Constructor Summary
ModifierConstructorDescriptionprotected
HttpJsonSpannerStub
(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext) Constructs an instance of HttpJsonSpannerStub, using the given settings.protected
HttpJsonSpannerStub
(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.httpjson.HttpJsonStubCallableFactory callableFactory) Constructs an instance of HttpJsonSpannerStub, 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 HttpJsonSpannerStub
create
(com.google.api.gax.rpc.ClientContext clientContext) static final HttpJsonSpannerStub
create
(com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.httpjson.HttpJsonStubCallableFactory callableFactory) static final HttpJsonSpannerStub
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> static List<com.google.api.gax.httpjson.ApiMethodDescriptor>
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
-
HttpJsonSpannerStub
protected HttpJsonSpannerStub(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext) throws IOException Constructs an instance of HttpJsonSpannerStub, 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
-
HttpJsonSpannerStub
protected HttpJsonSpannerStub(SpannerStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.httpjson.HttpJsonStubCallableFactory callableFactory) throws IOException Constructs an instance of HttpJsonSpannerStub, 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 HttpJsonSpannerStub create(com.google.api.gax.rpc.ClientContext clientContext) throws IOException - Throws:
IOException
-
create
public static final HttpJsonSpannerStub create(com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.httpjson.HttpJsonStubCallableFactory callableFactory) throws IOException - Throws:
IOException
-
getMethodDescriptors
@InternalApi public static List<com.google.api.gax.httpjson.ApiMethodDescriptor> getMethodDescriptors() -
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
-