From a5d289fcc40197d0e2fbb6878ae708d949dc9c16 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Thu, 21 Dec 2023 16:29:52 +0900 Subject: [PATCH] Backport to branch(3.9) : Bump com.azure:azure-cosmos from 4.44.0 to 4.53.1 (#1405) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 4 +- .../db/rpc/DistributedStorageAdminGrpc.java | 233 +++++++------ .../scalar/db/rpc/DistributedStorageGrpc.java | 89 +++-- .../rpc/DistributedTransactionAdminGrpc.java | 313 +++++++++--------- .../db/rpc/DistributedTransactionGrpc.java | 105 +++--- .../db/rpc/TwoPhaseCommitTransactionGrpc.java | 105 +++--- 6 files changed, 467 insertions(+), 382 deletions(-) diff --git a/build.gradle b/build.gradle index 7b597970e6..dc10d80d99 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ subprojects { guavaVersion = '32.1.1-jre' slf4jVersion = '1.7.36' cassandraDriverVersion = '3.11.3' - azureCosmosVersion = '4.44.0' + azureCosmosVersion = '4.53.1' jooqVersion = '3.14.16' awssdkVersion = '2.20.54' commonsDbcp2Version = '2.9.0' @@ -33,7 +33,7 @@ subprojects { oracleDriverVersion = '21.9.0.0' sqlserverDriverVersion = '11.2.3.jre8' sqliteDriverVersion = '3.42.0.0' - grpcVersion = '1.53.0' + grpcVersion = '1.60.0' protobufVersion = '3.21.12' annotationVersion = '1.3.2' picocliVersion = '4.7.3' diff --git a/rpc/src/main/grpc/com/scalar/db/rpc/DistributedStorageAdminGrpc.java b/rpc/src/main/grpc/com/scalar/db/rpc/DistributedStorageAdminGrpc.java index 1e4a6c306b..a86944ba19 100644 --- a/rpc/src/main/grpc/com/scalar/db/rpc/DistributedStorageAdminGrpc.java +++ b/rpc/src/main/grpc/com/scalar/db/rpc/DistributedStorageAdminGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.53.0)", + value = "by gRPC proto compiler (version 1.60.0)", comments = "Source: scalardb.proto") @io.grpc.stub.annotations.GrpcGenerated public final class DistributedStorageAdminGrpc { private DistributedStorageAdminGrpc() {} - public static final String SERVICE_NAME = "rpc.DistributedStorageAdmin"; + public static final java.lang.String SERVICE_NAME = "rpc.DistributedStorageAdmin"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNamespaceMethod(), responseObserver); } /** */ - public void dropNamespace(com.scalar.db.rpc.DropNamespaceRequest request, + default void dropNamespace(com.scalar.db.rpc.DropNamespaceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropNamespaceMethod(), responseObserver); } /** */ - public void createTable(com.scalar.db.rpc.CreateTableRequest request, + default void createTable(com.scalar.db.rpc.CreateTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTableMethod(), responseObserver); } /** */ - public void dropTable(com.scalar.db.rpc.DropTableRequest request, + default void dropTable(com.scalar.db.rpc.DropTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropTableMethod(), responseObserver); } /** */ - public void truncateTable(com.scalar.db.rpc.TruncateTableRequest request, + default void truncateTable(com.scalar.db.rpc.TruncateTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTruncateTableMethod(), responseObserver); } /** */ - public void createIndex(com.scalar.db.rpc.CreateIndexRequest request, + default void createIndex(com.scalar.db.rpc.CreateIndexRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateIndexMethod(), responseObserver); } /** */ - public void dropIndex(com.scalar.db.rpc.DropIndexRequest request, + default void dropIndex(com.scalar.db.rpc.DropIndexRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropIndexMethod(), responseObserver); } /** */ - public void getTableMetadata(com.scalar.db.rpc.GetTableMetadataRequest request, + default void getTableMetadata(com.scalar.db.rpc.GetTableMetadataRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTableMetadataMethod(), responseObserver); } /** */ - public void getNamespaceTableNames(com.scalar.db.rpc.GetNamespaceTableNamesRequest request, + default void getNamespaceTableNames(com.scalar.db.rpc.GetNamespaceTableNamesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNamespaceTableNamesMethod(), responseObserver); } /** */ - public void namespaceExists(com.scalar.db.rpc.NamespaceExistsRequest request, + default void namespaceExists(com.scalar.db.rpc.NamespaceExistsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getNamespaceExistsMethod(), responseObserver); } /** */ - public void repairTable(com.scalar.db.rpc.RepairTableRequest request, + default void repairTable(com.scalar.db.rpc.RepairTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRepairTableMethod(), responseObserver); } /** */ - public void addNewColumnToTable(com.scalar.db.rpc.AddNewColumnToTableRequest request, + default void addNewColumnToTable(com.scalar.db.rpc.AddNewColumnToTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddNewColumnToTableMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service DistributedStorageAdmin. + */ + public static abstract class DistributedStorageAdminImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateNamespaceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.CreateNamespaceRequest, - com.google.protobuf.Empty>( - this, METHODID_CREATE_NAMESPACE))) - .addMethod( - getDropNamespaceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.DropNamespaceRequest, - com.google.protobuf.Empty>( - this, METHODID_DROP_NAMESPACE))) - .addMethod( - getCreateTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.CreateTableRequest, - com.google.protobuf.Empty>( - this, METHODID_CREATE_TABLE))) - .addMethod( - getDropTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.DropTableRequest, - com.google.protobuf.Empty>( - this, METHODID_DROP_TABLE))) - .addMethod( - getTruncateTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.TruncateTableRequest, - com.google.protobuf.Empty>( - this, METHODID_TRUNCATE_TABLE))) - .addMethod( - getCreateIndexMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.CreateIndexRequest, - com.google.protobuf.Empty>( - this, METHODID_CREATE_INDEX))) - .addMethod( - getDropIndexMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.DropIndexRequest, - com.google.protobuf.Empty>( - this, METHODID_DROP_INDEX))) - .addMethod( - getGetTableMetadataMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.GetTableMetadataRequest, - com.scalar.db.rpc.GetTableMetadataResponse>( - this, METHODID_GET_TABLE_METADATA))) - .addMethod( - getGetNamespaceTableNamesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.GetNamespaceTableNamesRequest, - com.scalar.db.rpc.GetNamespaceTableNamesResponse>( - this, METHODID_GET_NAMESPACE_TABLE_NAMES))) - .addMethod( - getNamespaceExistsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.NamespaceExistsRequest, - com.scalar.db.rpc.NamespaceExistsResponse>( - this, METHODID_NAMESPACE_EXISTS))) - .addMethod( - getRepairTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.RepairTableRequest, - com.google.protobuf.Empty>( - this, METHODID_REPAIR_TABLE))) - .addMethod( - getAddNewColumnToTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.AddNewColumnToTableRequest, - com.google.protobuf.Empty>( - this, METHODID_ADD_NEW_COLUMN_TO_TABLE))) - .build(); + return DistributedStorageAdminGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service DistributedStorageAdmin. */ - public static final class DistributedStorageAdminStub extends io.grpc.stub.AbstractAsyncStub { + public static final class DistributedStorageAdminStub + extends io.grpc.stub.AbstractAsyncStub { private DistributedStorageAdminStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -721,8 +645,10 @@ public void addNewColumnToTable(com.scalar.db.rpc.AddNewColumnToTableRequest req } /** + * A stub to allow clients to do synchronous rpc calls to service DistributedStorageAdmin. */ - public static final class DistributedStorageAdminBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class DistributedStorageAdminBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private DistributedStorageAdminBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -820,8 +746,10 @@ public com.google.protobuf.Empty addNewColumnToTable(com.scalar.db.rpc.AddNewCol } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DistributedStorageAdmin. */ - public static final class DistributedStorageAdminFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class DistributedStorageAdminFutureStub + extends io.grpc.stub.AbstractFutureStub { private DistributedStorageAdminFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -948,10 +876,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final DistributedStorageAdminImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(DistributedStorageAdminImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -1024,6 +952,95 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateNamespaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.CreateNamespaceRequest, + com.google.protobuf.Empty>( + service, METHODID_CREATE_NAMESPACE))) + .addMethod( + getDropNamespaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.DropNamespaceRequest, + com.google.protobuf.Empty>( + service, METHODID_DROP_NAMESPACE))) + .addMethod( + getCreateTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.CreateTableRequest, + com.google.protobuf.Empty>( + service, METHODID_CREATE_TABLE))) + .addMethod( + getDropTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.DropTableRequest, + com.google.protobuf.Empty>( + service, METHODID_DROP_TABLE))) + .addMethod( + getTruncateTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.TruncateTableRequest, + com.google.protobuf.Empty>( + service, METHODID_TRUNCATE_TABLE))) + .addMethod( + getCreateIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.CreateIndexRequest, + com.google.protobuf.Empty>( + service, METHODID_CREATE_INDEX))) + .addMethod( + getDropIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.DropIndexRequest, + com.google.protobuf.Empty>( + service, METHODID_DROP_INDEX))) + .addMethod( + getGetTableMetadataMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.GetTableMetadataRequest, + com.scalar.db.rpc.GetTableMetadataResponse>( + service, METHODID_GET_TABLE_METADATA))) + .addMethod( + getGetNamespaceTableNamesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.GetNamespaceTableNamesRequest, + com.scalar.db.rpc.GetNamespaceTableNamesResponse>( + service, METHODID_GET_NAMESPACE_TABLE_NAMES))) + .addMethod( + getNamespaceExistsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.NamespaceExistsRequest, + com.scalar.db.rpc.NamespaceExistsResponse>( + service, METHODID_NAMESPACE_EXISTS))) + .addMethod( + getRepairTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.RepairTableRequest, + com.google.protobuf.Empty>( + service, METHODID_REPAIR_TABLE))) + .addMethod( + getAddNewColumnToTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.AddNewColumnToTableRequest, + com.google.protobuf.Empty>( + service, METHODID_ADD_NEW_COLUMN_TO_TABLE))) + .build(); + } + private static abstract class DistributedStorageAdminBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DistributedStorageAdminBaseDescriptorSupplier() {} @@ -1047,9 +1064,9 @@ private static final class DistributedStorageAdminFileDescriptorSupplier private static final class DistributedStorageAdminMethodDescriptorSupplier extends DistributedStorageAdminBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - DistributedStorageAdminMethodDescriptorSupplier(String methodName) { + DistributedStorageAdminMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/rpc/src/main/grpc/com/scalar/db/rpc/DistributedStorageGrpc.java b/rpc/src/main/grpc/com/scalar/db/rpc/DistributedStorageGrpc.java index 5634538258..8df02ea8e4 100644 --- a/rpc/src/main/grpc/com/scalar/db/rpc/DistributedStorageGrpc.java +++ b/rpc/src/main/grpc/com/scalar/db/rpc/DistributedStorageGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.53.0)", + value = "by gRPC proto compiler (version 1.60.0)", comments = "Source: scalardb.proto") @io.grpc.stub.annotations.GrpcGenerated public final class DistributedStorageGrpc { private DistributedStorageGrpc() {} - public static final String SERVICE_NAME = "rpc.DistributedStorage"; + public static final java.lang.String SERVICE_NAME = "rpc.DistributedStorage"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMethod(), responseObserver); } /** */ - public io.grpc.stub.StreamObserver scan( + default io.grpc.stub.StreamObserver scan( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getScanMethod(), responseObserver); } /** */ - public void mutate(com.scalar.db.rpc.MutateRequest request, + default void mutate(com.scalar.db.rpc.MutateRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMutateMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service DistributedStorage. + */ + public static abstract class DistributedStorageImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.GetRequest, - com.scalar.db.rpc.GetResponse>( - this, METHODID_GET))) - .addMethod( - getScanMethod(), - io.grpc.stub.ServerCalls.asyncBidiStreamingCall( - new MethodHandlers< - com.scalar.db.rpc.ScanRequest, - com.scalar.db.rpc.ScanResponse>( - this, METHODID_SCAN))) - .addMethod( - getMutateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.MutateRequest, - com.google.protobuf.Empty>( - this, METHODID_MUTATE))) - .build(); + return DistributedStorageGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service DistributedStorage. */ - public static final class DistributedStorageStub extends io.grpc.stub.AbstractAsyncStub { + public static final class DistributedStorageStub + extends io.grpc.stub.AbstractAsyncStub { private DistributedStorageStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -244,8 +231,10 @@ public void mutate(com.scalar.db.rpc.MutateRequest request, } /** + * A stub to allow clients to do synchronous rpc calls to service DistributedStorage. */ - public static final class DistributedStorageBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class DistributedStorageBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private DistributedStorageBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -273,8 +262,10 @@ public com.google.protobuf.Empty mutate(com.scalar.db.rpc.MutateRequest request) } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DistributedStorage. */ - public static final class DistributedStorageFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class DistributedStorageFutureStub + extends io.grpc.stub.AbstractFutureStub { private DistributedStorageFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -312,10 +303,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final DistributedStorageImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(DistributedStorageImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -351,6 +342,32 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.GetRequest, + com.scalar.db.rpc.GetResponse>( + service, METHODID_GET))) + .addMethod( + getScanMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.scalar.db.rpc.ScanRequest, + com.scalar.db.rpc.ScanResponse>( + service, METHODID_SCAN))) + .addMethod( + getMutateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.MutateRequest, + com.google.protobuf.Empty>( + service, METHODID_MUTATE))) + .build(); + } + private static abstract class DistributedStorageBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DistributedStorageBaseDescriptorSupplier() {} @@ -374,9 +391,9 @@ private static final class DistributedStorageFileDescriptorSupplier private static final class DistributedStorageMethodDescriptorSupplier extends DistributedStorageBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - DistributedStorageMethodDescriptorSupplier(String methodName) { + DistributedStorageMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/rpc/src/main/grpc/com/scalar/db/rpc/DistributedTransactionAdminGrpc.java b/rpc/src/main/grpc/com/scalar/db/rpc/DistributedTransactionAdminGrpc.java index 16aa70fd52..afed6caead 100644 --- a/rpc/src/main/grpc/com/scalar/db/rpc/DistributedTransactionAdminGrpc.java +++ b/rpc/src/main/grpc/com/scalar/db/rpc/DistributedTransactionAdminGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.53.0)", + value = "by gRPC proto compiler (version 1.60.0)", comments = "Source: scalardb.proto") @io.grpc.stub.annotations.GrpcGenerated public final class DistributedTransactionAdminGrpc { private DistributedTransactionAdminGrpc() {} - public static final String SERVICE_NAME = "rpc.DistributedTransactionAdmin"; + public static final java.lang.String SERVICE_NAME = "rpc.DistributedTransactionAdmin"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNamespaceMethod(), responseObserver); } /** */ - public void dropNamespace(com.scalar.db.rpc.DropNamespaceRequest request, + default void dropNamespace(com.scalar.db.rpc.DropNamespaceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropNamespaceMethod(), responseObserver); } /** */ - public void createTable(com.scalar.db.rpc.CreateTableRequest request, + default void createTable(com.scalar.db.rpc.CreateTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTableMethod(), responseObserver); } /** */ - public void dropTable(com.scalar.db.rpc.DropTableRequest request, + default void dropTable(com.scalar.db.rpc.DropTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropTableMethod(), responseObserver); } /** */ - public void truncateTable(com.scalar.db.rpc.TruncateTableRequest request, + default void truncateTable(com.scalar.db.rpc.TruncateTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTruncateTableMethod(), responseObserver); } /** */ - public void createIndex(com.scalar.db.rpc.CreateIndexRequest request, + default void createIndex(com.scalar.db.rpc.CreateIndexRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateIndexMethod(), responseObserver); } /** */ - public void dropIndex(com.scalar.db.rpc.DropIndexRequest request, + default void dropIndex(com.scalar.db.rpc.DropIndexRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropIndexMethod(), responseObserver); } /** */ - public void getTableMetadata(com.scalar.db.rpc.GetTableMetadataRequest request, + default void getTableMetadata(com.scalar.db.rpc.GetTableMetadataRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTableMetadataMethod(), responseObserver); } /** */ - public void getNamespaceTableNames(com.scalar.db.rpc.GetNamespaceTableNamesRequest request, + default void getNamespaceTableNames(com.scalar.db.rpc.GetNamespaceTableNamesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNamespaceTableNamesMethod(), responseObserver); } /** */ - public void namespaceExists(com.scalar.db.rpc.NamespaceExistsRequest request, + default void namespaceExists(com.scalar.db.rpc.NamespaceExistsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getNamespaceExistsMethod(), responseObserver); } /** */ - public void createCoordinatorTables(com.scalar.db.rpc.CreateCoordinatorTablesRequest request, + default void createCoordinatorTables(com.scalar.db.rpc.CreateCoordinatorTablesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateCoordinatorTablesMethod(), responseObserver); } /** */ - public void dropCoordinatorTables(com.scalar.db.rpc.DropCoordinatorTablesRequest request, + default void dropCoordinatorTables(com.scalar.db.rpc.DropCoordinatorTablesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropCoordinatorTablesMethod(), responseObserver); } /** */ - public void truncateCoordinatorTables(com.scalar.db.rpc.TruncateCoordinatorTablesRequest request, + default void truncateCoordinatorTables(com.scalar.db.rpc.TruncateCoordinatorTablesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTruncateCoordinatorTablesMethod(), responseObserver); } /** */ - public void coordinatorTablesExist(com.scalar.db.rpc.CoordinatorTablesExistRequest request, + default void coordinatorTablesExist(com.scalar.db.rpc.CoordinatorTablesExistRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCoordinatorTablesExistMethod(), responseObserver); } /** */ - public void repairTable(com.scalar.db.rpc.RepairTableRequest request, + default void repairTable(com.scalar.db.rpc.RepairTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRepairTableMethod(), responseObserver); } /** */ - public void repairCoordinatorTables(com.scalar.db.rpc.RepairCoordinatorTablesRequest request, + default void repairCoordinatorTables(com.scalar.db.rpc.RepairCoordinatorTablesRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRepairCoordinatorTablesMethod(), responseObserver); } /** */ - public void addNewColumnToTable(com.scalar.db.rpc.AddNewColumnToTableRequest request, + default void addNewColumnToTable(com.scalar.db.rpc.AddNewColumnToTableRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddNewColumnToTableMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service DistributedTransactionAdmin. + */ + public static abstract class DistributedTransactionAdminImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateNamespaceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.CreateNamespaceRequest, - com.google.protobuf.Empty>( - this, METHODID_CREATE_NAMESPACE))) - .addMethod( - getDropNamespaceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.DropNamespaceRequest, - com.google.protobuf.Empty>( - this, METHODID_DROP_NAMESPACE))) - .addMethod( - getCreateTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.CreateTableRequest, - com.google.protobuf.Empty>( - this, METHODID_CREATE_TABLE))) - .addMethod( - getDropTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.DropTableRequest, - com.google.protobuf.Empty>( - this, METHODID_DROP_TABLE))) - .addMethod( - getTruncateTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.TruncateTableRequest, - com.google.protobuf.Empty>( - this, METHODID_TRUNCATE_TABLE))) - .addMethod( - getCreateIndexMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.CreateIndexRequest, - com.google.protobuf.Empty>( - this, METHODID_CREATE_INDEX))) - .addMethod( - getDropIndexMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.DropIndexRequest, - com.google.protobuf.Empty>( - this, METHODID_DROP_INDEX))) - .addMethod( - getGetTableMetadataMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.GetTableMetadataRequest, - com.scalar.db.rpc.GetTableMetadataResponse>( - this, METHODID_GET_TABLE_METADATA))) - .addMethod( - getGetNamespaceTableNamesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.GetNamespaceTableNamesRequest, - com.scalar.db.rpc.GetNamespaceTableNamesResponse>( - this, METHODID_GET_NAMESPACE_TABLE_NAMES))) - .addMethod( - getNamespaceExistsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.NamespaceExistsRequest, - com.scalar.db.rpc.NamespaceExistsResponse>( - this, METHODID_NAMESPACE_EXISTS))) - .addMethod( - getCreateCoordinatorTablesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.CreateCoordinatorTablesRequest, - com.google.protobuf.Empty>( - this, METHODID_CREATE_COORDINATOR_TABLES))) - .addMethod( - getDropCoordinatorTablesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.DropCoordinatorTablesRequest, - com.google.protobuf.Empty>( - this, METHODID_DROP_COORDINATOR_TABLES))) - .addMethod( - getTruncateCoordinatorTablesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.TruncateCoordinatorTablesRequest, - com.google.protobuf.Empty>( - this, METHODID_TRUNCATE_COORDINATOR_TABLES))) - .addMethod( - getCoordinatorTablesExistMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.CoordinatorTablesExistRequest, - com.scalar.db.rpc.CoordinatorTablesExistResponse>( - this, METHODID_COORDINATOR_TABLES_EXIST))) - .addMethod( - getRepairTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.RepairTableRequest, - com.google.protobuf.Empty>( - this, METHODID_REPAIR_TABLE))) - .addMethod( - getRepairCoordinatorTablesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.RepairCoordinatorTablesRequest, - com.google.protobuf.Empty>( - this, METHODID_REPAIR_COORDINATOR_TABLES))) - .addMethod( - getAddNewColumnToTableMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.AddNewColumnToTableRequest, - com.google.protobuf.Empty>( - this, METHODID_ADD_NEW_COLUMN_TO_TABLE))) - .build(); + return DistributedTransactionAdminGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service DistributedTransactionAdmin. */ - public static final class DistributedTransactionAdminStub extends io.grpc.stub.AbstractAsyncStub { + public static final class DistributedTransactionAdminStub + extends io.grpc.stub.AbstractAsyncStub { private DistributedTransactionAdminStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -986,8 +875,10 @@ public void addNewColumnToTable(com.scalar.db.rpc.AddNewColumnToTableRequest req } /** + * A stub to allow clients to do synchronous rpc calls to service DistributedTransactionAdmin. */ - public static final class DistributedTransactionAdminBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class DistributedTransactionAdminBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private DistributedTransactionAdminBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -1120,8 +1011,10 @@ public com.google.protobuf.Empty addNewColumnToTable(com.scalar.db.rpc.AddNewCol } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DistributedTransactionAdmin. */ - public static final class DistributedTransactionAdminFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class DistributedTransactionAdminFutureStub + extends io.grpc.stub.AbstractFutureStub { private DistributedTransactionAdminFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -1293,10 +1186,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final DistributedTransactionAdminImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(DistributedTransactionAdminImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -1389,6 +1282,130 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateNamespaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.CreateNamespaceRequest, + com.google.protobuf.Empty>( + service, METHODID_CREATE_NAMESPACE))) + .addMethod( + getDropNamespaceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.DropNamespaceRequest, + com.google.protobuf.Empty>( + service, METHODID_DROP_NAMESPACE))) + .addMethod( + getCreateTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.CreateTableRequest, + com.google.protobuf.Empty>( + service, METHODID_CREATE_TABLE))) + .addMethod( + getDropTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.DropTableRequest, + com.google.protobuf.Empty>( + service, METHODID_DROP_TABLE))) + .addMethod( + getTruncateTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.TruncateTableRequest, + com.google.protobuf.Empty>( + service, METHODID_TRUNCATE_TABLE))) + .addMethod( + getCreateIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.CreateIndexRequest, + com.google.protobuf.Empty>( + service, METHODID_CREATE_INDEX))) + .addMethod( + getDropIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.DropIndexRequest, + com.google.protobuf.Empty>( + service, METHODID_DROP_INDEX))) + .addMethod( + getGetTableMetadataMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.GetTableMetadataRequest, + com.scalar.db.rpc.GetTableMetadataResponse>( + service, METHODID_GET_TABLE_METADATA))) + .addMethod( + getGetNamespaceTableNamesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.GetNamespaceTableNamesRequest, + com.scalar.db.rpc.GetNamespaceTableNamesResponse>( + service, METHODID_GET_NAMESPACE_TABLE_NAMES))) + .addMethod( + getNamespaceExistsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.NamespaceExistsRequest, + com.scalar.db.rpc.NamespaceExistsResponse>( + service, METHODID_NAMESPACE_EXISTS))) + .addMethod( + getCreateCoordinatorTablesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.CreateCoordinatorTablesRequest, + com.google.protobuf.Empty>( + service, METHODID_CREATE_COORDINATOR_TABLES))) + .addMethod( + getDropCoordinatorTablesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.DropCoordinatorTablesRequest, + com.google.protobuf.Empty>( + service, METHODID_DROP_COORDINATOR_TABLES))) + .addMethod( + getTruncateCoordinatorTablesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.TruncateCoordinatorTablesRequest, + com.google.protobuf.Empty>( + service, METHODID_TRUNCATE_COORDINATOR_TABLES))) + .addMethod( + getCoordinatorTablesExistMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.CoordinatorTablesExistRequest, + com.scalar.db.rpc.CoordinatorTablesExistResponse>( + service, METHODID_COORDINATOR_TABLES_EXIST))) + .addMethod( + getRepairTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.RepairTableRequest, + com.google.protobuf.Empty>( + service, METHODID_REPAIR_TABLE))) + .addMethod( + getRepairCoordinatorTablesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.RepairCoordinatorTablesRequest, + com.google.protobuf.Empty>( + service, METHODID_REPAIR_COORDINATOR_TABLES))) + .addMethod( + getAddNewColumnToTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.AddNewColumnToTableRequest, + com.google.protobuf.Empty>( + service, METHODID_ADD_NEW_COLUMN_TO_TABLE))) + .build(); + } + private static abstract class DistributedTransactionAdminBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DistributedTransactionAdminBaseDescriptorSupplier() {} @@ -1412,9 +1429,9 @@ private static final class DistributedTransactionAdminFileDescriptorSupplier private static final class DistributedTransactionAdminMethodDescriptorSupplier extends DistributedTransactionAdminBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - DistributedTransactionAdminMethodDescriptorSupplier(String methodName) { + DistributedTransactionAdminMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/rpc/src/main/grpc/com/scalar/db/rpc/DistributedTransactionGrpc.java b/rpc/src/main/grpc/com/scalar/db/rpc/DistributedTransactionGrpc.java index bfd7d5011d..34c26b7644 100644 --- a/rpc/src/main/grpc/com/scalar/db/rpc/DistributedTransactionGrpc.java +++ b/rpc/src/main/grpc/com/scalar/db/rpc/DistributedTransactionGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.53.0)", + value = "by gRPC proto compiler (version 1.60.0)", comments = "Source: scalardb.proto") @io.grpc.stub.annotations.GrpcGenerated public final class DistributedTransactionGrpc { private DistributedTransactionGrpc() {} - public static final String SERVICE_NAME = "rpc.DistributedTransaction"; + public static final java.lang.String SERVICE_NAME = "rpc.DistributedTransaction"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor transaction( + default io.grpc.stub.StreamObserver transaction( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getTransactionMethod(), responseObserver); } /** */ - public void getState(com.scalar.db.rpc.GetTransactionStateRequest request, + default void getState(com.scalar.db.rpc.GetTransactionStateRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStateMethod(), responseObserver); } /** */ - public void rollback(com.scalar.db.rpc.RollbackRequest request, + default void rollback(com.scalar.db.rpc.RollbackRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackMethod(), responseObserver); } /** */ - public void abort(com.scalar.db.rpc.AbortRequest request, + default void abort(com.scalar.db.rpc.AbortRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAbortMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service DistributedTransaction. + */ + public static abstract class DistributedTransactionImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getTransactionMethod(), - io.grpc.stub.ServerCalls.asyncBidiStreamingCall( - new MethodHandlers< - com.scalar.db.rpc.TransactionRequest, - com.scalar.db.rpc.TransactionResponse>( - this, METHODID_TRANSACTION))) - .addMethod( - getGetStateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.GetTransactionStateRequest, - com.scalar.db.rpc.GetTransactionStateResponse>( - this, METHODID_GET_STATE))) - .addMethod( - getRollbackMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.RollbackRequest, - com.scalar.db.rpc.RollbackResponse>( - this, METHODID_ROLLBACK))) - .addMethod( - getAbortMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.AbortRequest, - com.scalar.db.rpc.AbortResponse>( - this, METHODID_ABORT))) - .build(); + return DistributedTransactionGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service DistributedTransaction. */ - public static final class DistributedTransactionStub extends io.grpc.stub.AbstractAsyncStub { + public static final class DistributedTransactionStub + extends io.grpc.stub.AbstractAsyncStub { private DistributedTransactionStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -297,8 +277,10 @@ public void abort(com.scalar.db.rpc.AbortRequest request, } /** + * A stub to allow clients to do synchronous rpc calls to service DistributedTransaction. */ - public static final class DistributedTransactionBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class DistributedTransactionBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private DistributedTransactionBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -333,8 +315,10 @@ public com.scalar.db.rpc.AbortResponse abort(com.scalar.db.rpc.AbortRequest requ } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DistributedTransaction. */ - public static final class DistributedTransactionFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class DistributedTransactionFutureStub + extends io.grpc.stub.AbstractFutureStub { private DistributedTransactionFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -381,10 +365,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final DistributedTransactionImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(DistributedTransactionImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -424,6 +408,39 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getTransactionMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.scalar.db.rpc.TransactionRequest, + com.scalar.db.rpc.TransactionResponse>( + service, METHODID_TRANSACTION))) + .addMethod( + getGetStateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.GetTransactionStateRequest, + com.scalar.db.rpc.GetTransactionStateResponse>( + service, METHODID_GET_STATE))) + .addMethod( + getRollbackMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.RollbackRequest, + com.scalar.db.rpc.RollbackResponse>( + service, METHODID_ROLLBACK))) + .addMethod( + getAbortMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.AbortRequest, + com.scalar.db.rpc.AbortResponse>( + service, METHODID_ABORT))) + .build(); + } + private static abstract class DistributedTransactionBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DistributedTransactionBaseDescriptorSupplier() {} @@ -447,9 +464,9 @@ private static final class DistributedTransactionFileDescriptorSupplier private static final class DistributedTransactionMethodDescriptorSupplier extends DistributedTransactionBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - DistributedTransactionMethodDescriptorSupplier(String methodName) { + DistributedTransactionMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/rpc/src/main/grpc/com/scalar/db/rpc/TwoPhaseCommitTransactionGrpc.java b/rpc/src/main/grpc/com/scalar/db/rpc/TwoPhaseCommitTransactionGrpc.java index 4b3b64d56c..a9995b54a7 100644 --- a/rpc/src/main/grpc/com/scalar/db/rpc/TwoPhaseCommitTransactionGrpc.java +++ b/rpc/src/main/grpc/com/scalar/db/rpc/TwoPhaseCommitTransactionGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.53.0)", + value = "by gRPC proto compiler (version 1.60.0)", comments = "Source: scalardb.proto") @io.grpc.stub.annotations.GrpcGenerated public final class TwoPhaseCommitTransactionGrpc { private TwoPhaseCommitTransactionGrpc() {} - public static final String SERVICE_NAME = "rpc.TwoPhaseCommitTransaction"; + public static final java.lang.String SERVICE_NAME = "rpc.TwoPhaseCommitTransaction"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor twoPhaseCommitTransaction( + default io.grpc.stub.StreamObserver twoPhaseCommitTransaction( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getTwoPhaseCommitTransactionMethod(), responseObserver); } /** */ - public void getState(com.scalar.db.rpc.GetTransactionStateRequest request, + default void getState(com.scalar.db.rpc.GetTransactionStateRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStateMethod(), responseObserver); } /** */ - public void rollback(com.scalar.db.rpc.RollbackRequest request, + default void rollback(com.scalar.db.rpc.RollbackRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRollbackMethod(), responseObserver); } /** */ - public void abort(com.scalar.db.rpc.AbortRequest request, + default void abort(com.scalar.db.rpc.AbortRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAbortMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service TwoPhaseCommitTransaction. + */ + public static abstract class TwoPhaseCommitTransactionImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getTwoPhaseCommitTransactionMethod(), - io.grpc.stub.ServerCalls.asyncBidiStreamingCall( - new MethodHandlers< - com.scalar.db.rpc.TwoPhaseCommitTransactionRequest, - com.scalar.db.rpc.TwoPhaseCommitTransactionResponse>( - this, METHODID_TWO_PHASE_COMMIT_TRANSACTION))) - .addMethod( - getGetStateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.GetTransactionStateRequest, - com.scalar.db.rpc.GetTransactionStateResponse>( - this, METHODID_GET_STATE))) - .addMethod( - getRollbackMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.RollbackRequest, - com.scalar.db.rpc.RollbackResponse>( - this, METHODID_ROLLBACK))) - .addMethod( - getAbortMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.scalar.db.rpc.AbortRequest, - com.scalar.db.rpc.AbortResponse>( - this, METHODID_ABORT))) - .build(); + return TwoPhaseCommitTransactionGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service TwoPhaseCommitTransaction. */ - public static final class TwoPhaseCommitTransactionStub extends io.grpc.stub.AbstractAsyncStub { + public static final class TwoPhaseCommitTransactionStub + extends io.grpc.stub.AbstractAsyncStub { private TwoPhaseCommitTransactionStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -297,8 +277,10 @@ public void abort(com.scalar.db.rpc.AbortRequest request, } /** + * A stub to allow clients to do synchronous rpc calls to service TwoPhaseCommitTransaction. */ - public static final class TwoPhaseCommitTransactionBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class TwoPhaseCommitTransactionBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private TwoPhaseCommitTransactionBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -333,8 +315,10 @@ public com.scalar.db.rpc.AbortResponse abort(com.scalar.db.rpc.AbortRequest requ } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service TwoPhaseCommitTransaction. */ - public static final class TwoPhaseCommitTransactionFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class TwoPhaseCommitTransactionFutureStub + extends io.grpc.stub.AbstractFutureStub { private TwoPhaseCommitTransactionFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -381,10 +365,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final TwoPhaseCommitTransactionImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(TwoPhaseCommitTransactionImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -424,6 +408,39 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getTwoPhaseCommitTransactionMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.scalar.db.rpc.TwoPhaseCommitTransactionRequest, + com.scalar.db.rpc.TwoPhaseCommitTransactionResponse>( + service, METHODID_TWO_PHASE_COMMIT_TRANSACTION))) + .addMethod( + getGetStateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.GetTransactionStateRequest, + com.scalar.db.rpc.GetTransactionStateResponse>( + service, METHODID_GET_STATE))) + .addMethod( + getRollbackMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.RollbackRequest, + com.scalar.db.rpc.RollbackResponse>( + service, METHODID_ROLLBACK))) + .addMethod( + getAbortMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.scalar.db.rpc.AbortRequest, + com.scalar.db.rpc.AbortResponse>( + service, METHODID_ABORT))) + .build(); + } + private static abstract class TwoPhaseCommitTransactionBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { TwoPhaseCommitTransactionBaseDescriptorSupplier() {} @@ -447,9 +464,9 @@ private static final class TwoPhaseCommitTransactionFileDescriptorSupplier private static final class TwoPhaseCommitTransactionMethodDescriptorSupplier extends TwoPhaseCommitTransactionBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - TwoPhaseCommitTransactionMethodDescriptorSupplier(String methodName) { + TwoPhaseCommitTransactionMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; }