nl.topicus.jdbc.shaded.com.google.spanner.v1.SpannerGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spanner-jdbc Show documentation
Show all versions of spanner-jdbc Show documentation
JDBC Driver for Google Cloud Spanner
package nl.topicus.jdbc.shaded.com.google.spanner.v1;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ClientCalls.asyncUnaryCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ClientCalls.blockingUnaryCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ClientCalls.futureUnaryCall;
import static nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.generateFullMethodName;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.asyncUnaryCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
/**
*
* Cloud Spanner API
* The Cloud Spanner API can be used to manage sessions and execute
* transactions on data stored in Cloud Spanner databases.
*
*/
@nl.topicus.jdbc.shaded.javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.2.0)",
comments = "Source: google/spanner/v1/spanner.proto")
public final class SpannerGrpc {
private SpannerGrpc() {}
public static final String SERVICE_NAME = "google.spanner.v1.Spanner";
// Static method descriptors that strictly reflect the proto.
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_CREATE_SESSION =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "CreateSession"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.CreateSessionRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.Session.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_GET_SESSION =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "GetSession"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.GetSessionRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.Session.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_LIST_SESSIONS =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "ListSessions"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsResponse.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_DELETE_SESSION =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "DeleteSession"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.DeleteSessionRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.protobuf.Empty.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_EXECUTE_SQL =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "ExecuteSql"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.ResultSet.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_EXECUTE_STREAMING_SQL =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
generateFullMethodName(
"google.spanner.v1.Spanner", "ExecuteStreamingSql"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.PartialResultSet.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_READ =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "Read"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.ResultSet.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_STREAMING_READ =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
generateFullMethodName(
"google.spanner.v1.Spanner", "StreamingRead"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.PartialResultSet.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_BEGIN_TRANSACTION =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "BeginTransaction"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.BeginTransactionRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.Transaction.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_COMMIT =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "Commit"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitResponse.getDefaultInstance()));
@nl.topicus.jdbc.shaded.io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor METHOD_ROLLBACK =
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.create(
nl.topicus.jdbc.shaded.io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"google.spanner.v1.Spanner", "Rollback"),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.spanner.v1.RollbackRequest.getDefaultInstance()),
nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoUtils.marshaller(nl.topicus.jdbc.shaded.com.google.protobuf.Empty.getDefaultInstance()));
/**
* Creates a new async stub that supports all call types for the service
*/
public static SpannerStub newStub(nl.topicus.jdbc.shaded.io.grpc.Channel channel) {
return new SpannerStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static SpannerBlockingStub newBlockingStub(
nl.topicus.jdbc.shaded.io.grpc.Channel channel) {
return new SpannerBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static SpannerFutureStub newFutureStub(
nl.topicus.jdbc.shaded.io.grpc.Channel channel) {
return new SpannerFutureStub(channel);
}
/**
*
* Cloud Spanner API
* The Cloud Spanner API can be used to manage sessions and execute
* transactions on data stored in Cloud Spanner databases.
*
*/
public static abstract class SpannerImplBase implements nl.topicus.jdbc.shaded.io.grpc.BindableService {
/**
*
* Creates a new session. A session can be used to perform
* transactions that read and/or modify data in a Cloud Spanner database.
* Sessions are meant to be reused for many consecutive
* transactions.
* Sessions can only execute one transaction at a time. To execute
* multiple concurrent read-write/write-only transactions, create
* multiple sessions. Note that standalone reads and queries use a
* transaction internally, and count toward the one transaction
* limit.
* Cloud Spanner limits the number of sessions that can exist at any given
* time; thus, it is a good idea to delete idle and/or unneeded sessions.
* Aside from explicit deletes, Cloud Spanner can delete sessions for which no
* operations are sent for more than an hour. If a session is deleted,
* requests to it return `NOT_FOUND`.
* Idle sessions can be kept alive by sending a trivial SQL query
* periodically, e.g., `"SELECT 1"`.
*
*/
public void createSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.CreateSessionRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_CREATE_SESSION, responseObserver);
}
/**
*
* Gets a session. Returns `NOT_FOUND` if the session does not exist.
* This is mainly useful for determining whether a session is still
* alive.
*
*/
public void getSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.GetSessionRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_GET_SESSION, responseObserver);
}
/**
*
* Lists all sessions in a given database.
*
*/
public void listSessions(nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_LIST_SESSIONS, responseObserver);
}
/**
*
* Ends a session, releasing server resources associated with it.
*
*/
public void deleteSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.DeleteSessionRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_DELETE_SESSION, responseObserver);
}
/**
*
* Executes an SQL query, returning all rows in a single reply. This
* method cannot be used to return a result set larger than 10 MiB;
* if the query yields more data than that, the query fails with
* a `FAILED_PRECONDITION` error.
* Queries inside read-write transactions might return `ABORTED`. If
* this occurs, the application should restart the transaction from
* the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
* Larger result sets can be fetched in streaming fashion by calling
* [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead.
*
*/
public void executeSql(nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_EXECUTE_SQL, responseObserver);
}
/**
*
* Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result
* set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there
* is no limit on the size of the returned result set. However, no
* individual row in the result set can exceed 100 MiB, and no
* column value can exceed 10 MiB.
*
*/
public void executeStreamingSql(nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_EXECUTE_STREAMING_SQL, responseObserver);
}
/**
*
* Reads rows from the database using key lookups and scans, as a
* simple key/value style alternative to
* [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to
* return a result set larger than 10 MiB; if the read matches more
* data than that, the read fails with a `FAILED_PRECONDITION`
* error.
* Reads inside read-write transactions might return `ABORTED`. If
* this occurs, the application should restart the transaction from
* the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
* Larger result sets can be yielded in streaming fashion by calling
* [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
*
*/
public void read(nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_READ, responseObserver);
}
/**
*
* Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a
* stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the
* size of the returned result set. However, no individual row in
* the result set can exceed 100 MiB, and no column value can exceed
* 10 MiB.
*
*/
public void streamingRead(nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_STREAMING_READ, responseObserver);
}
/**
*
* Begins a new transaction. This step can often be skipped:
* [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
* [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
* side-effect.
*
*/
public void beginTransaction(nl.topicus.jdbc.shaded.com.google.spanner.v1.BeginTransactionRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_BEGIN_TRANSACTION, responseObserver);
}
/**
*
* Commits a transaction. The request includes the mutations to be
* applied to rows in the database.
* `Commit` might return an `ABORTED` error. This can occur at any time;
* commonly, the cause is conflicts with concurrent
* transactions. However, it can also happen for a variety of other
* reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
* the transaction from the beginning, re-using the same session.
*
*/
public void commit(nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_COMMIT, responseObserver);
}
/**
*
* Rolls back a transaction, releasing any locks it holds. It is a good
* idea to call this for any transaction that includes one or more
* [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and
* ultimately decides not to commit.
* `Rollback` returns `OK` if it successfully aborts the transaction, the
* transaction was already aborted, or the transaction is not
* found. `Rollback` never returns `ABORTED`.
*
*/
public void rollback(nl.topicus.jdbc.shaded.com.google.spanner.v1.RollbackRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_ROLLBACK, responseObserver);
}
@java.lang.Override public final nl.topicus.jdbc.shaded.io.grpc.ServerServiceDefinition bindService() {
return nl.topicus.jdbc.shaded.io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_CREATE_SESSION,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.CreateSessionRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.Session>(
this, METHODID_CREATE_SESSION)))
.addMethod(
METHOD_GET_SESSION,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.GetSessionRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.Session>(
this, METHODID_GET_SESSION)))
.addMethod(
METHOD_LIST_SESSIONS,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsResponse>(
this, METHODID_LIST_SESSIONS)))
.addMethod(
METHOD_DELETE_SESSION,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.DeleteSessionRequest,
nl.topicus.jdbc.shaded.com.google.protobuf.Empty>(
this, METHODID_DELETE_SESSION)))
.addMethod(
METHOD_EXECUTE_SQL,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.ResultSet>(
this, METHODID_EXECUTE_SQL)))
.addMethod(
METHOD_EXECUTE_STREAMING_SQL,
asyncServerStreamingCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.PartialResultSet>(
this, METHODID_EXECUTE_STREAMING_SQL)))
.addMethod(
METHOD_READ,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.ResultSet>(
this, METHODID_READ)))
.addMethod(
METHOD_STREAMING_READ,
asyncServerStreamingCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.PartialResultSet>(
this, METHODID_STREAMING_READ)))
.addMethod(
METHOD_BEGIN_TRANSACTION,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.BeginTransactionRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.Transaction>(
this, METHODID_BEGIN_TRANSACTION)))
.addMethod(
METHOD_COMMIT,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitRequest,
nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitResponse>(
this, METHODID_COMMIT)))
.addMethod(
METHOD_ROLLBACK,
asyncUnaryCall(
new MethodHandlers<
nl.topicus.jdbc.shaded.com.google.spanner.v1.RollbackRequest,
nl.topicus.jdbc.shaded.com.google.protobuf.Empty>(
this, METHODID_ROLLBACK)))
.build();
}
}
/**
*
* Cloud Spanner API
* The Cloud Spanner API can be used to manage sessions and execute
* transactions on data stored in Cloud Spanner databases.
*
*/
public static final class SpannerStub extends nl.topicus.jdbc.shaded.io.grpc.stub.AbstractStub {
private SpannerStub(nl.topicus.jdbc.shaded.io.grpc.Channel channel) {
super(channel);
}
private SpannerStub(nl.topicus.jdbc.shaded.io.grpc.Channel channel,
nl.topicus.jdbc.shaded.io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SpannerStub build(nl.topicus.jdbc.shaded.io.grpc.Channel channel,
nl.topicus.jdbc.shaded.io.grpc.CallOptions callOptions) {
return new SpannerStub(channel, callOptions);
}
/**
*
* Creates a new session. A session can be used to perform
* transactions that read and/or modify data in a Cloud Spanner database.
* Sessions are meant to be reused for many consecutive
* transactions.
* Sessions can only execute one transaction at a time. To execute
* multiple concurrent read-write/write-only transactions, create
* multiple sessions. Note that standalone reads and queries use a
* transaction internally, and count toward the one transaction
* limit.
* Cloud Spanner limits the number of sessions that can exist at any given
* time; thus, it is a good idea to delete idle and/or unneeded sessions.
* Aside from explicit deletes, Cloud Spanner can delete sessions for which no
* operations are sent for more than an hour. If a session is deleted,
* requests to it return `NOT_FOUND`.
* Idle sessions can be kept alive by sending a trivial SQL query
* periodically, e.g., `"SELECT 1"`.
*
*/
public void createSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.CreateSessionRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_CREATE_SESSION, getCallOptions()), request, responseObserver);
}
/**
*
* Gets a session. Returns `NOT_FOUND` if the session does not exist.
* This is mainly useful for determining whether a session is still
* alive.
*
*/
public void getSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.GetSessionRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_GET_SESSION, getCallOptions()), request, responseObserver);
}
/**
*
* Lists all sessions in a given database.
*
*/
public void listSessions(nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_LIST_SESSIONS, getCallOptions()), request, responseObserver);
}
/**
*
* Ends a session, releasing server resources associated with it.
*
*/
public void deleteSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.DeleteSessionRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_DELETE_SESSION, getCallOptions()), request, responseObserver);
}
/**
*
* Executes an SQL query, returning all rows in a single reply. This
* method cannot be used to return a result set larger than 10 MiB;
* if the query yields more data than that, the query fails with
* a `FAILED_PRECONDITION` error.
* Queries inside read-write transactions might return `ABORTED`. If
* this occurs, the application should restart the transaction from
* the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
* Larger result sets can be fetched in streaming fashion by calling
* [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead.
*
*/
public void executeSql(nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_EXECUTE_SQL, getCallOptions()), request, responseObserver);
}
/**
*
* Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result
* set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there
* is no limit on the size of the returned result set. However, no
* individual row in the result set can exceed 100 MiB, and no
* column value can exceed 10 MiB.
*
*/
public void executeStreamingSql(nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(METHOD_EXECUTE_STREAMING_SQL, getCallOptions()), request, responseObserver);
}
/**
*
* Reads rows from the database using key lookups and scans, as a
* simple key/value style alternative to
* [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to
* return a result set larger than 10 MiB; if the read matches more
* data than that, the read fails with a `FAILED_PRECONDITION`
* error.
* Reads inside read-write transactions might return `ABORTED`. If
* this occurs, the application should restart the transaction from
* the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
* Larger result sets can be yielded in streaming fashion by calling
* [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
*
*/
public void read(nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_READ, getCallOptions()), request, responseObserver);
}
/**
*
* Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a
* stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the
* size of the returned result set. However, no individual row in
* the result set can exceed 100 MiB, and no column value can exceed
* 10 MiB.
*
*/
public void streamingRead(nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(METHOD_STREAMING_READ, getCallOptions()), request, responseObserver);
}
/**
*
* Begins a new transaction. This step can often be skipped:
* [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
* [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
* side-effect.
*
*/
public void beginTransaction(nl.topicus.jdbc.shaded.com.google.spanner.v1.BeginTransactionRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_BEGIN_TRANSACTION, getCallOptions()), request, responseObserver);
}
/**
*
* Commits a transaction. The request includes the mutations to be
* applied to rows in the database.
* `Commit` might return an `ABORTED` error. This can occur at any time;
* commonly, the cause is conflicts with concurrent
* transactions. However, it can also happen for a variety of other
* reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
* the transaction from the beginning, re-using the same session.
*
*/
public void commit(nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_COMMIT, getCallOptions()), request, responseObserver);
}
/**
*
* Rolls back a transaction, releasing any locks it holds. It is a good
* idea to call this for any transaction that includes one or more
* [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and
* ultimately decides not to commit.
* `Rollback` returns `OK` if it successfully aborts the transaction, the
* transaction was already aborted, or the transaction is not
* found. `Rollback` never returns `ABORTED`.
*
*/
public void rollback(nl.topicus.jdbc.shaded.com.google.spanner.v1.RollbackRequest request,
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_ROLLBACK, getCallOptions()), request, responseObserver);
}
}
/**
*
* Cloud Spanner API
* The Cloud Spanner API can be used to manage sessions and execute
* transactions on data stored in Cloud Spanner databases.
*
*/
public static final class SpannerBlockingStub extends nl.topicus.jdbc.shaded.io.grpc.stub.AbstractStub {
private SpannerBlockingStub(nl.topicus.jdbc.shaded.io.grpc.Channel channel) {
super(channel);
}
private SpannerBlockingStub(nl.topicus.jdbc.shaded.io.grpc.Channel channel,
nl.topicus.jdbc.shaded.io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SpannerBlockingStub build(nl.topicus.jdbc.shaded.io.grpc.Channel channel,
nl.topicus.jdbc.shaded.io.grpc.CallOptions callOptions) {
return new SpannerBlockingStub(channel, callOptions);
}
/**
*
* Creates a new session. A session can be used to perform
* transactions that read and/or modify data in a Cloud Spanner database.
* Sessions are meant to be reused for many consecutive
* transactions.
* Sessions can only execute one transaction at a time. To execute
* multiple concurrent read-write/write-only transactions, create
* multiple sessions. Note that standalone reads and queries use a
* transaction internally, and count toward the one transaction
* limit.
* Cloud Spanner limits the number of sessions that can exist at any given
* time; thus, it is a good idea to delete idle and/or unneeded sessions.
* Aside from explicit deletes, Cloud Spanner can delete sessions for which no
* operations are sent for more than an hour. If a session is deleted,
* requests to it return `NOT_FOUND`.
* Idle sessions can be kept alive by sending a trivial SQL query
* periodically, e.g., `"SELECT 1"`.
*
*/
public nl.topicus.jdbc.shaded.com.google.spanner.v1.Session createSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.CreateSessionRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_CREATE_SESSION, getCallOptions(), request);
}
/**
*
* Gets a session. Returns `NOT_FOUND` if the session does not exist.
* This is mainly useful for determining whether a session is still
* alive.
*
*/
public nl.topicus.jdbc.shaded.com.google.spanner.v1.Session getSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.GetSessionRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_GET_SESSION, getCallOptions(), request);
}
/**
*
* Lists all sessions in a given database.
*
*/
public nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsResponse listSessions(nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_LIST_SESSIONS, getCallOptions(), request);
}
/**
*
* Ends a session, releasing server resources associated with it.
*
*/
public nl.topicus.jdbc.shaded.com.google.protobuf.Empty deleteSession(nl.topicus.jdbc.shaded.com.google.spanner.v1.DeleteSessionRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_DELETE_SESSION, getCallOptions(), request);
}
/**
*
* Executes an SQL query, returning all rows in a single reply. This
* method cannot be used to return a result set larger than 10 MiB;
* if the query yields more data than that, the query fails with
* a `FAILED_PRECONDITION` error.
* Queries inside read-write transactions might return `ABORTED`. If
* this occurs, the application should restart the transaction from
* the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
* Larger result sets can be fetched in streaming fashion by calling
* [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead.
*
*/
public nl.topicus.jdbc.shaded.com.google.spanner.v1.ResultSet executeSql(nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_EXECUTE_SQL, getCallOptions(), request);
}
/**
*
* Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result
* set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there
* is no limit on the size of the returned result set. However, no
* individual row in the result set can exceed 100 MiB, and no
* column value can exceed 10 MiB.
*
*/
public java.util.Iterator executeStreamingSql(
nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest request) {
return blockingServerStreamingCall(
getChannel(), METHOD_EXECUTE_STREAMING_SQL, getCallOptions(), request);
}
/**
*
* Reads rows from the database using key lookups and scans, as a
* simple key/value style alternative to
* [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to
* return a result set larger than 10 MiB; if the read matches more
* data than that, the read fails with a `FAILED_PRECONDITION`
* error.
* Reads inside read-write transactions might return `ABORTED`. If
* this occurs, the application should restart the transaction from
* the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
* Larger result sets can be yielded in streaming fashion by calling
* [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
*
*/
public nl.topicus.jdbc.shaded.com.google.spanner.v1.ResultSet read(nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_READ, getCallOptions(), request);
}
/**
*
* Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a
* stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the
* size of the returned result set. However, no individual row in
* the result set can exceed 100 MiB, and no column value can exceed
* 10 MiB.
*
*/
public java.util.Iterator streamingRead(
nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest request) {
return blockingServerStreamingCall(
getChannel(), METHOD_STREAMING_READ, getCallOptions(), request);
}
/**
*
* Begins a new transaction. This step can often be skipped:
* [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
* [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
* side-effect.
*
*/
public nl.topicus.jdbc.shaded.com.google.spanner.v1.Transaction beginTransaction(nl.topicus.jdbc.shaded.com.google.spanner.v1.BeginTransactionRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_BEGIN_TRANSACTION, getCallOptions(), request);
}
/**
*
* Commits a transaction. The request includes the mutations to be
* applied to rows in the database.
* `Commit` might return an `ABORTED` error. This can occur at any time;
* commonly, the cause is conflicts with concurrent
* transactions. However, it can also happen for a variety of other
* reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
* the transaction from the beginning, re-using the same session.
*
*/
public nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitResponse commit(nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_COMMIT, getCallOptions(), request);
}
/**
*
* Rolls back a transaction, releasing any locks it holds. It is a good
* idea to call this for any transaction that includes one or more
* [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and
* ultimately decides not to commit.
* `Rollback` returns `OK` if it successfully aborts the transaction, the
* transaction was already aborted, or the transaction is not
* found. `Rollback` never returns `ABORTED`.
*
*/
public nl.topicus.jdbc.shaded.com.google.protobuf.Empty rollback(nl.topicus.jdbc.shaded.com.google.spanner.v1.RollbackRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_ROLLBACK, getCallOptions(), request);
}
}
/**
*
* Cloud Spanner API
* The Cloud Spanner API can be used to manage sessions and execute
* transactions on data stored in Cloud Spanner databases.
*
*/
public static final class SpannerFutureStub extends nl.topicus.jdbc.shaded.io.grpc.stub.AbstractStub {
private SpannerFutureStub(nl.topicus.jdbc.shaded.io.grpc.Channel channel) {
super(channel);
}
private SpannerFutureStub(nl.topicus.jdbc.shaded.io.grpc.Channel channel,
nl.topicus.jdbc.shaded.io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SpannerFutureStub build(nl.topicus.jdbc.shaded.io.grpc.Channel channel,
nl.topicus.jdbc.shaded.io.grpc.CallOptions callOptions) {
return new SpannerFutureStub(channel, callOptions);
}
/**
*
* Creates a new session. A session can be used to perform
* transactions that read and/or modify data in a Cloud Spanner database.
* Sessions are meant to be reused for many consecutive
* transactions.
* Sessions can only execute one transaction at a time. To execute
* multiple concurrent read-write/write-only transactions, create
* multiple sessions. Note that standalone reads and queries use a
* transaction internally, and count toward the one transaction
* limit.
* Cloud Spanner limits the number of sessions that can exist at any given
* time; thus, it is a good idea to delete idle and/or unneeded sessions.
* Aside from explicit deletes, Cloud Spanner can delete sessions for which no
* operations are sent for more than an hour. If a session is deleted,
* requests to it return `NOT_FOUND`.
* Idle sessions can be kept alive by sending a trivial SQL query
* periodically, e.g., `"SELECT 1"`.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture createSession(
nl.topicus.jdbc.shaded.com.google.spanner.v1.CreateSessionRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_CREATE_SESSION, getCallOptions()), request);
}
/**
*
* Gets a session. Returns `NOT_FOUND` if the session does not exist.
* This is mainly useful for determining whether a session is still
* alive.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture getSession(
nl.topicus.jdbc.shaded.com.google.spanner.v1.GetSessionRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_GET_SESSION, getCallOptions()), request);
}
/**
*
* Lists all sessions in a given database.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture listSessions(
nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_LIST_SESSIONS, getCallOptions()), request);
}
/**
*
* Ends a session, releasing server resources associated with it.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture deleteSession(
nl.topicus.jdbc.shaded.com.google.spanner.v1.DeleteSessionRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_DELETE_SESSION, getCallOptions()), request);
}
/**
*
* Executes an SQL query, returning all rows in a single reply. This
* method cannot be used to return a result set larger than 10 MiB;
* if the query yields more data than that, the query fails with
* a `FAILED_PRECONDITION` error.
* Queries inside read-write transactions might return `ABORTED`. If
* this occurs, the application should restart the transaction from
* the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
* Larger result sets can be fetched in streaming fashion by calling
* [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture executeSql(
nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_EXECUTE_SQL, getCallOptions()), request);
}
/**
*
* Reads rows from the database using key lookups and scans, as a
* simple key/value style alternative to
* [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be used to
* return a result set larger than 10 MiB; if the read matches more
* data than that, the read fails with a `FAILED_PRECONDITION`
* error.
* Reads inside read-write transactions might return `ABORTED`. If
* this occurs, the application should restart the transaction from
* the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
* Larger result sets can be yielded in streaming fashion by calling
* [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture read(
nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_READ, getCallOptions()), request);
}
/**
*
* Begins a new transaction. This step can often be skipped:
* [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
* [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
* side-effect.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture beginTransaction(
nl.topicus.jdbc.shaded.com.google.spanner.v1.BeginTransactionRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_BEGIN_TRANSACTION, getCallOptions()), request);
}
/**
*
* Commits a transaction. The request includes the mutations to be
* applied to rows in the database.
* `Commit` might return an `ABORTED` error. This can occur at any time;
* commonly, the cause is conflicts with concurrent
* transactions. However, it can also happen for a variety of other
* reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
* the transaction from the beginning, re-using the same session.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture commit(
nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_COMMIT, getCallOptions()), request);
}
/**
*
* Rolls back a transaction, releasing any locks it holds. It is a good
* idea to call this for any transaction that includes one or more
* [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and
* ultimately decides not to commit.
* `Rollback` returns `OK` if it successfully aborts the transaction, the
* transaction was already aborted, or the transaction is not
* found. `Rollback` never returns `ABORTED`.
*
*/
public nl.topicus.jdbc.shaded.com.google.common.util.concurrent.ListenableFuture rollback(
nl.topicus.jdbc.shaded.com.google.spanner.v1.RollbackRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_ROLLBACK, getCallOptions()), request);
}
}
private static final int METHODID_CREATE_SESSION = 0;
private static final int METHODID_GET_SESSION = 1;
private static final int METHODID_LIST_SESSIONS = 2;
private static final int METHODID_DELETE_SESSION = 3;
private static final int METHODID_EXECUTE_SQL = 4;
private static final int METHODID_EXECUTE_STREAMING_SQL = 5;
private static final int METHODID_READ = 6;
private static final int METHODID_STREAMING_READ = 7;
private static final int METHODID_BEGIN_TRANSACTION = 8;
private static final int METHODID_COMMIT = 9;
private static final int METHODID_ROLLBACK = 10;
private static final class MethodHandlers implements
nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.UnaryMethod,
nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.ServerStreamingMethod,
nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.ClientStreamingMethod,
nl.topicus.jdbc.shaded.io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final SpannerImplBase serviceImpl;
private final int methodId;
MethodHandlers(SpannerImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_CREATE_SESSION:
serviceImpl.createSession((nl.topicus.jdbc.shaded.com.google.spanner.v1.CreateSessionRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_SESSION:
serviceImpl.getSession((nl.topicus.jdbc.shaded.com.google.spanner.v1.GetSessionRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST_SESSIONS:
serviceImpl.listSessions((nl.topicus.jdbc.shaded.com.google.spanner.v1.ListSessionsRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_SESSION:
serviceImpl.deleteSession((nl.topicus.jdbc.shaded.com.google.spanner.v1.DeleteSessionRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXECUTE_SQL:
serviceImpl.executeSql((nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXECUTE_STREAMING_SQL:
serviceImpl.executeStreamingSql((nl.topicus.jdbc.shaded.com.google.spanner.v1.ExecuteSqlRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_READ:
serviceImpl.read((nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_STREAMING_READ:
serviceImpl.streamingRead((nl.topicus.jdbc.shaded.com.google.spanner.v1.ReadRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_BEGIN_TRANSACTION:
serviceImpl.beginTransaction((nl.topicus.jdbc.shaded.com.google.spanner.v1.BeginTransactionRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_COMMIT:
serviceImpl.commit((nl.topicus.jdbc.shaded.com.google.spanner.v1.CommitRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_ROLLBACK:
serviceImpl.rollback((nl.topicus.jdbc.shaded.com.google.spanner.v1.RollbackRequest) request,
(nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver invoke(
nl.topicus.jdbc.shaded.io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static final class SpannerDescriptorSupplier implements nl.topicus.jdbc.shaded.io.grpc.protobuf.ProtoFileDescriptorSupplier {
@java.lang.Override
public nl.topicus.jdbc.shaded.com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return nl.topicus.jdbc.shaded.com.google.spanner.v1.SpannerProto.getDescriptor();
}
}
private static volatile nl.topicus.jdbc.shaded.io.grpc.ServiceDescriptor serviceDescriptor;
public static nl.topicus.jdbc.shaded.io.grpc.ServiceDescriptor getServiceDescriptor() {
nl.topicus.jdbc.shaded.io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (SpannerGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = nl.topicus.jdbc.shaded.io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new SpannerDescriptorSupplier())
.addMethod(METHOD_CREATE_SESSION)
.addMethod(METHOD_GET_SESSION)
.addMethod(METHOD_LIST_SESSIONS)
.addMethod(METHOD_DELETE_SESSION)
.addMethod(METHOD_EXECUTE_SQL)
.addMethod(METHOD_EXECUTE_STREAMING_SQL)
.addMethod(METHOD_READ)
.addMethod(METHOD_STREAMING_READ)
.addMethod(METHOD_BEGIN_TRANSACTION)
.addMethod(METHOD_COMMIT)
.addMethod(METHOD_ROLLBACK)
.build();
}
}
}
return result;
}
}