From e96ea17ab6bbcc18a46b9ee9515ca278a37c75ad Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Wed, 14 Aug 2024 08:06:40 +0800 Subject: [PATCH 01/42] grpc protocol --- all/pom.xml | 7 - bom/pom.xml | 5 - .../seata/common/ConfigurationKeys.java | 2 + .../apache/seata/common/DefaultValues.java | 1 + core/pom.xml | 33 + .../apache/seata/core/protocol/Protocol.java | 16 + .../apache/seata/core/protocol/Version.java | 2 +- .../core/protocol/detector/Http2Detector.java | 51 + .../protocol/detector/ProtocolDetector.java | 10 + .../core/protocol/detector/SeataDetector.java | 39 + .../core/protocol/generated/GrpcMessage.java | 71 + .../protocol/generated/GrpcMessageProto.java | 1026 +++++++++++++ .../generated/GrpcMessageProtoOrBuilder.java | 72 + .../netty/AbstractNettyRemotingClient.java | 5 +- .../core/rpc/netty/NettyClientBootstrap.java | 51 +- .../core/rpc/netty/NettyClientConfig.java | 11 +- .../core/rpc/netty/NettyServerBootstrap.java | 22 +- .../core/rpc/netty/ProtocolDetectHandler.java | 46 + .../core/rpc/netty/grpc/GrpcDecoder.java | 79 + .../core/rpc/netty/grpc/GrpcEncoder.java | 70 + .../core/rpc/netty/grpc/GrpcHeaderEnum.java | 23 + .../serializer/SerializerServiceLoader.java | 2 +- .../serializer/protobuf/ProtobufHelper.java | 2 +- .../protobuf/ProtobufInnerSerializer.java | 2 +- .../protobuf/ProtobufSerializer.java | 6 +- .../BatchResultMessageConvertor.java | 10 +- .../BranchCommitRequestConvertor.java | 14 +- .../BranchCommitResponseConvertor.java | 20 +- .../BranchRegisterRequestConvertor.java | 12 +- .../BranchRegisterResponseConvertor.java | 16 +- .../BranchReportRequestConvertor.java | 14 +- .../BranchReportResponseConvertor.java | 16 +- .../BranchRollbackRequestConvertor.java | 14 +- .../BranchRollbackResponseConvertor.java | 20 +- .../GlobalBeginRequestConvertor.java | 10 +- .../GlobalBeginResponseConvertor.java | 16 +- .../GlobalCommitRequestConvertor.java | 12 +- .../GlobalCommitResponseConvertor.java | 20 +- .../GlobalLockQueryRequestConvertor.java | 14 +- .../GlobalLockQueryResponseConvertor.java | 16 +- .../GlobalReportRequestConvertor.java | 16 +- .../GlobalReportResponseConvertor.java | 20 +- .../GlobalRollbackRequestConvertor.java | 12 +- .../GlobalRollbackResponseConvertor.java | 20 +- .../GlobalStatusRequestConvertor.java | 12 +- .../GlobalStatusResponseConvertor.java | 20 +- .../convertor/HeartbeatMessageConvertor.java | 4 +- .../MergeResultMessageConvertor.java | 10 +- .../convertor/MergedWarpMessageConvertor.java | 10 +- .../protobuf/convertor/PbConvertor.java | 2 +- .../convertor/RegisterRMRequestConvertor.java | 10 +- .../RegisterRMResponseConvertor.java | 14 +- .../convertor/RegisterTMRequestConvertor.java | 10 +- .../RegisterTMResponseConvertor.java | 14 +- .../UndoLogDeleteRequestConvertor.java | 12 +- .../generated/AbstractBranchEndRequest.java | 62 + .../AbstractBranchEndRequestProto.java | 1317 +++++++++++++++++ ...bstractBranchEndRequestProtoOrBuilder.java | 112 ++ .../generated/AbstractBranchEndResponse.java | 61 + .../AbstractBranchEndResponseProto.java | 916 ++++++++++++ ...stractBranchEndResponseProtoOrBuilder.java | 53 + .../generated/AbstractGlobalEndRequest.java | 57 + .../AbstractGlobalEndRequestProto.java | 893 +++++++++++ ...bstractGlobalEndRequestProtoOrBuilder.java | 48 + .../generated/AbstractGlobalEndResponse.java | 60 + .../AbstractGlobalEndResponseProto.java | 713 +++++++++ ...stractGlobalEndResponseProtoOrBuilder.java | 35 + .../generated/AbstractIdentifyRequest.java | 57 + .../AbstractIdentifyRequestProto.java | 1169 +++++++++++++++ ...AbstractIdentifyRequestProtoOrBuilder.java | 72 + .../generated/AbstractIdentifyResponse.java | 57 + .../AbstractIdentifyResponseProto.java | 958 ++++++++++++ ...bstractIdentifyResponseProtoOrBuilder.java | 54 + .../protobuf/generated/AbstractMessage.java | 54 + .../generated/AbstractMessageProto.java | 525 +++++++ .../AbstractMessageProtoOrBuilder.java | 20 + .../generated/AbstractResultMessage.java | 59 + .../generated/AbstractResultMessageProto.java | 851 +++++++++++ .../AbstractResultMessageProtoOrBuilder.java | 47 + .../generated/AbstractTransactionRequest.java | 55 + .../AbstractTransactionRequestProto.java | 617 ++++++++ ...tractTransactionRequestProtoOrBuilder.java | 24 + .../AbstractTransactionResponse.java | 61 + .../AbstractTransactionResponseProto.java | 713 +++++++++ ...ractTransactionResponseProtoOrBuilder.java | 35 + .../generated/BatchResultMessage.java | 59 + .../generated/BatchResultMessageProto.java | 1145 ++++++++++++++ .../BatchResultMessageProtoOrBuilder.java | 65 + .../generated/BranchCommitRequest.java | 55 + .../generated/BranchCommitRequestProto.java | 617 ++++++++ .../BranchCommitRequestProtoOrBuilder.java | 24 + .../generated/BranchCommitResponse.java | 55 + .../generated/BranchCommitResponseProto.java | 617 ++++++++ .../BranchCommitResponseProtoOrBuilder.java | 24 + .../generated/BranchRegisterRequest.java | 62 + .../generated/BranchRegisterRequestProto.java | 1265 ++++++++++++++++ .../BranchRegisterRequestProtoOrBuilder.java | 83 ++ .../generated/BranchRegisterResponse.java | 56 + .../BranchRegisterResponseProto.java | 682 +++++++++ .../BranchRegisterResponseProtoOrBuilder.java | 30 + .../generated/BranchReportRequest.java | 66 + .../generated/BranchReportRequestProto.java | 1280 ++++++++++++++++ .../BranchReportRequestProtoOrBuilder.java | 88 ++ .../generated/BranchReportResponse.java | 56 + .../generated/BranchReportResponseProto.java | 609 ++++++++ .../BranchReportResponseProtoOrBuilder.java | 24 + .../generated/BranchRollbackRequest.java | 55 + .../generated/BranchRollbackRequestProto.java | 617 ++++++++ .../BranchRollbackRequestProtoOrBuilder.java | 24 + .../generated/BranchRollbackResponse.java | 56 + .../BranchRollbackResponseProto.java | 617 ++++++++ .../BranchRollbackResponseProtoOrBuilder.java | 24 + .../protobuf/generated/BranchStatus.java | 46 + .../protobuf/generated/BranchStatusProto.java | 303 ++++ .../protobuf/generated/BranchType.java | 39 + .../protobuf/generated/BranchTypeProto.java | 126 ++ .../generated/GlobalBeginRequest.java | 56 + .../generated/GlobalBeginRequestProto.java | 811 ++++++++++ .../GlobalBeginRequestProtoOrBuilder.java | 42 + .../generated/GlobalBeginResponse.java | 56 + .../generated/GlobalBeginResponseProto.java | 885 +++++++++++ .../GlobalBeginResponseProtoOrBuilder.java | 48 + .../generated/GlobalCommitRequest.java | 55 + .../generated/GlobalCommitRequestProto.java | 609 ++++++++ .../GlobalCommitRequestProtoOrBuilder.java | 24 + .../generated/GlobalCommitResponse.java | 55 + .../generated/GlobalCommitResponseProto.java | 609 ++++++++ .../GlobalCommitResponseProtoOrBuilder.java | 24 + .../generated/GlobalLockQueryRequest.java | 55 + .../GlobalLockQueryRequestProto.java | 609 ++++++++ .../GlobalLockQueryRequestProtoOrBuilder.java | 24 + .../generated/GlobalLockQueryResponse.java | 56 + .../GlobalLockQueryResponseProto.java | 674 +++++++++ ...GlobalLockQueryResponseProtoOrBuilder.java | 30 + .../generated/GlobalReportRequest.java | 60 + .../generated/GlobalReportRequestProto.java | 705 +++++++++ .../GlobalReportRequestProtoOrBuilder.java | 35 + .../generated/GlobalReportResponse.java | 55 + .../generated/GlobalReportResponseProto.java | 609 ++++++++ .../GlobalReportResponseProtoOrBuilder.java | 24 + .../generated/GlobalRollbackRequest.java | 55 + .../generated/GlobalRollbackRequestProto.java | 609 ++++++++ .../GlobalRollbackRequestProtoOrBuilder.java | 24 + .../generated/GlobalRollbackResponse.java | 56 + .../GlobalRollbackResponseProto.java | 609 ++++++++ .../GlobalRollbackResponseProtoOrBuilder.java | 24 + .../protobuf/generated/GlobalStatus.java | 46 + .../protobuf/generated/GlobalStatusProto.java | 375 +++++ .../generated/GlobalStatusRequest.java | 55 + .../generated/GlobalStatusRequestProto.java | 609 ++++++++ .../GlobalStatusRequestProtoOrBuilder.java | 24 + .../generated/GlobalStatusResponse.java | 55 + .../generated/GlobalStatusResponseProto.java | 609 ++++++++ .../GlobalStatusResponseProtoOrBuilder.java | 24 + .../protobuf/generated/HeartbeatMessage.java | 50 + .../generated/HeartbeatMessageProto.java | 494 +++++++ .../HeartbeatMessageProtoOrBuilder.java | 15 + .../generated/MergedResultMessage.java | 58 + .../generated/MergedResultMessageProto.java | 968 ++++++++++++ .../MergedResultMessageProtoOrBuilder.java | 48 + .../protobuf/generated/MergedWarpMessage.java | 58 + .../generated/MergedWarpMessageProto.java | 1145 ++++++++++++++ .../MergedWarpMessageProtoOrBuilder.java | 65 + .../protobuf/generated/MessageType.java | 58 + .../protobuf/generated/MessageTypeProto.java | 620 ++++++++ .../protobuf/generated/RegisterRMRequest.java | 56 + .../generated/RegisterRMRequestProto.java | 755 ++++++++++ .../RegisterRMRequestProtoOrBuilder.java | 36 + .../generated/RegisterRMResponse.java | 55 + .../generated/RegisterRMResponseProto.java | 617 ++++++++ .../RegisterRMResponseProtoOrBuilder.java | 24 + .../protobuf/generated/RegisterTMRequest.java | 55 + .../generated/RegisterTMRequestProto.java | 617 ++++++++ .../RegisterTMRequestProtoOrBuilder.java | 24 + .../generated/RegisterTMResponse.java | 55 + .../generated/RegisterTMResponseProto.java | 617 ++++++++ .../RegisterTMResponseProtoOrBuilder.java | 24 + .../protobuf/generated/ResultCode.java | 39 + .../protobuf/generated/ResultCodeProto.java | 117 ++ .../generated/TransactionExceptionCode.java | 52 + .../TransactionExceptionCodeProto.java | 381 +++++ .../generated/UndoLogDeleteRequest.java | 61 + .../generated/UndoLogDeleteRequestProto.java | 1005 +++++++++++++ .../UndoLogDeleteRequestProtoOrBuilder.java | 78 + .../manager/ProtobufConvertManager.java | 120 +- .../proto}/abstractBranchEndRequest.proto | 2 +- .../proto}/abstractBranchEndResponse.proto | 2 +- .../proto}/abstractGlobalEndRequest.proto | 2 +- .../proto}/abstractGlobalEndResponse.proto | 2 +- .../main/proto}/abstractIdentifyRequest.proto | 2 +- .../proto}/abstractIdentifyResponse.proto | 2 +- .../src/main/proto}/abstractMessage.proto | 2 +- .../main/proto}/abstractResultMessage.proto | 2 +- .../proto}/abstractTransactionRequest.proto | 2 +- .../proto}/abstractTransactionResponse.proto | 2 +- .../src/main/proto}/batchResultMessage.proto | 2 +- .../src/main/proto}/branchCommitRequest.proto | 2 +- .../main/proto}/branchCommitResponse.proto | 2 +- .../main/proto}/branchRegisterRequest.proto | 2 +- .../main/proto}/branchRegisterResponse.proto | 2 +- .../src/main/proto}/branchReportRequest.proto | 2 +- .../main/proto}/branchReportResponse.proto | 2 +- .../main/proto}/branchRollbackRequest.proto | 2 +- .../main/proto}/branchRollbackResponse.proto | 2 +- .../src/main/proto}/branchStatus.proto | 2 +- .../src/main/proto}/branchType.proto | 2 +- .../src/main/proto}/globalBeginRequest.proto | 2 +- .../src/main/proto}/globalBeginResponse.proto | 2 +- .../src/main/proto}/globalCommitRequest.proto | 2 +- .../main/proto}/globalCommitResponse.proto | 2 +- .../main/proto}/globalLockQueryRequest.proto | 2 +- .../main/proto}/globalLockQueryResponse.proto | 2 +- .../src/main/proto}/globalReportRequest.proto | 2 +- .../main/proto}/globalReportResponse.proto | 2 +- .../main/proto}/globalRollbackRequest.proto | 2 +- .../main/proto}/globalRollbackResponse.proto | 2 +- .../src/main/proto}/globalStatus.proto | 2 +- .../src/main/proto}/globalStatusRequest.proto | 2 +- .../main/proto}/globalStatusResponse.proto | 2 +- core/src/main/proto/grpcMessage.proto | 17 + .../src/main/proto}/heartbeatMessage.proto | 2 +- .../src/main/proto}/mergedResultMessage.proto | 2 +- .../src/main/proto}/mergedWarpMessage.proto | 2 +- .../src/main/proto}/messageType.proto | 2 +- .../src/main/proto}/registerRMRequest.proto | 2 +- .../src/main/proto}/registerRMResponse.proto | 2 +- .../src/main/proto}/registerTMRequest.proto | 2 +- .../src/main/proto}/registerTMResponse.proto | 2 +- .../src/main/proto}/resultCode.proto | 2 +- .../proto}/transactionExceptionCode.proto | 2 +- .../main/proto}/undoLogDeleteRequest.proto | 2 +- dependencies/pom.xml | 2 +- .../grpc/interceptor/GrpcTest.java | 109 -- pom.xml | 1 + .../grpc/generated/SeataServiceGrpc.java | 272 ++++ seata-test-grpc/pom.xml | 127 ++ .../account/DubboAccountServiceStarter.java | 47 + .../config/DataSourceConfiguration.java | 60 + .../account/config/DubboConfiguration.java | 59 + .../account/config/SeataConfiguration.java | 45 + .../seata/account/service/AccountService.java | 28 + .../service/impl/AccountServiceImpl.java | 46 + .../business/DubboBusinessServiceTester.java | 51 + .../business/config/DubboConfiguration.java | 50 + .../business/config/SeataConfiguration.java | 45 + .../business/service/BusinessService.java | 29 + .../service/impl/BusinessServiceImpl.java | 54 + .../org/apache/seata/grpc/GrpcClient.java | 77 + .../seata/grpc/generated/GrpcMessage.java | 71 + .../grpc/generated/GrpcMessageProto.java | 1026 +++++++++++++ .../generated/GrpcMessageProtoOrBuilder.java | 72 + .../grpc/generated/SeataServiceGrpc.java | 272 ++++ .../seata/order/DubboOrderServiceStarter.java | 47 + .../order/config/DataSourceConfiguration.java | 60 + .../order/config/DubboConfiguration.java | 59 + .../order/config/SeataConfiguration.java | 45 + .../seata/order/service/OrderService.java | 29 + .../order/service/impl/OrderServiceImpl.java | 79 + .../storage/DubboStorageServiceStarter.java | 47 + .../config/DataSourceConfiguration.java | 60 + .../storage/config/DubboConfiguration.java | 59 + .../storage/config/SeataConfiguration.java | 45 + .../seata/storage/service/StorageService.java | 36 + .../service/impl/StorageServiceImpl.java | 61 + .../src/main/proto/grpcMessage.proto | 17 + .../seata/grpc/generated/GrpcMessage.java | 71 + .../grpc/generated/GrpcMessageProto.java | 1026 +++++++++++++ .../generated/GrpcMessageProtoOrBuilder.java | 72 + seata-test-grpc/src/main/resources/all.sql | 56 + .../src/main/resources/application.properties | 18 + seata-test-grpc/src/main/resources/file.conf | 127 ++ .../src/main/resources/logback.xml | 13 + .../src/main/resources/registry.conf | 124 ++ serializer/seata-serializer-protobuf/pom.xml | 2 +- .../BatchResultMessageConvertorTest.java | 4 +- .../BranchCommitRequestConvertorTest.java | 4 +- .../BranchCommitResponseConvertorTest.java | 4 +- .../BranchRegisterRequestConvertorTest.java | 4 +- .../BranchRegisterResponseConvertorTest.java | 4 +- .../BranchReportRequestConvertorTest.java | 4 +- .../BranchReportResponseConvertorTest.java | 4 +- .../BranchRollbackRequestConvertorTest.java | 4 +- .../BranchRollbackResponseConvertorTest.java | 4 +- .../GlobalBeginRequestConvertorTest.java | 4 +- .../GlobalBeginResponseConvertorTest.java | 4 +- .../GlobalCommitRequestConvertorTest.java | 4 +- .../GlobalCommitResponseConvertorTest.java | 4 +- .../GlobalLockQueryRequestConvertorTest.java | 4 +- .../GlobalLockQueryResponseConvertorTest.java | 4 +- .../GlobalRollbackRequestConvertorTest.java | 4 +- .../GlobalRollbackResponseConvertorTest.java | 4 +- .../GlobalStatusRequestConvertorTest.java | 4 +- .../GlobalStatusResponseConvertorTest.java | 4 +- .../HeartbeatMessageConvertorTest.java | 4 +- .../convertor/MergeMessageConvertorTest.java | 4 +- .../MergeResultMessageConvertorTest.java | 4 +- .../RegisterRMRequestConvertorTest.java | 4 +- .../RegisterRMResponseConvertorTest.java | 4 +- .../RegisterTMRequestConvertorTest.java | 4 +- .../RegisterTMResponseConvertorTest.java | 4 +- .../UndoLogDeleteRequestConvertorTest.java | 4 +- server/pom.xml | 5 + server/src/main/resources/application.yml | 211 ++- 303 files changed, 43012 insertions(+), 554 deletions(-) create mode 100644 core/src/main/java/org/apache/seata/core/protocol/Protocol.java create mode 100644 core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java create mode 100644 core/src/main/java/org/apache/seata/core/protocol/detector/ProtocolDetector.java create mode 100644 core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java create mode 100644 core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessage.java create mode 100644 core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProto.java create mode 100644 core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDetectHandler.java create mode 100644 core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java create mode 100644 core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java create mode 100644 core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/ProtobufHelper.java (98%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/ProtobufInnerSerializer.java (98%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/ProtobufSerializer.java (94%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BatchResultMessageConvertor.java (90%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BranchCommitRequestConvertor.java (85%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BranchCommitResponseConvertor.java (83%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java (86%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java (83%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BranchReportRequestConvertor.java (85%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BranchReportResponseConvertor.java (82%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java (85%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java (83%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java (84%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java (84%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java (83%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java (82%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java (85%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java (84%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalReportRequestConvertor.java (83%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalReportResponseConvertor.java (82%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java (83%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java (82%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java (83%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java (82%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/HeartbeatMessageConvertor.java (90%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/MergeResultMessageConvertor.java (90%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/MergedWarpMessageConvertor.java (89%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/PbConvertor.java (93%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/RegisterRMRequestConvertor.java (87%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/RegisterRMResponseConvertor.java (86%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/RegisterTMRequestConvertor.java (87%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/RegisterTMResponseConvertor.java (86%) rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java (84%) create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessage.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessage.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessage.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatus.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatusProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchType.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchTypeProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatus.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessage.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessage.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessage.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageType.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageTypeProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponse.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProtoOrBuilder.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCode.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCodeProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCode.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCodeProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequest.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProto.java create mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java rename {serializer/seata-serializer-protobuf/src/main/java/org/apache/seata => core/src/main/java/org/apache/seata/core}/serializer/protobuf/manager/ProtobufConvertManager.java (76%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractBranchEndRequest.proto (95%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractBranchEndResponse.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractGlobalEndRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractGlobalEndResponse.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractIdentifyRequest.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractIdentifyResponse.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractMessage.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractResultMessage.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractTransactionRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/abstractTransactionResponse.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/batchResultMessage.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchCommitRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchCommitResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchRegisterRequest.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchRegisterResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchReportRequest.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchReportResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchRollbackRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchRollbackResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchStatus.proto (97%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/branchType.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalBeginRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalBeginResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalCommitRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalCommitResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalLockQueryRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalLockQueryResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalReportRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalReportResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalRollbackRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalRollbackResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalStatus.proto (97%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalStatusRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/globalStatusResponse.proto (93%) create mode 100644 core/src/main/proto/grpcMessage.proto rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/heartbeatMessage.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/mergedResultMessage.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/mergedWarpMessage.proto (94%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/messageType.proto (97%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/registerRMRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/registerRMResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/registerTMRequest.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/registerTMResponse.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/resultCode.proto (93%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/transactionExceptionCode.proto (97%) rename {serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation => core/src/main/proto}/undoLogDeleteRequest.proto (94%) delete mode 100644 integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java create mode 100644 seata-test-grpc/org/apache/seata/grpc/generated/SeataServiceGrpc.java create mode 100644 seata-test-grpc/pom.xml create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/DubboAccountServiceStarter.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/config/DataSourceConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/config/DubboConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/config/SeataConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/service/AccountService.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/service/impl/AccountServiceImpl.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/DubboBusinessServiceTester.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/config/DubboConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/config/SeataConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/service/BusinessService.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/service/impl/BusinessServiceImpl.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/DubboOrderServiceStarter.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/config/DataSourceConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/config/DubboConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/config/SeataConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/service/OrderService.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/service/impl/OrderServiceImpl.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/DubboStorageServiceStarter.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/config/DataSourceConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/config/DubboConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/config/SeataConfiguration.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/service/StorageService.java create mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/service/impl/StorageServiceImpl.java create mode 100644 seata-test-grpc/src/main/proto/grpcMessage.proto create mode 100644 seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessage.java create mode 100644 seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProto.java create mode 100644 seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java create mode 100644 seata-test-grpc/src/main/resources/all.sql create mode 100644 seata-test-grpc/src/main/resources/application.properties create mode 100644 seata-test-grpc/src/main/resources/file.conf create mode 100644 seata-test-grpc/src/main/resources/logback.xml create mode 100644 seata-test-grpc/src/main/resources/registry.conf diff --git a/all/pom.xml b/all/pom.xml index e25f728d8b5..418256e2cf6 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -240,13 +240,6 @@ seata-serializer-seata ${project.version} - - org.apache.seata - seata-serializer-protobuf - ${project.version} - - provided - org.apache.seata seata-grpc diff --git a/bom/pom.xml b/bom/pom.xml index 514d4f048bb..e1ba3fe69b8 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -258,11 +258,6 @@ seata-serializer-all ${project.version} - - org.apache.seata - seata-serializer-protobuf - ${project.version} - org.apache.seata seata-serializer-seata diff --git a/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java b/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java index f88a3cd2bfa..3228e45dfc9 100644 --- a/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java +++ b/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java @@ -628,6 +628,8 @@ public interface ConfigurationKeys { @Deprecated String ENABLE_CLIENT_BATCH_SEND_REQUEST = TRANSPORT_PREFIX + "enableClientBatchSendRequest"; + String PROTOCOL = TRANSPORT_PREFIX + "protocol"; + /** * The constant ENABLE_TM_CLIENT_BATCH_SEND_REQUEST */ diff --git a/common/src/main/java/org/apache/seata/common/DefaultValues.java b/common/src/main/java/org/apache/seata/common/DefaultValues.java index 0c2dd0f7b89..5a898588bd8 100644 --- a/common/src/main/java/org/apache/seata/common/DefaultValues.java +++ b/common/src/main/java/org/apache/seata/common/DefaultValues.java @@ -63,6 +63,7 @@ public interface DefaultValues { String DEFAULT_BOSS_THREAD_PREFIX = "NettyBoss"; String DEFAULT_NIO_WORKER_THREAD_PREFIX = "NettyServerNIOWorker"; String DEFAULT_EXECUTOR_THREAD_PREFIX = "NettyServerBizHandler"; + String DEFAULT_PROTOCOL = "seata"; boolean DEFAULT_TRANSPORT_HEARTBEAT = true; boolean DEFAULT_TRANSACTION_UNDO_DATA_VALIDATION = true; diff --git a/core/pom.xml b/core/pom.xml index 9de6107bc03..f274dd318ae 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -69,9 +69,20 @@ fastjson test + + com.google.protobuf + protobuf-java + + + + kr.motd.maven + os-maven-plugin + 1.5.0.Final + + icu.easyj.maven.plugins @@ -90,6 +101,28 @@ + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + + com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier} + + grpc-java + + io.grpc:protoc-gen-grpc-java:1.11.0:exe:${os.detected.classifier} + + + + + + compile + compile-custom + + + + diff --git a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java new file mode 100644 index 00000000000..3428ad31f13 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java @@ -0,0 +1,16 @@ +package org.apache.seata.core.protocol; + +/** + * + */ +public enum Protocol { + GPRC("gprc"), + + SEATA("seata"); + + public final String value; + + Protocol(String value) { + this.value = value; + } +} diff --git a/core/src/main/java/org/apache/seata/core/protocol/Version.java b/core/src/main/java/org/apache/seata/core/protocol/Version.java index 12178d8fe05..5b7fa2cd9a5 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/Version.java +++ b/core/src/main/java/org/apache/seata/core/protocol/Version.java @@ -36,7 +36,7 @@ public class Version { /** * The constant CURRENT. */ - private static final String CURRENT = VersionInfo.VERSION; + private static final String CURRENT = "2.x"; private static final String VERSION_0_7_1 = "0.7.1"; private static final String VERSION_1_5_0 = "1.5.0"; private static final int MAX_VERSION_DOT = 3; diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java new file mode 100644 index 00000000000..d23b72306e8 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java @@ -0,0 +1,51 @@ +package org.apache.seata.core.protocol.detector; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelPipeline; +import io.netty.handler.codec.http2.Http2FrameCodecBuilder; +import io.netty.handler.codec.http2.Http2MultiplexHandler; +import io.netty.handler.codec.http2.Http2StreamChannel; +import io.netty.util.CharsetUtil; +import org.apache.seata.core.protocol.detector.ProtocolDetector; +import org.apache.seata.core.rpc.netty.grpc.GrpcDecoder; +import org.apache.seata.core.rpc.netty.grpc.GrpcEncoder; + +public class Http2Detector implements ProtocolDetector { + private final byte[] HTTP2_PREFIX_BYTES = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n".getBytes(CharsetUtil.UTF_8); + private ChannelHandler[] serverHandlers; + + public Http2Detector(ChannelHandler[] serverHandlers) { + this.serverHandlers = serverHandlers; + } + + @Override + public boolean detect(ByteBuf in) { + if (in.readableBytes() < HTTP2_PREFIX_BYTES.length) { + return false; + } + for (int i = 0; i < HTTP2_PREFIX_BYTES.length; i++) { + if (in.getByte(i) != HTTP2_PREFIX_BYTES[i]) { + return false; + } + } + return true; + } + + @Override + public ChannelHandler[] getHandlers() { + return new ChannelHandler[]{ + Http2FrameCodecBuilder.forServer().build(), + new Http2MultiplexHandler(new ChannelInitializer() { + @Override + protected void initChannel(Http2StreamChannel ch) { + final ChannelPipeline p = ch.pipeline(); + p.addLast(new GrpcDecoder()); + p.addLast(new GrpcEncoder()); + p.addLast(serverHandlers); + } + }) + }; + } +} \ No newline at end of file diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/ProtocolDetector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/ProtocolDetector.java new file mode 100644 index 00000000000..2f4529ba3bc --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/ProtocolDetector.java @@ -0,0 +1,10 @@ +package org.apache.seata.core.protocol.detector; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandler; + +public interface ProtocolDetector { + boolean detect(ByteBuf in); + + ChannelHandler[] getHandlers(); +} diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java new file mode 100644 index 00000000000..b0a8d86327e --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java @@ -0,0 +1,39 @@ +package org.apache.seata.core.protocol.detector; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandler; +import org.apache.seata.core.rpc.netty.v1.ProtocolDecoderV1; +import org.apache.seata.core.rpc.netty.v1.ProtocolEncoderV1; + +public class SeataDetector implements ProtocolDetector { + private final byte[] MAGIC_CODE_BYTES = {(byte) 0xda, (byte) 0xda}; + private ChannelHandler[] serverHandlers; + + public SeataDetector(ChannelHandler[] serverHandlers) { + this.serverHandlers = serverHandlers; + } + + @Override + public boolean detect(ByteBuf in) { + if (in.readableBytes() < MAGIC_CODE_BYTES.length) { + return false; + } + for (int i = 0; i < MAGIC_CODE_BYTES.length; i++) { + if (in.getByte(i) != MAGIC_CODE_BYTES[i]) { + return false; + } + } + return true; + } + + @Override + public ChannelHandler[] getHandlers() { + ChannelHandler[] ret = new ChannelHandler[2 + serverHandlers.length]; + ret[0] = new ProtocolDecoderV1(); + ret[1] = new ProtocolEncoderV1(); + for (int i = 0; i < serverHandlers.length; i++) { + ret[2 + i] = serverHandlers[i]; + } + return ret; + } +} \ No newline at end of file diff --git a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessage.java b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessage.java new file mode 100644 index 00000000000..571a9c43bed --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessage.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.core.protocol.generated; + +public final class GrpcMessage { + private GrpcMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\021grpcMessage.proto\022\036org.apache.seata.co" + + "re.protocol\032\031google/protobuf/any.proto\"\327" + + "\001\n\020GrpcMessageProto\022\n\n\002id\030\001 \001(\005\022\023\n\013messa" + + "geType\030\002 \001(\005\022N\n\007headMap\030\003 \003(\0132=.org.apac" + + "he.seata.core.protocol.GrpcMessageProto." + + "HeadMapEntry\022\"\n\004body\030\004 \001(\0132\024.google.prot" + + "obuf.Any\032.\n\014HeadMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\0012\205\001\n\014SeataService\022u\n\013sen" + + "dRequest\0220.org.apache.seata.core.protoco" + + "l.GrpcMessageProto\0320.org.apache.seata.co" + + "re.protocol.GrpcMessageProto(\0010\001B9\n(org." + + "apache.seata.core.protocol.generatedB\013Gr" + + "pcMessageP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor, + new String[] { "Id", "MessageType", "HeadMap", "Body", }); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor = + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor.getNestedTypes().get(0); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, + new String[] { "Key", "Value", }); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProto.java b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProto.java new file mode 100644 index 00000000000..172c0904b4c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProto.java @@ -0,0 +1,1026 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.core.protocol.generated; + +/** + * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} + */ +public final class GrpcMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.core.protocol.GrpcMessageProto) + GrpcMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GrpcMessageProto.newBuilder() to construct. + private GrpcMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GrpcMessageProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GrpcMessageProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GrpcMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + id_ = input.readInt32(); + break; + } + case 16: { + + messageType_ = input.readInt32(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + headMap_ = com.google.protobuf.MapField.newMapField( + HeadMapDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + headMap__ = input.readMessage( + HeadMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + headMap_.getMutableMap().put( + headMap__.getKey(), headMap__.getValue()); + break; + } + case 34: { + com.google.protobuf.Any.Builder subBuilder = null; + if (body_ != null) { + subBuilder = body_.toBuilder(); + } + body_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(body_); + body_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GrpcMessageProto.class, Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private int id_; + /** + * int32 id = 1; + * @return The id. + */ + @Override + public int getId() { + return id_; + } + + public static final int MESSAGETYPE_FIELD_NUMBER = 2; + private int messageType_; + /** + * int32 messageType = 2; + * @return The messageType. + */ + @Override + public int getMessageType() { + return messageType_; + } + + public static final int HEADMAP_FIELD_NUMBER = 3; + private static final class HeadMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + String, String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + String, String> headMap_; + private com.google.protobuf.MapField + internalGetHeadMap() { + if (headMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + return headMap_; + } + + public int getHeadMapCount() { + return internalGetHeadMap().getMap().size(); + } + /** + * map<string, string> headMap = 3; + */ + + @Override + public boolean containsHeadMap( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadMap().getMap().containsKey(key); + } + /** + * Use {@link #getHeadMapMap()} instead. + */ + @Override + @Deprecated + public java.util.Map getHeadMap() { + return getHeadMapMap(); + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public java.util.Map getHeadMapMap() { + return internalGetHeadMap().getMap(); + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public String getHeadMapOrDefault( + String key, + String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public String getHeadMapOrThrow( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + if (!map.containsKey(key)) { + throw new IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BODY_FIELD_NUMBER = 4; + private com.google.protobuf.Any body_; + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + @Override + public boolean hasBody() { + return body_ != null; + } + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + @Override + public com.google.protobuf.Any getBody() { + return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; + } + /** + * .google.protobuf.Any body = 4; + */ + @Override + public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { + return getBody(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != 0) { + output.writeInt32(1, id_); + } + if (messageType_ != 0) { + output.writeInt32(2, messageType_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetHeadMap(), + HeadMapDefaultEntryHolder.defaultEntry, + 3); + if (body_ != null) { + output.writeMessage(4, getBody()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, id_); + } + if (messageType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, messageType_); + } + for (java.util.Map.Entry entry + : internalGetHeadMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + headMap__ = HeadMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, headMap__); + } + if (body_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getBody()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GrpcMessageProto)) { + return super.equals(obj); + } + GrpcMessageProto other = (GrpcMessageProto) obj; + + if (getId() + != other.getId()) return false; + if (getMessageType() + != other.getMessageType()) return false; + if (!internalGetHeadMap().equals( + other.internalGetHeadMap())) return false; + if (hasBody() != other.hasBody()) return false; + if (hasBody()) { + if (!getBody() + .equals(other.getBody())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER; + hash = (53 * hash) + getMessageType(); + if (!internalGetHeadMap().getMap().isEmpty()) { + hash = (37 * hash) + HEADMAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeadMap().hashCode(); + } + if (hasBody()) { + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GrpcMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GrpcMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GrpcMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GrpcMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GrpcMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GrpcMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GrpcMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GrpcMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GrpcMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GrpcMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GrpcMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GrpcMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GrpcMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.core.protocol.GrpcMessageProto) + GrpcMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GrpcMessageProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.protocol.generated.GrpcMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + id_ = 0; + + messageType_ = 0; + + internalGetMutableHeadMap().clear(); + if (bodyBuilder_ == null) { + body_ = null; + } else { + body_ = null; + bodyBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @Override + public GrpcMessageProto getDefaultInstanceForType() { + return GrpcMessageProto.getDefaultInstance(); + } + + @Override + public GrpcMessageProto build() { + GrpcMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GrpcMessageProto buildPartial() { + GrpcMessageProto result = new GrpcMessageProto(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.messageType_ = messageType_; + result.headMap_ = internalGetHeadMap(); + result.headMap_.makeImmutable(); + if (bodyBuilder_ == null) { + result.body_ = body_; + } else { + result.body_ = bodyBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GrpcMessageProto) { + return mergeFrom((GrpcMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GrpcMessageProto other) { + if (other == GrpcMessageProto.getDefaultInstance()) return this; + if (other.getId() != 0) { + setId(other.getId()); + } + if (other.getMessageType() != 0) { + setMessageType(other.getMessageType()); + } + internalGetMutableHeadMap().mergeFrom( + other.internalGetHeadMap()); + if (other.hasBody()) { + mergeBody(other.getBody()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GrpcMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GrpcMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int id_ ; + /** + * int32 id = 1; + * @return The id. + */ + @Override + public int getId() { + return id_; + } + /** + * int32 id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(int value) { + + id_ = value; + onChanged(); + return this; + } + /** + * int32 id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + + private int messageType_ ; + /** + * int32 messageType = 2; + * @return The messageType. + */ + @Override + public int getMessageType() { + return messageType_; + } + /** + * int32 messageType = 2; + * @param value The messageType to set. + * @return This builder for chaining. + */ + public Builder setMessageType(int value) { + + messageType_ = value; + onChanged(); + return this; + } + /** + * int32 messageType = 2; + * @return This builder for chaining. + */ + public Builder clearMessageType() { + + messageType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + String, String> headMap_; + private com.google.protobuf.MapField + internalGetHeadMap() { + if (headMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + return headMap_; + } + private com.google.protobuf.MapField + internalGetMutableHeadMap() { + onChanged();; + if (headMap_ == null) { + headMap_ = com.google.protobuf.MapField.newMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + if (!headMap_.isMutable()) { + headMap_ = headMap_.copy(); + } + return headMap_; + } + + public int getHeadMapCount() { + return internalGetHeadMap().getMap().size(); + } + /** + * map<string, string> headMap = 3; + */ + + @Override + public boolean containsHeadMap( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadMap().getMap().containsKey(key); + } + /** + * Use {@link #getHeadMapMap()} instead. + */ + @Override + @Deprecated + public java.util.Map getHeadMap() { + return getHeadMapMap(); + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public java.util.Map getHeadMapMap() { + return internalGetHeadMap().getMap(); + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public String getHeadMapOrDefault( + String key, + String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public String getHeadMapOrThrow( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + if (!map.containsKey(key)) { + throw new IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeadMap() { + internalGetMutableHeadMap().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> headMap = 3; + */ + + public Builder removeHeadMap( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableHeadMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @Deprecated + public java.util.Map + getMutableHeadMap() { + return internalGetMutableHeadMap().getMutableMap(); + } + /** + * map<string, string> headMap = 3; + */ + public Builder putHeadMap( + String key, + String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableHeadMap().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, string> headMap = 3; + */ + + public Builder putAllHeadMap( + java.util.Map values) { + internalGetMutableHeadMap().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.Any body_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> bodyBuilder_; + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + public boolean hasBody() { + return bodyBuilder_ != null || body_ != null; + } + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + public com.google.protobuf.Any getBody() { + if (bodyBuilder_ == null) { + return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; + } else { + return bodyBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder setBody(com.google.protobuf.Any value) { + if (bodyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + onChanged(); + } else { + bodyBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder setBody( + com.google.protobuf.Any.Builder builderForValue) { + if (bodyBuilder_ == null) { + body_ = builderForValue.build(); + onChanged(); + } else { + bodyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder mergeBody(com.google.protobuf.Any value) { + if (bodyBuilder_ == null) { + if (body_ != null) { + body_ = + com.google.protobuf.Any.newBuilder(body_).mergeFrom(value).buildPartial(); + } else { + body_ = value; + } + onChanged(); + } else { + bodyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder clearBody() { + if (bodyBuilder_ == null) { + body_ = null; + onChanged(); + } else { + body_ = null; + bodyBuilder_ = null; + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public com.google.protobuf.Any.Builder getBodyBuilder() { + + onChanged(); + return getBodyFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Any body = 4; + */ + public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { + if (bodyBuilder_ != null) { + return bodyBuilder_.getMessageOrBuilder(); + } else { + return body_ == null ? + com.google.protobuf.Any.getDefaultInstance() : body_; + } + } + /** + * .google.protobuf.Any body = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getBodyFieldBuilder() { + if (bodyBuilder_ == null) { + bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getBody(), + getParentForChildren(), + isClean()); + body_ = null; + } + return bodyBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.core.protocol.GrpcMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.core.protocol.GrpcMessageProto) + private static final GrpcMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GrpcMessageProto(); + } + + public static GrpcMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GrpcMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GrpcMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GrpcMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProtoOrBuilder.java new file mode 100644 index 00000000000..1a68b8f9b15 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProtoOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.core.protocol.generated; + +public interface GrpcMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.core.protocol.GrpcMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 id = 1; + * @return The id. + */ + int getId(); + + /** + * int32 messageType = 2; + * @return The messageType. + */ + int getMessageType(); + + /** + * map<string, string> headMap = 3; + */ + int getHeadMapCount(); + /** + * map<string, string> headMap = 3; + */ + boolean containsHeadMap( + String key); + /** + * Use {@link #getHeadMapMap()} instead. + */ + @Deprecated + java.util.Map + getHeadMap(); + /** + * map<string, string> headMap = 3; + */ + java.util.Map + getHeadMapMap(); + /** + * map<string, string> headMap = 3; + */ + + /* nullable */ +String getHeadMapOrDefault( + String key, + /* nullable */ +String defaultValue); + /** + * map<string, string> headMap = 3; + */ + + String getHeadMapOrThrow( + String key); + + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + boolean hasBody(); + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + com.google.protobuf.Any getBody(); + /** + * .google.protobuf.Any body = 4; + */ + com.google.protobuf.AnyOrBuilder getBodyOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java b/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java index 248e8f48f6d..cddc8de1d9c 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java @@ -460,7 +460,10 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("will send ping msg,channel {}", ctx.channel()); } - AbstractNettyRemotingClient.this.sendAsyncRequest(ctx.channel(), HeartbeatMessage.PING); + String serverAddress = NetUtil.toStringAddress(ctx.channel().remoteAddress()); + Channel channel = clientChannelManager.acquireChannel(serverAddress); + + AbstractNettyRemotingClient.this.sendAsyncRequest(channel, HeartbeatMessage.PING); } catch (Throwable throwable) { LOGGER.error("send request error: {}", throwable.getMessage(), throwable); } diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java index 4aaafc0acb0..362872f1b3a 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java @@ -17,24 +17,25 @@ package org.apache.seata.core.rpc.netty; import io.netty.bootstrap.Bootstrap; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelOption; -import io.netty.channel.ChannelPipeline; -import io.netty.channel.EventLoopGroup; +import io.netty.channel.*; import io.netty.channel.epoll.EpollChannelOption; import io.netty.channel.epoll.EpollMode; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http2.Http2FrameCodecBuilder; +import io.netty.handler.codec.http2.Http2MultiplexHandler; +import io.netty.handler.codec.http2.Http2StreamChannelBootstrap; +import io.netty.handler.ssl.ApplicationProtocolConfig; import io.netty.handler.timeout.IdleStateHandler; import io.netty.util.concurrent.DefaultEventExecutorGroup; import io.netty.util.concurrent.EventExecutorGroup; import io.netty.util.internal.PlatformDependent; import org.apache.seata.common.exception.FrameworkException; import org.apache.seata.common.thread.NamedThreadFactory; +import org.apache.seata.core.protocol.Protocol; import org.apache.seata.core.rpc.RemotingBootstrap; +import org.apache.seata.core.rpc.netty.grpc.GrpcDecoder; +import org.apache.seata.core.rpc.netty.grpc.GrpcEncoder; import org.apache.seata.core.rpc.netty.v1.ProtocolDecoderV1; import org.apache.seata.core.rpc.netty.v1.ProtocolEncoderV1; import org.slf4j.Logger; @@ -130,12 +131,19 @@ public void start() { @Override public void initChannel(SocketChannel ch) { ChannelPipeline pipeline = ch.pipeline(); - pipeline - .addLast(new IdleStateHandler(nettyClientConfig.getChannelMaxReadIdleSeconds(), + pipeline.addLast(new IdleStateHandler(nettyClientConfig.getChannelMaxReadIdleSeconds(), nettyClientConfig.getChannelMaxWriteIdleSeconds(), - nettyClientConfig.getChannelMaxAllIdleSeconds())) - .addLast(new ProtocolDecoderV1()) - .addLast(new ProtocolEncoderV1()); + nettyClientConfig.getChannelMaxAllIdleSeconds())); + if (nettyClientConfig.getProtocol().equals(Protocol.GPRC.value)) { + pipeline.addLast(Http2FrameCodecBuilder.forClient().build()) + .addLast(new Http2MultiplexHandler(new ChannelDuplexHandler())) + .addLast(new GrpcDecoder()) + .addLast(new GrpcEncoder()); + } else { + pipeline.addLast(new ProtocolDecoderV1()) + .addLast(new ProtocolEncoderV1()); + } + if (channelHandlers != null) { addChannelPipelineLast(ch, channelHandlers); } @@ -177,9 +185,28 @@ public Channel getNewChannel(InetSocketAddress address) { } else { channel = f.channel(); } + + // TODO tmp only for grpc + if (nettyClientConfig.getProtocol().equals(Protocol.GPRC.value)) { + Http2StreamChannelBootstrap bootstrap = new Http2StreamChannelBootstrap(channel); + bootstrap.handler(new ChannelInboundHandlerAdapter() { + @Override + public void handlerAdded(ChannelHandlerContext ctx) throws Exception { + Channel channel = ctx.channel(); + channel.pipeline().addLast(new GrpcDecoder()); + channel.pipeline().addLast(new GrpcEncoder()); + if (channelHandlers != null) { + addChannelPipelineLast(channel, channelHandlers); + } + } + }); + channel = bootstrap.open().get(); + } + } catch (Exception e) { throw new FrameworkException(e, "can not connect to services-server."); } + return channel; } diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java index f0e047ad58d..61bbfa7b9b9 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java @@ -20,12 +20,7 @@ import org.apache.seata.core.constants.ConfigurationKeys; import org.apache.seata.core.rpc.TransportServerType; -import static org.apache.seata.common.DefaultValues.DEFAULT_ENABLE_CLIENT_BATCH_SEND_REQUEST; -import static org.apache.seata.common.DefaultValues.DEFAULT_RPC_RM_REQUEST_TIMEOUT; -import static org.apache.seata.common.DefaultValues.DEFAULT_RPC_TM_REQUEST_TIMEOUT; -import static org.apache.seata.common.DefaultValues.DEFAULT_SELECTOR_THREAD_PREFIX; -import static org.apache.seata.common.DefaultValues.DEFAULT_SELECTOR_THREAD_SIZE; -import static org.apache.seata.common.DefaultValues.DEFAULT_WORKER_THREAD_PREFIX; +import static org.apache.seata.common.DefaultValues.*; /** * The type Netty client config. @@ -451,6 +446,10 @@ public String getRmDispatchThreadPrefix() { return RPC_DISPATCH_THREAD_PREFIX + "_" + NettyPoolKey.TransactionRole.RMROLE.name(); } + public String getProtocol() { + return CONFIG.getConfig(org.apache.seata.common.ConfigurationKeys.PROTOCOL, DEFAULT_PROTOCOL); + } + @Deprecated public static boolean isEnableClientBatchSendRequest() { return ENABLE_CLIENT_BATCH_SEND_REQUEST; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyServerBootstrap.java b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyServerBootstrap.java index c7b2aa57c21..cfda52b2e9c 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyServerBootstrap.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyServerBootstrap.java @@ -22,21 +22,21 @@ import java.util.concurrent.atomic.AtomicBoolean; import io.netty.bootstrap.ServerBootstrap; -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelInitializer; -import io.netty.channel.ChannelOption; -import io.netty.channel.EventLoopGroup; -import io.netty.channel.WriteBufferWaterMark; +import io.netty.channel.*; import io.netty.channel.epoll.EpollEventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; +import io.netty.handler.codec.http2.Http2FrameCodecBuilder; +import io.netty.handler.codec.http2.Http2MultiplexHandler; +import io.netty.handler.codec.http2.Http2StreamChannel; import io.netty.handler.timeout.IdleStateHandler; import org.apache.seata.common.ConfigurationKeys; import org.apache.seata.common.XID; import org.apache.seata.common.thread.NamedThreadFactory; import org.apache.seata.config.ConfigurationFactory; import org.apache.seata.core.rpc.RemotingBootstrap; +import org.apache.seata.core.rpc.netty.grpc.GrpcDecoder; +import org.apache.seata.core.rpc.netty.grpc.GrpcEncoder; import org.apache.seata.discovery.registry.MultiRegistryFactory; import org.apache.seata.discovery.registry.RegistryService; import org.slf4j.Logger; @@ -92,6 +92,10 @@ protected void setChannelHandlers(final ChannelHandler... handlers) { } } + protected ChannelHandler[] getChannelHandlers() { + return channelHandlers; + } + /** * Add channel pipeline last. * @@ -158,10 +162,8 @@ public void start() { .childHandler(new ChannelInitializer() { @Override public void initChannel(SocketChannel ch) { - MultiProtocolDecoder multiProtocolDecoder = new MultiProtocolDecoder(channelHandlers); - ch.pipeline() - .addLast(new IdleStateHandler(nettyServerConfig.getChannelMaxReadIdleSeconds(), 0, 0)) - .addLast(multiProtocolDecoder); + ch.pipeline().addLast(new IdleStateHandler(nettyServerConfig.getChannelMaxReadIdleSeconds(), 0, 0)) + .addLast(new ProtocolDetectHandler(NettyServerBootstrap.this)); } }); diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDetectHandler.java b/core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDetectHandler.java new file mode 100644 index 00000000000..8a966e903a8 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDetectHandler.java @@ -0,0 +1,46 @@ +package org.apache.seata.core.rpc.netty; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.ByteToMessageDecoder; +import org.apache.seata.core.protocol.detector.Http2Detector; +import org.apache.seata.core.protocol.detector.ProtocolDetector; +import org.apache.seata.core.protocol.detector.SeataDetector; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.List; + +public class ProtocolDetectHandler extends ByteToMessageDecoder { + private static final Logger LOGGER = LoggerFactory.getLogger(ProtocolDetectHandler.class); + private NettyServerBootstrap nettyServerBootstrap; + private ProtocolDetector[] supportedProtocolDetectors; + + public ProtocolDetectHandler(NettyServerBootstrap nettyServerBootstrap) { + this.nettyServerBootstrap = nettyServerBootstrap; + this.supportedProtocolDetectors = new ProtocolDetector[]{new Http2Detector(nettyServerBootstrap.getChannelHandlers()), new SeataDetector(nettyServerBootstrap.getChannelHandlers())}; + } + + @Override + protected void decode(ChannelHandlerContext ctx, ByteBuf in, List out) throws Exception { + for (ProtocolDetector protocolDetector : supportedProtocolDetectors) { + if (protocolDetector.detect(in)) { + ChannelHandler[] protocolHandlers = protocolDetector.getHandlers(); + ctx.pipeline().addLast(protocolHandlers); + ctx.pipeline().remove(this); + + in.resetReaderIndex(); + return; + } + + in.resetReaderIndex(); + } + + byte[] preface = new byte[in.readableBytes()]; + in.readBytes(preface); + LOGGER.error("Can not recognize protocol from remote {}, preface = {}", ctx.channel().remoteAddress(), preface); + in.clear(); + ctx.close(); + } +} \ No newline at end of file diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java new file mode 100644 index 00000000000..e36d121f83e --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -0,0 +1,79 @@ +package org.apache.seata.core.rpc.netty.grpc; + +import com.google.protobuf.Any; +import com.google.protobuf.InvalidProtocolBufferException; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelDuplexHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http2.Http2DataFrame; +import io.netty.handler.codec.http2.Http2HeadersFrame; +import io.netty.util.ReferenceCounted; +import org.apache.seata.common.exception.ShouldNeverHappenException; +import org.apache.seata.core.protocol.RpcMessage; +import org.apache.seata.core.protocol.generated.GrpcMessageProto; +import org.apache.seata.core.serializer.protobuf.convertor.PbConvertor; +import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; + +public class GrpcDecoder extends ChannelDuplexHandler { + + @Override + public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + if (msg instanceof Http2HeadersFrame) { + onHeadersRead(ctx, (Http2HeadersFrame) msg); + } else if (msg instanceof Http2DataFrame) { + onDataRead(ctx, (Http2DataFrame) msg); + } else if (msg instanceof ReferenceCounted) { + ctx.fireChannelRead(msg); + } + } + + public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exception { + ByteBuf content = msg.content(); + byte[] bytes = new byte[content.readableBytes()]; + content.readBytes(bytes); + + // 第一个字节默认是0,表示无需解压缩 + // 读取后面四个字节的值,作为body的长度 + int length = ((bytes[1] & 0xFF) << 24) | + ((bytes[2] & 0xFF) << 16) | + ((bytes[3] & 0xFF) << 8) | + (bytes[4] & 0xFF); + + byte[] data = new byte[length]; + System.arraycopy(bytes, 5, data, 0, length); + + GrpcMessageProto grpcMessageProto = GrpcMessageProto.parseFrom(data); + Any body = grpcMessageProto.getBody(); + int messageType = grpcMessageProto.getMessageType(); + int messageId = grpcMessageProto.getId(); + final Class clazz = ProtobufConvertManager.getInstance().fetchProtoClass( + getTypeNameFromTypeUrl(body.getTypeUrl())); + if (body.is(clazz)) { + try { + Object ob = body.unpack(clazz); + final PbConvertor pbConvertor = ProtobufConvertManager.getInstance().fetchReversedConvertor(clazz.getName()); + Object model = pbConvertor.convert2Model(ob); + + RpcMessage rpcMsg = new RpcMessage(); + rpcMsg.setMessageType((byte) messageType); + rpcMsg.setBody(model); + rpcMsg.setId(messageId); + rpcMsg.setHeadMap(grpcMessageProto.getHeadMapMap()); + + ctx.fireChannelRead(rpcMsg); + } catch (InvalidProtocolBufferException e) { + throw new ShouldNeverHappenException(e); + } + } + } + + public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headersFrame) throws Exception { + // TODO 后续可以解压缩逻辑 + } + + private String getTypeNameFromTypeUrl(String typeUri) { + int pos = typeUri.lastIndexOf('/'); + return pos == -1 ? "" : typeUri.substring(pos + 1); + } + +} diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java new file mode 100644 index 00000000000..292b263f5df --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -0,0 +1,70 @@ +package org.apache.seata.core.rpc.netty.grpc; + +import com.google.protobuf.Any; +import com.google.protobuf.Message; +import io.netty.buffer.Unpooled; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelOutboundHandlerAdapter; +import io.netty.channel.ChannelPromise; +import io.netty.handler.codec.http2.DefaultHttp2DataFrame; +import io.netty.handler.codec.http2.DefaultHttp2Headers; +import io.netty.handler.codec.http2.DefaultHttp2HeadersFrame; +import io.netty.handler.codec.http2.Http2Headers; +import org.apache.seata.core.protocol.RpcMessage; +import org.apache.seata.core.protocol.generated.GrpcMessageProto; +import org.apache.seata.core.serializer.protobuf.convertor.PbConvertor; +import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; + +import java.nio.ByteBuffer; +import java.util.Map; +import java.util.concurrent.atomic.AtomicBoolean; + +public class GrpcEncoder extends ChannelOutboundHandlerAdapter { + private final AtomicBoolean headerSent = new AtomicBoolean(false); + + @Override + public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { + if (!(msg instanceof RpcMessage)){ + throw new UnsupportedOperationException("GrpcEncoder not support class:" + msg.getClass()); + } + + RpcMessage rpcMessage = (RpcMessage) msg; + byte messageType = rpcMessage.getMessageType(); + Map headMap = rpcMessage.getHeadMap(); + Object body = rpcMessage.getBody(); + int id = rpcMessage.getId(); + + if (headerSent.compareAndSet(false, true)) + { + Http2Headers headers = new DefaultHttp2Headers(); + headers.add(GrpcHeaderEnum.HTTP2_STATUS.header, String.valueOf(200)); + headers.add(GrpcHeaderEnum.GRPC_STATUS.header, String.valueOf(0)); + headers.add(GrpcHeaderEnum.GRPC_CONTENT_TYPE.header, "application/grpc"); + ctx.writeAndFlush(new DefaultHttp2HeadersFrame(headers)); + } + + PbConvertor pbConvertor = ProtobufConvertManager.getInstance().fetchConvertor(body.getClass().getName()); + Any grpcBody = Any.pack((Message) pbConvertor.convert2Proto(body)); + GrpcMessageProto grpcMessageProto = GrpcMessageProto.newBuilder() + .setBody(grpcBody) + .putAllHeadMap(headMap) + .setMessageType(messageType) + .setId(id).build(); + byte[] bodyBytes = grpcMessageProto.toByteArray(); + if (bodyBytes != null) + { + byte[] messageWithPrefix = new byte[bodyBytes.length + 5]; + // 第一个字节为0,表示不压缩 + messageWithPrefix[0] = 0; + ByteBuffer buffer = ByteBuffer.allocate(4); + buffer.putInt(bodyBytes.length); + byte[] lengthBytes = buffer.array(); + // 后四个字节表示长度 + System.arraycopy(lengthBytes, 0, messageWithPrefix, 1, 4); + // 剩余字节是body + System.arraycopy(bodyBytes, 0, messageWithPrefix, 5, bodyBytes.length); + ctx.writeAndFlush(new DefaultHttp2DataFrame(Unpooled.wrappedBuffer(messageWithPrefix))); + } + } + +} diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java new file mode 100644 index 00000000000..79c8f4e7233 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java @@ -0,0 +1,23 @@ +package org.apache.seata.core.rpc.netty.grpc; + +public enum GrpcHeaderEnum { + + /** + * grpc状态 + */ + GRPC_STATUS("grpc-status"), + /** + * http2状态 + */ + HTTP2_STATUS(":status"), + /** + * content-type + */ + GRPC_CONTENT_TYPE("content-type"); + + public final String header; + + GrpcHeaderEnum(String header) { + this.header = header; + } +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java index 0503fa8f731..2ccec776307 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java +++ b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java @@ -55,7 +55,7 @@ public final class SerializerServiceLoader { private SerializerServiceLoader() { } - private static final String PROTOBUF_SERIALIZER_CLASS_NAME = "org.apache.seata.serializer.protobuf.ProtobufSerializer"; + private static final String PROTOBUF_SERIALIZER_CLASS_NAME = "org.apache.seata.core.serializer.protobuf.generated.ProtobufSerializer"; /** * Load the service of {@link Serializer} diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufHelper.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufHelper.java similarity index 98% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufHelper.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufHelper.java index 9989195e45b..eec464ca148 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufHelper.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufHelper.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf; +package org.apache.seata.core.serializer.protobuf; import com.google.protobuf.MessageLite; import org.apache.seata.common.exception.ShouldNeverHappenException; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufInnerSerializer.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufInnerSerializer.java similarity index 98% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufInnerSerializer.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufInnerSerializer.java index 435295dc478..fe973fe22f7 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufInnerSerializer.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufInnerSerializer.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf; +package org.apache.seata.core.serializer.protobuf; import org.apache.seata.common.exception.ShouldNeverHappenException; import org.apache.seata.common.util.CollectionUtils; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufSerializer.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufSerializer.java similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufSerializer.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufSerializer.java index 767baff3d7b..802de77d078 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufSerializer.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufSerializer.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf; +package org.apache.seata.core.serializer.protobuf; import java.nio.ByteBuffer; import java.nio.charset.Charset; @@ -25,8 +25,8 @@ import org.apache.seata.common.loader.LoadLevel; import org.apache.seata.common.util.BufferUtils; import org.apache.seata.core.serializer.Serializer; -import org.apache.seata.serializer.protobuf.convertor.PbConvertor; -import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.core.serializer.protobuf.convertor.PbConvertor; +import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; /** * The type Protobuf codec. diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BatchResultMessageConvertor.java similarity index 90% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BatchResultMessageConvertor.java index 397617b12c0..2c3449eb9b3 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BatchResultMessageConvertor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import java.util.ArrayList; import java.util.List; @@ -25,10 +25,10 @@ import org.apache.seata.common.exception.ShouldNeverHappenException; import org.apache.seata.core.protocol.AbstractResultMessage; import org.apache.seata.core.protocol.BatchResultMessage; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.BatchResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.BatchResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; /** * The type batch result message protobuf convertor. diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitRequestConvertor.java similarity index 85% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitRequestConvertor.java index 41918760cce..34d366d28ac 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitRequestConvertor.java @@ -14,15 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.model.BranchType; -import org.apache.seata.serializer.protobuf.generated.AbstractBranchEndRequestProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchCommitRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchCommitRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.BranchCommitRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitResponseConvertor.java similarity index 83% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitResponseConvertor.java index 62c49fcf594..4b4c86328c6 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.serializer.protobuf.generated.AbstractBranchEndResponseProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchCommitResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchStatusProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchCommitResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchStatusProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.BranchCommitResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java similarity index 86% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java index 5212b1a8110..9a472322510 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchRegisterRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchRegisterRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java similarity index 83% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java index 2e507248248..73016a27088 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchRegisterResponseProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.BranchRegisterResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportRequestConvertor.java similarity index 85% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportRequestConvertor.java index 29557dc4479..7e88962fcd1 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportRequestConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchReportRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchStatusProto; -import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchReportRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchStatusProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchReportRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportResponseConvertor.java similarity index 82% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportResponseConvertor.java index ee36dab6f81..86673528b8a 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportResponseConvertor.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchReportResponseProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchReportResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.BranchReportResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java similarity index 85% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java index 14ff6f5f7c5..3dc73b9c75f 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java @@ -14,15 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.model.BranchType; -import org.apache.seata.serializer.protobuf.generated.AbstractBranchEndRequestProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchRollbackRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.BranchRollbackRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java similarity index 83% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java index fc49341f788..9d8cbacf5b9 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.serializer.protobuf.generated.AbstractBranchEndResponseProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchRollbackResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchStatusProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchStatusProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.BranchRollbackResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java similarity index 84% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java index 599b191b46b..e07ec61d447 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalBeginRequestProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.GlobalBeginRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java similarity index 84% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java index f57bea7b2db..b305edaefc0 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java @@ -14,15 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalBeginResponseProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.GlobalBeginResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java similarity index 83% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java index 58be1c15f6c..ae8ed39220b 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndRequestProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalCommitRequestProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.GlobalCommitRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java similarity index 82% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java index 9a7d0bfe712..954798a4325 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalCommitResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.GlobalCommitResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java similarity index 85% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java index e4a6a927951..2481478e33e 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchRegisterRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryRequestProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.GlobalLockQueryRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java similarity index 84% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java index 1b12ce470a1..c2a16ff87cd 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryResponseProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.GlobalLockQueryResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportRequestConvertor.java similarity index 83% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportRequestConvertor.java index ce6bd382fa6..b41e35a3d35 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportRequestConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; - -import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndRequestProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalReportRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +package org.apache.seata.core.serializer.protobuf.convertor; + +import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalReportRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.transaction.GlobalReportRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportResponseConvertor.java similarity index 82% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportResponseConvertor.java index fadc3d2b3ad..9535828b108 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportResponseConvertor.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalReportResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalReportResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java similarity index 83% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java index fbe6fba9286..701d114e84a 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndRequestProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalRollbackRequestProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.GlobalRollbackRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java similarity index 82% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java index 7659abe2058..12aee7237f4 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalRollbackResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.GlobalRollbackResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java similarity index 83% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java index deca92d824c..a94ebb82693 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndRequestProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusRequestProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.GlobalStatusRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java similarity index 82% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java index b43bb336cd4..c011e5a863d 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusResponseProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.GlobalStatusResponse; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/HeartbeatMessageConvertor.java similarity index 90% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/HeartbeatMessageConvertor.java index 3a35c8b2379..0e23548fca8 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/HeartbeatMessageConvertor.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.HeartbeatMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.HeartbeatMessageProto; import org.apache.seata.core.protocol.HeartbeatMessage; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergeResultMessageConvertor.java similarity index 90% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergeResultMessageConvertor.java index ecd1e951bc7..41dca016d3a 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergeResultMessageConvertor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import java.util.ArrayList; import java.util.List; @@ -26,10 +26,10 @@ import org.apache.seata.core.protocol.AbstractMessage; import org.apache.seata.core.protocol.AbstractResultMessage; import org.apache.seata.core.protocol.MergeResultMessage; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.MergedResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MergedResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; public class MergeResultMessageConvertor implements PbConvertor { diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergedWarpMessageConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergedWarpMessageConvertor.java similarity index 89% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergedWarpMessageConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergedWarpMessageConvertor.java index 9e48d545df3..29b68ae5ccc 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergedWarpMessageConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergedWarpMessageConvertor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import java.util.ArrayList; import java.util.List; @@ -25,10 +25,10 @@ import org.apache.seata.common.exception.ShouldNeverHappenException; import org.apache.seata.core.protocol.AbstractMessage; import org.apache.seata.core.protocol.MergedWarpMessage; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.MergedWarpMessageProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MergedWarpMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; public class MergedWarpMessageConvertor implements PbConvertor { diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/PbConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/PbConvertor.java similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/PbConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/PbConvertor.java index 6c28b996f0d..dd3c9803026 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/PbConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/PbConvertor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; public interface PbConvertor { diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMRequestConvertor.java similarity index 87% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMRequestConvertor.java index dcab8ba0317..28a73507eef 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMRequestConvertor.java @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyRequestProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.RegisterRMRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterRMRequestProto; import org.apache.seata.core.protocol.RegisterRMRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMResponseConvertor.java similarity index 86% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMResponseConvertor.java index f1c436f6a93..be9a4f5ef28 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMResponseConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyResponseProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.RegisterRMResponseProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterRMResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; import org.apache.seata.core.protocol.RegisterRMResponse; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMRequestConvertor.java similarity index 87% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMRequestConvertor.java index f707a996377..6616acea9a7 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.protocol.RegisterTMRequest; -import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyRequestProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.RegisterTMRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto; public class RegisterTMRequestConvertor implements PbConvertor { diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMResponseConvertor.java similarity index 86% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMResponseConvertor.java index 54211055f12..3c97e7ba64e 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMResponseConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyResponseProto; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.RegisterTMResponseProto; -import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterTMResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; import org.apache.seata.core.protocol.RegisterTMResponse; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java similarity index 84% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java index c8a21d3e1b8..d425bc5c008 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.serializer.protobuf.generated.UndoLogDeleteRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.core.serializer.protobuf.generated.UndoLogDeleteRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.UndoLogDeleteRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequest.java new file mode 100644 index 00000000000..16efda81244 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequest.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractBranchEndRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractBranchEndRequest { + private AbstractBranchEndRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\036abstractBranchEndRequest.proto\022\"org.ap" + + "ache.seata.protocol.protobuf\032 abstractTr" + + "ansactionRequest.proto\032\020branchType.proto" + + "\"\235\002\n\035AbstractBranchEndRequestProto\022g\n\032ab" + + "stractTransactionRequest\030\001 \001(\0132C.org.apa" + + "che.seata.protocol.protobuf.AbstractTran" + + "sactionRequestProto\022\013\n\003xid\030\002 \001(\t\022\020\n\010bran" + + "chId\030\003 \001(\003\022G\n\nbranchType\030\004 \001(\01623.org.apa" + + "che.seata.protocol.protobuf.BranchTypePr" + + "oto\022\022\n\nresourceId\030\005 \001(\t\022\027\n\017applicationDa" + + "ta\030\006 \001(\tBQ\n3org.apache.seata.core.serial" + + "izer.protobuf.generatedB\030AbstractBranchE" + + "ndRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionRequest.getDescriptor(), + BranchType.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor, + new String[] { "AbstractTransactionRequest", "Xid", "BranchId", "BranchType", "ResourceId", "ApplicationData", }); + AbstractTransactionRequest.getDescriptor(); + BranchType.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProto.java new file mode 100644 index 00000000000..449ba46252c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProto.java @@ -0,0 +1,1317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractBranchEndRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto} + */ +public final class AbstractBranchEndRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) + AbstractBranchEndRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractBranchEndRequestProto.newBuilder() to construct. + private AbstractBranchEndRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractBranchEndRequestProto() { + xid_ = ""; + branchType_ = 0; + resourceId_ = ""; + applicationData_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractBranchEndRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractBranchEndRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionRequestProto.Builder subBuilder = null; + if (abstractTransactionRequest_ != null) { + subBuilder = abstractTransactionRequest_.toBuilder(); + } + abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionRequest_); + abstractTransactionRequest_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + xid_ = s; + break; + } + case 24: { + + branchId_ = input.readInt64(); + break; + } + case 32: { + int rawValue = input.readEnum(); + + branchType_ = rawValue; + break; + } + case 42: { + String s = input.readStringRequireUtf8(); + + resourceId_ = s; + break; + } + case 50: { + String s = input.readStringRequireUtf8(); + + applicationData_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractBranchEndRequestProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; + private AbstractTransactionRequestProto abstractTransactionRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + @Override + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + @Override + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + @Override + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + return getAbstractTransactionRequest(); + } + + public static final int XID_FIELD_NUMBER = 2; + private volatile Object xid_; + /** + * string xid = 2; + * @return The xid. + */ + @Override + public String getXid() { + Object ref = xid_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + @Override + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCHID_FIELD_NUMBER = 3; + private long branchId_; + /** + *
+   **
+   * The Branch id.
+   * 
+ * + * int64 branchId = 3; + * @return The branchId. + */ + @Override + public long getBranchId() { + return branchId_; + } + + public static final int BRANCHTYPE_FIELD_NUMBER = 4; + private int branchType_; + /** + *
+   **
+   * The Branch type.
+   * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The enum numeric value on the wire for branchType. + */ + @Override public int getBranchTypeValue() { + return branchType_; + } + /** + *
+   **
+   * The Branch type.
+   * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The branchType. + */ + @Override public BranchTypeProto getBranchType() { + @SuppressWarnings("deprecation") + BranchTypeProto result = BranchTypeProto.valueOf(branchType_); + return result == null ? BranchTypeProto.UNRECOGNIZED : result; + } + + public static final int RESOURCEID_FIELD_NUMBER = 5; + private volatile Object resourceId_; + /** + *
+   **
+   * The Resource id.
+   * 
+ * + * string resourceId = 5; + * @return The resourceId. + */ + @Override + public String getResourceId() { + Object ref = resourceId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } + } + /** + *
+   **
+   * The Resource id.
+   * 
+ * + * string resourceId = 5; + * @return The bytes for resourceId. + */ + @Override + public com.google.protobuf.ByteString + getResourceIdBytes() { + Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATIONDATA_FIELD_NUMBER = 6; + private volatile Object applicationData_; + /** + *
+   **
+   * The Application data.
+   * 
+ * + * string applicationData = 6; + * @return The applicationData. + */ + @Override + public String getApplicationData() { + Object ref = applicationData_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + applicationData_ = s; + return s; + } + } + /** + *
+   **
+   * The Application data.
+   * 
+ * + * string applicationData = 6; + * @return The bytes for applicationData. + */ + @Override + public com.google.protobuf.ByteString + getApplicationDataBytes() { + Object ref = applicationData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + applicationData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionRequest_ != null) { + output.writeMessage(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); + } + if (branchId_ != 0L) { + output.writeInt64(3, branchId_); + } + if (branchType_ != BranchTypeProto.AT.getNumber()) { + output.writeEnum(4, branchType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, resourceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); + } + if (branchId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, branchId_); + } + if (branchType_ != BranchTypeProto.AT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, branchType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, resourceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractBranchEndRequestProto)) { + return super.equals(obj); + } + AbstractBranchEndRequestProto other = (AbstractBranchEndRequestProto) obj; + + if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; + if (hasAbstractTransactionRequest()) { + if (!getAbstractTransactionRequest() + .equals(other.getAbstractTransactionRequest())) return false; + } + if (!getXid() + .equals(other.getXid())) return false; + if (getBranchId() + != other.getBranchId()) return false; + if (branchType_ != other.branchType_) return false; + if (!getResourceId() + .equals(other.getResourceId())) return false; + if (!getApplicationData() + .equals(other.getApplicationData())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionRequest()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); + } + hash = (37 * hash) + XID_FIELD_NUMBER; + hash = (53 * hash) + getXid().hashCode(); + hash = (37 * hash) + BRANCHID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBranchId()); + hash = (37 * hash) + BRANCHTYPE_FIELD_NUMBER; + hash = (53 * hash) + branchType_; + hash = (37 * hash) + RESOURCEID_FIELD_NUMBER; + hash = (53 * hash) + getResourceId().hashCode(); + hash = (37 * hash) + APPLICATIONDATA_FIELD_NUMBER; + hash = (53 * hash) + getApplicationData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractBranchEndRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractBranchEndRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractBranchEndRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractBranchEndRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractBranchEndRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractBranchEndRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractBranchEndRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractBranchEndRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractBranchEndRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractBranchEndRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractBranchEndRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractBranchEndRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractBranchEndRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) + AbstractBranchEndRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractBranchEndRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + xid_ = ""; + + branchId_ = 0L; + + branchType_ = 0; + + resourceId_ = ""; + + applicationData_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; + } + + @Override + public AbstractBranchEndRequestProto getDefaultInstanceForType() { + return AbstractBranchEndRequestProto.getDefaultInstance(); + } + + @Override + public AbstractBranchEndRequestProto build() { + AbstractBranchEndRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractBranchEndRequestProto buildPartial() { + AbstractBranchEndRequestProto result = new AbstractBranchEndRequestProto(this); + if (abstractTransactionRequestBuilder_ == null) { + result.abstractTransactionRequest_ = abstractTransactionRequest_; + } else { + result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); + } + result.xid_ = xid_; + result.branchId_ = branchId_; + result.branchType_ = branchType_; + result.resourceId_ = resourceId_; + result.applicationData_ = applicationData_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractBranchEndRequestProto) { + return mergeFrom((AbstractBranchEndRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractBranchEndRequestProto other) { + if (other == AbstractBranchEndRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionRequest()) { + mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); + } + if (!other.getXid().isEmpty()) { + xid_ = other.xid_; + onChanged(); + } + if (other.getBranchId() != 0L) { + setBranchId(other.getBranchId()); + } + if (other.branchType_ != 0) { + setBranchTypeValue(other.getBranchTypeValue()); + } + if (!other.getResourceId().isEmpty()) { + resourceId_ = other.resourceId_; + onChanged(); + } + if (!other.getApplicationData().isEmpty()) { + applicationData_ = other.applicationData_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractBranchEndRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractBranchEndRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionRequestProto abstractTransactionRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } else { + return abstractTransactionRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionRequest_ = value; + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest( + AbstractTransactionRequestProto.Builder builderForValue) { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (abstractTransactionRequest_ != null) { + abstractTransactionRequest_ = + AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionRequest_ = value; + } + onChanged(); + } else { + abstractTransactionRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder clearAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + onChanged(); + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { + + onChanged(); + return getAbstractTransactionRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + if (abstractTransactionRequestBuilder_ != null) { + return abstractTransactionRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionRequest_ == null ? + AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> + getAbstractTransactionRequestFieldBuilder() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( + getAbstractTransactionRequest(), + getParentForChildren(), + isClean()); + abstractTransactionRequest_ = null; + } + return abstractTransactionRequestBuilder_; + } + + private Object xid_ = ""; + /** + * string xid = 2; + * @return The xid. + */ + public String getXid() { + Object ref = xid_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string xid = 2; + * @param value The xid to set. + * @return This builder for chaining. + */ + public Builder setXid( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + xid_ = value; + onChanged(); + return this; + } + /** + * string xid = 2; + * @return This builder for chaining. + */ + public Builder clearXid() { + + xid_ = getDefaultInstance().getXid(); + onChanged(); + return this; + } + /** + * string xid = 2; + * @param value The bytes for xid to set. + * @return This builder for chaining. + */ + public Builder setXidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + xid_ = value; + onChanged(); + return this; + } + + private long branchId_ ; + /** + *
+     **
+     * The Branch id.
+     * 
+ * + * int64 branchId = 3; + * @return The branchId. + */ + @Override + public long getBranchId() { + return branchId_; + } + /** + *
+     **
+     * The Branch id.
+     * 
+ * + * int64 branchId = 3; + * @param value The branchId to set. + * @return This builder for chaining. + */ + public Builder setBranchId(long value) { + + branchId_ = value; + onChanged(); + return this; + } + /** + *
+     **
+     * The Branch id.
+     * 
+ * + * int64 branchId = 3; + * @return This builder for chaining. + */ + public Builder clearBranchId() { + + branchId_ = 0L; + onChanged(); + return this; + } + + private int branchType_ = 0; + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The enum numeric value on the wire for branchType. + */ + @Override public int getBranchTypeValue() { + return branchType_; + } + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @param value The enum numeric value on the wire for branchType to set. + * @return This builder for chaining. + */ + public Builder setBranchTypeValue(int value) { + + branchType_ = value; + onChanged(); + return this; + } + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The branchType. + */ + @Override + public BranchTypeProto getBranchType() { + @SuppressWarnings("deprecation") + BranchTypeProto result = BranchTypeProto.valueOf(branchType_); + return result == null ? BranchTypeProto.UNRECOGNIZED : result; + } + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @param value The branchType to set. + * @return This builder for chaining. + */ + public Builder setBranchType(BranchTypeProto value) { + if (value == null) { + throw new NullPointerException(); + } + + branchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return This builder for chaining. + */ + public Builder clearBranchType() { + + branchType_ = 0; + onChanged(); + return this; + } + + private Object resourceId_ = ""; + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 5; + * @return The resourceId. + */ + public String getResourceId() { + Object ref = resourceId_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } else { + return (String) ref; + } + } + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 5; + * @return The bytes for resourceId. + */ + public com.google.protobuf.ByteString + getResourceIdBytes() { + Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 5; + * @param value The resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceId( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceId_ = value; + onChanged(); + return this; + } + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 5; + * @return This builder for chaining. + */ + public Builder clearResourceId() { + + resourceId_ = getDefaultInstance().getResourceId(); + onChanged(); + return this; + } + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 5; + * @param value The bytes for resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceId_ = value; + onChanged(); + return this; + } + + private Object applicationData_ = ""; + /** + *
+     **
+     * The Application data.
+     * 
+ * + * string applicationData = 6; + * @return The applicationData. + */ + public String getApplicationData() { + Object ref = applicationData_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + applicationData_ = s; + return s; + } else { + return (String) ref; + } + } + /** + *
+     **
+     * The Application data.
+     * 
+ * + * string applicationData = 6; + * @return The bytes for applicationData. + */ + public com.google.protobuf.ByteString + getApplicationDataBytes() { + Object ref = applicationData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + applicationData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     **
+     * The Application data.
+     * 
+ * + * string applicationData = 6; + * @param value The applicationData to set. + * @return This builder for chaining. + */ + public Builder setApplicationData( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationData_ = value; + onChanged(); + return this; + } + /** + *
+     **
+     * The Application data.
+     * 
+ * + * string applicationData = 6; + * @return This builder for chaining. + */ + public Builder clearApplicationData() { + + applicationData_ = getDefaultInstance().getApplicationData(); + onChanged(); + return this; + } + /** + *
+     **
+     * The Application data.
+     * 
+ * + * string applicationData = 6; + * @param value The bytes for applicationData to set. + * @return This builder for chaining. + */ + public Builder setApplicationDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationData_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) + private static final AbstractBranchEndRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractBranchEndRequestProto(); + } + + public static AbstractBranchEndRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractBranchEndRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractBranchEndRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractBranchEndRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java new file mode 100644 index 00000000000..95399143645 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractBranchEndRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractBranchEndRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + boolean hasAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + AbstractTransactionRequestProto getAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); + + /** + * string xid = 2; + * @return The xid. + */ + String getXid(); + /** + * string xid = 2; + * @return The bytes for xid. + */ + com.google.protobuf.ByteString + getXidBytes(); + + /** + *
+   **
+   * The Branch id.
+   * 
+ * + * int64 branchId = 3; + * @return The branchId. + */ + long getBranchId(); + + /** + *
+   **
+   * The Branch type.
+   * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The enum numeric value on the wire for branchType. + */ + int getBranchTypeValue(); + /** + *
+   **
+   * The Branch type.
+   * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The branchType. + */ + BranchTypeProto getBranchType(); + + /** + *
+   **
+   * The Resource id.
+   * 
+ * + * string resourceId = 5; + * @return The resourceId. + */ + String getResourceId(); + /** + *
+   **
+   * The Resource id.
+   * 
+ * + * string resourceId = 5; + * @return The bytes for resourceId. + */ + com.google.protobuf.ByteString + getResourceIdBytes(); + + /** + *
+   **
+   * The Application data.
+   * 
+ * + * string applicationData = 6; + * @return The applicationData. + */ + String getApplicationData(); + /** + *
+   **
+   * The Application data.
+   * 
+ * + * string applicationData = 6; + * @return The bytes for applicationData. + */ + com.google.protobuf.ByteString + getApplicationDataBytes(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponse.java new file mode 100644 index 00000000000..d5ca539c0dc --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponse.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractBranchEndResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractBranchEndResponse { + private AbstractBranchEndResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\037abstractBranchEndResponse.proto\022\"org.a" + + "pache.seata.protocol.protobuf\032!abstractT" + + "ransactionResponse.proto\032\022branchStatus.p" + + "roto\"\367\001\n\036AbstractBranchEndResponseProto\022" + + "i\n\033abstractTransactionResponse\030\001 \001(\0132D.o" + + "rg.apache.seata.protocol.protobuf.Abstra" + + "ctTransactionResponseProto\022\013\n\003xid\030\002 \001(\t\022" + + "\020\n\010branchId\030\003 \001(\003\022K\n\014branchStatus\030\004 \001(\0162" + + "5.org.apache.seata.protocol.protobuf.Bra" + + "nchStatusProtoBR\n3org.apache.seata.core." + + "serializer.protobuf.generatedB\031AbstractB" + + "ranchEndResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionResponse.getDescriptor(), + BranchStatus.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor, + new String[] { "AbstractTransactionResponse", "Xid", "BranchId", "BranchStatus", }); + AbstractTransactionResponse.getDescriptor(); + BranchStatus.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProto.java new file mode 100644 index 00000000000..c819656df91 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProto.java @@ -0,0 +1,916 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractBranchEndResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto} + */ +public final class AbstractBranchEndResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) + AbstractBranchEndResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractBranchEndResponseProto.newBuilder() to construct. + private AbstractBranchEndResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractBranchEndResponseProto() { + xid_ = ""; + branchStatus_ = 0; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractBranchEndResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractBranchEndResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionResponseProto.Builder subBuilder = null; + if (abstractTransactionResponse_ != null) { + subBuilder = abstractTransactionResponse_.toBuilder(); + } + abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionResponse_); + abstractTransactionResponse_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + xid_ = s; + break; + } + case 24: { + + branchId_ = input.readInt64(); + break; + } + case 32: { + int rawValue = input.readEnum(); + + branchStatus_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractBranchEndResponseProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; + private AbstractTransactionResponseProto abstractTransactionResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + @Override + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + @Override + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + @Override + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + return getAbstractTransactionResponse(); + } + + public static final int XID_FIELD_NUMBER = 2; + private volatile Object xid_; + /** + * string xid = 2; + * @return The xid. + */ + @Override + public String getXid() { + Object ref = xid_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + @Override + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCHID_FIELD_NUMBER = 3; + private long branchId_; + /** + * int64 branchId = 3; + * @return The branchId. + */ + @Override + public long getBranchId() { + return branchId_; + } + + public static final int BRANCHSTATUS_FIELD_NUMBER = 4; + private int branchStatus_; + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @return The enum numeric value on the wire for branchStatus. + */ + @Override public int getBranchStatusValue() { + return branchStatus_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @return The branchStatus. + */ + @Override public BranchStatusProto getBranchStatus() { + @SuppressWarnings("deprecation") + BranchStatusProto result = BranchStatusProto.valueOf(branchStatus_); + return result == null ? BranchStatusProto.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionResponse_ != null) { + output.writeMessage(1, getAbstractTransactionResponse()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); + } + if (branchId_ != 0L) { + output.writeInt64(3, branchId_); + } + if (branchStatus_ != BranchStatusProto.BUnknown.getNumber()) { + output.writeEnum(4, branchStatus_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionResponse()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); + } + if (branchId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, branchId_); + } + if (branchStatus_ != BranchStatusProto.BUnknown.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, branchStatus_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractBranchEndResponseProto)) { + return super.equals(obj); + } + AbstractBranchEndResponseProto other = (AbstractBranchEndResponseProto) obj; + + if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; + if (hasAbstractTransactionResponse()) { + if (!getAbstractTransactionResponse() + .equals(other.getAbstractTransactionResponse())) return false; + } + if (!getXid() + .equals(other.getXid())) return false; + if (getBranchId() + != other.getBranchId()) return false; + if (branchStatus_ != other.branchStatus_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionResponse()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); + } + hash = (37 * hash) + XID_FIELD_NUMBER; + hash = (53 * hash) + getXid().hashCode(); + hash = (37 * hash) + BRANCHID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBranchId()); + hash = (37 * hash) + BRANCHSTATUS_FIELD_NUMBER; + hash = (53 * hash) + branchStatus_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractBranchEndResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractBranchEndResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractBranchEndResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractBranchEndResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractBranchEndResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractBranchEndResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractBranchEndResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractBranchEndResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractBranchEndResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractBranchEndResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractBranchEndResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractBranchEndResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractBranchEndResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) + AbstractBranchEndResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractBranchEndResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + xid_ = ""; + + branchId_ = 0L; + + branchStatus_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; + } + + @Override + public AbstractBranchEndResponseProto getDefaultInstanceForType() { + return AbstractBranchEndResponseProto.getDefaultInstance(); + } + + @Override + public AbstractBranchEndResponseProto build() { + AbstractBranchEndResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractBranchEndResponseProto buildPartial() { + AbstractBranchEndResponseProto result = new AbstractBranchEndResponseProto(this); + if (abstractTransactionResponseBuilder_ == null) { + result.abstractTransactionResponse_ = abstractTransactionResponse_; + } else { + result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); + } + result.xid_ = xid_; + result.branchId_ = branchId_; + result.branchStatus_ = branchStatus_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractBranchEndResponseProto) { + return mergeFrom((AbstractBranchEndResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractBranchEndResponseProto other) { + if (other == AbstractBranchEndResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionResponse()) { + mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); + } + if (!other.getXid().isEmpty()) { + xid_ = other.xid_; + onChanged(); + } + if (other.getBranchId() != 0L) { + setBranchId(other.getBranchId()); + } + if (other.branchStatus_ != 0) { + setBranchStatusValue(other.getBranchStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractBranchEndResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractBranchEndResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionResponseProto abstractTransactionResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } else { + return abstractTransactionResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionResponse_ = value; + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse( + AbstractTransactionResponseProto.Builder builderForValue) { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (abstractTransactionResponse_ != null) { + abstractTransactionResponse_ = + AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionResponse_ = value; + } + onChanged(); + } else { + abstractTransactionResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder clearAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + onChanged(); + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { + + onChanged(); + return getAbstractTransactionResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + if (abstractTransactionResponseBuilder_ != null) { + return abstractTransactionResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionResponse_ == null ? + AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> + getAbstractTransactionResponseFieldBuilder() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( + getAbstractTransactionResponse(), + getParentForChildren(), + isClean()); + abstractTransactionResponse_ = null; + } + return abstractTransactionResponseBuilder_; + } + + private Object xid_ = ""; + /** + * string xid = 2; + * @return The xid. + */ + public String getXid() { + Object ref = xid_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string xid = 2; + * @param value The xid to set. + * @return This builder for chaining. + */ + public Builder setXid( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + xid_ = value; + onChanged(); + return this; + } + /** + * string xid = 2; + * @return This builder for chaining. + */ + public Builder clearXid() { + + xid_ = getDefaultInstance().getXid(); + onChanged(); + return this; + } + /** + * string xid = 2; + * @param value The bytes for xid to set. + * @return This builder for chaining. + */ + public Builder setXidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + xid_ = value; + onChanged(); + return this; + } + + private long branchId_ ; + /** + * int64 branchId = 3; + * @return The branchId. + */ + @Override + public long getBranchId() { + return branchId_; + } + /** + * int64 branchId = 3; + * @param value The branchId to set. + * @return This builder for chaining. + */ + public Builder setBranchId(long value) { + + branchId_ = value; + onChanged(); + return this; + } + /** + * int64 branchId = 3; + * @return This builder for chaining. + */ + public Builder clearBranchId() { + + branchId_ = 0L; + onChanged(); + return this; + } + + private int branchStatus_ = 0; + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @return The enum numeric value on the wire for branchStatus. + */ + @Override public int getBranchStatusValue() { + return branchStatus_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @param value The enum numeric value on the wire for branchStatus to set. + * @return This builder for chaining. + */ + public Builder setBranchStatusValue(int value) { + + branchStatus_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @return The branchStatus. + */ + @Override + public BranchStatusProto getBranchStatus() { + @SuppressWarnings("deprecation") + BranchStatusProto result = BranchStatusProto.valueOf(branchStatus_); + return result == null ? BranchStatusProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @param value The branchStatus to set. + * @return This builder for chaining. + */ + public Builder setBranchStatus(BranchStatusProto value) { + if (value == null) { + throw new NullPointerException(); + } + + branchStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @return This builder for chaining. + */ + public Builder clearBranchStatus() { + + branchStatus_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) + private static final AbstractBranchEndResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractBranchEndResponseProto(); + } + + public static AbstractBranchEndResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractBranchEndResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractBranchEndResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractBranchEndResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java new file mode 100644 index 00000000000..a2347833015 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractBranchEndResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractBranchEndResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + boolean hasAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + AbstractTransactionResponseProto getAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); + + /** + * string xid = 2; + * @return The xid. + */ + String getXid(); + /** + * string xid = 2; + * @return The bytes for xid. + */ + com.google.protobuf.ByteString + getXidBytes(); + + /** + * int64 branchId = 3; + * @return The branchId. + */ + long getBranchId(); + + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @return The enum numeric value on the wire for branchStatus. + */ + int getBranchStatusValue(); + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; + * @return The branchStatus. + */ + BranchStatusProto getBranchStatus(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequest.java new file mode 100644 index 00000000000..2bc450d87bf --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequest.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractGlobalEndRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractGlobalEndRequest { + private AbstractGlobalEndRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\036abstractGlobalEndRequest.proto\022\"org.ap" + + "ache.seata.protocol.protobuf\032 abstractTr" + + "ansactionRequest.proto\"\250\001\n\035AbstractGloba" + + "lEndRequestProto\022g\n\032abstractTransactionR" + + "equest\030\001 \001(\0132C.org.apache.seata.protocol" + + ".protobuf.AbstractTransactionRequestProt" + + "o\022\013\n\003xid\030\002 \001(\t\022\021\n\textraData\030\003 \001(\tBQ\n3org" + + ".apache.seata.core.serializer.protobuf.g" + + "eneratedB\030AbstractGlobalEndRequestP\001b\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor, + new String[] { "AbstractTransactionRequest", "Xid", "ExtraData", }); + AbstractTransactionRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProto.java new file mode 100644 index 00000000000..8d64b539c1a --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProto.java @@ -0,0 +1,893 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractGlobalEndRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto} + */ +public final class AbstractGlobalEndRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) + AbstractGlobalEndRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractGlobalEndRequestProto.newBuilder() to construct. + private AbstractGlobalEndRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractGlobalEndRequestProto() { + xid_ = ""; + extraData_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractGlobalEndRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractGlobalEndRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionRequestProto.Builder subBuilder = null; + if (abstractTransactionRequest_ != null) { + subBuilder = abstractTransactionRequest_.toBuilder(); + } + abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionRequest_); + abstractTransactionRequest_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + xid_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + extraData_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractGlobalEndRequestProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; + private AbstractTransactionRequestProto abstractTransactionRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + @Override + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + @Override + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + @Override + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + return getAbstractTransactionRequest(); + } + + public static final int XID_FIELD_NUMBER = 2; + private volatile Object xid_; + /** + * string xid = 2; + * @return The xid. + */ + @Override + public String getXid() { + Object ref = xid_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + @Override + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTRADATA_FIELD_NUMBER = 3; + private volatile Object extraData_; + /** + * string extraData = 3; + * @return The extraData. + */ + @Override + public String getExtraData() { + Object ref = extraData_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + extraData_ = s; + return s; + } + } + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + @Override + public com.google.protobuf.ByteString + getExtraDataBytes() { + Object ref = extraData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + extraData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionRequest_ != null) { + output.writeMessage(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extraData_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractGlobalEndRequestProto)) { + return super.equals(obj); + } + AbstractGlobalEndRequestProto other = (AbstractGlobalEndRequestProto) obj; + + if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; + if (hasAbstractTransactionRequest()) { + if (!getAbstractTransactionRequest() + .equals(other.getAbstractTransactionRequest())) return false; + } + if (!getXid() + .equals(other.getXid())) return false; + if (!getExtraData() + .equals(other.getExtraData())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionRequest()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); + } + hash = (37 * hash) + XID_FIELD_NUMBER; + hash = (53 * hash) + getXid().hashCode(); + hash = (37 * hash) + EXTRADATA_FIELD_NUMBER; + hash = (53 * hash) + getExtraData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractGlobalEndRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractGlobalEndRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractGlobalEndRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractGlobalEndRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractGlobalEndRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractGlobalEndRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractGlobalEndRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractGlobalEndRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractGlobalEndRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractGlobalEndRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractGlobalEndRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractGlobalEndRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractGlobalEndRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) + AbstractGlobalEndRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractGlobalEndRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + xid_ = ""; + + extraData_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; + } + + @Override + public AbstractGlobalEndRequestProto getDefaultInstanceForType() { + return AbstractGlobalEndRequestProto.getDefaultInstance(); + } + + @Override + public AbstractGlobalEndRequestProto build() { + AbstractGlobalEndRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractGlobalEndRequestProto buildPartial() { + AbstractGlobalEndRequestProto result = new AbstractGlobalEndRequestProto(this); + if (abstractTransactionRequestBuilder_ == null) { + result.abstractTransactionRequest_ = abstractTransactionRequest_; + } else { + result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); + } + result.xid_ = xid_; + result.extraData_ = extraData_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractGlobalEndRequestProto) { + return mergeFrom((AbstractGlobalEndRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractGlobalEndRequestProto other) { + if (other == AbstractGlobalEndRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionRequest()) { + mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); + } + if (!other.getXid().isEmpty()) { + xid_ = other.xid_; + onChanged(); + } + if (!other.getExtraData().isEmpty()) { + extraData_ = other.extraData_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractGlobalEndRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractGlobalEndRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionRequestProto abstractTransactionRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } else { + return abstractTransactionRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionRequest_ = value; + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest( + AbstractTransactionRequestProto.Builder builderForValue) { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (abstractTransactionRequest_ != null) { + abstractTransactionRequest_ = + AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionRequest_ = value; + } + onChanged(); + } else { + abstractTransactionRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder clearAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + onChanged(); + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { + + onChanged(); + return getAbstractTransactionRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + if (abstractTransactionRequestBuilder_ != null) { + return abstractTransactionRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionRequest_ == null ? + AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> + getAbstractTransactionRequestFieldBuilder() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( + getAbstractTransactionRequest(), + getParentForChildren(), + isClean()); + abstractTransactionRequest_ = null; + } + return abstractTransactionRequestBuilder_; + } + + private Object xid_ = ""; + /** + * string xid = 2; + * @return The xid. + */ + public String getXid() { + Object ref = xid_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string xid = 2; + * @param value The xid to set. + * @return This builder for chaining. + */ + public Builder setXid( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + xid_ = value; + onChanged(); + return this; + } + /** + * string xid = 2; + * @return This builder for chaining. + */ + public Builder clearXid() { + + xid_ = getDefaultInstance().getXid(); + onChanged(); + return this; + } + /** + * string xid = 2; + * @param value The bytes for xid to set. + * @return This builder for chaining. + */ + public Builder setXidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + xid_ = value; + onChanged(); + return this; + } + + private Object extraData_ = ""; + /** + * string extraData = 3; + * @return The extraData. + */ + public String getExtraData() { + Object ref = extraData_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + extraData_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + public com.google.protobuf.ByteString + getExtraDataBytes() { + Object ref = extraData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + extraData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string extraData = 3; + * @param value The extraData to set. + * @return This builder for chaining. + */ + public Builder setExtraData( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + extraData_ = value; + onChanged(); + return this; + } + /** + * string extraData = 3; + * @return This builder for chaining. + */ + public Builder clearExtraData() { + + extraData_ = getDefaultInstance().getExtraData(); + onChanged(); + return this; + } + /** + * string extraData = 3; + * @param value The bytes for extraData to set. + * @return This builder for chaining. + */ + public Builder setExtraDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + extraData_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) + private static final AbstractGlobalEndRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractGlobalEndRequestProto(); + } + + public static AbstractGlobalEndRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractGlobalEndRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractGlobalEndRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractGlobalEndRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java new file mode 100644 index 00000000000..8e1e0a05298 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractGlobalEndRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractGlobalEndRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + boolean hasAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + AbstractTransactionRequestProto getAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); + + /** + * string xid = 2; + * @return The xid. + */ + String getXid(); + /** + * string xid = 2; + * @return The bytes for xid. + */ + com.google.protobuf.ByteString + getXidBytes(); + + /** + * string extraData = 3; + * @return The extraData. + */ + String getExtraData(); + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + com.google.protobuf.ByteString + getExtraDataBytes(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponse.java new file mode 100644 index 00000000000..80a0cfb2ef7 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponse.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractGlobalEndResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractGlobalEndResponse { + private AbstractGlobalEndResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\037abstractGlobalEndResponse.proto\022\"org.a" + + "pache.seata.protocol.protobuf\032!abstractT" + + "ransactionResponse.proto\032\022globalStatus.p" + + "roto\"\330\001\n\036AbstractGlobalEndResponseProto\022" + + "i\n\033abstractTransactionResponse\030\001 \001(\0132D.o" + + "rg.apache.seata.protocol.protobuf.Abstra" + + "ctTransactionResponseProto\022K\n\014globalStat" + + "us\030\002 \001(\01625.org.apache.seata.protocol.pro" + + "tobuf.GlobalStatusProtoBR\n3org.apache.se" + + "ata.core.serializer.protobuf.generatedB\031" + + "AbstractGlobalEndResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionResponse.getDescriptor(), + GlobalStatus.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor, + new String[] { "AbstractTransactionResponse", "GlobalStatus", }); + AbstractTransactionResponse.getDescriptor(); + GlobalStatus.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProto.java new file mode 100644 index 00000000000..6c517a7a933 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProto.java @@ -0,0 +1,713 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractGlobalEndResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto} + */ +public final class AbstractGlobalEndResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) + AbstractGlobalEndResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractGlobalEndResponseProto.newBuilder() to construct. + private AbstractGlobalEndResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractGlobalEndResponseProto() { + globalStatus_ = 0; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractGlobalEndResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractGlobalEndResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionResponseProto.Builder subBuilder = null; + if (abstractTransactionResponse_ != null) { + subBuilder = abstractTransactionResponse_.toBuilder(); + } + abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionResponse_); + abstractTransactionResponse_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + globalStatus_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractGlobalEndResponseProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; + private AbstractTransactionResponseProto abstractTransactionResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + @Override + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + @Override + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + @Override + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + return getAbstractTransactionResponse(); + } + + public static final int GLOBALSTATUS_FIELD_NUMBER = 2; + private int globalStatus_; + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The enum numeric value on the wire for globalStatus. + */ + @Override public int getGlobalStatusValue() { + return globalStatus_; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The globalStatus. + */ + @Override public GlobalStatusProto getGlobalStatus() { + @SuppressWarnings("deprecation") + GlobalStatusProto result = GlobalStatusProto.valueOf(globalStatus_); + return result == null ? GlobalStatusProto.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionResponse_ != null) { + output.writeMessage(1, getAbstractTransactionResponse()); + } + if (globalStatus_ != GlobalStatusProto.UnKnown.getNumber()) { + output.writeEnum(2, globalStatus_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionResponse()); + } + if (globalStatus_ != GlobalStatusProto.UnKnown.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, globalStatus_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractGlobalEndResponseProto)) { + return super.equals(obj); + } + AbstractGlobalEndResponseProto other = (AbstractGlobalEndResponseProto) obj; + + if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; + if (hasAbstractTransactionResponse()) { + if (!getAbstractTransactionResponse() + .equals(other.getAbstractTransactionResponse())) return false; + } + if (globalStatus_ != other.globalStatus_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionResponse()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); + } + hash = (37 * hash) + GLOBALSTATUS_FIELD_NUMBER; + hash = (53 * hash) + globalStatus_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractGlobalEndResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractGlobalEndResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractGlobalEndResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractGlobalEndResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractGlobalEndResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractGlobalEndResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractGlobalEndResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractGlobalEndResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractGlobalEndResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractGlobalEndResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractGlobalEndResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractGlobalEndResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractGlobalEndResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) + AbstractGlobalEndResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractGlobalEndResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + globalStatus_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; + } + + @Override + public AbstractGlobalEndResponseProto getDefaultInstanceForType() { + return AbstractGlobalEndResponseProto.getDefaultInstance(); + } + + @Override + public AbstractGlobalEndResponseProto build() { + AbstractGlobalEndResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractGlobalEndResponseProto buildPartial() { + AbstractGlobalEndResponseProto result = new AbstractGlobalEndResponseProto(this); + if (abstractTransactionResponseBuilder_ == null) { + result.abstractTransactionResponse_ = abstractTransactionResponse_; + } else { + result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); + } + result.globalStatus_ = globalStatus_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractGlobalEndResponseProto) { + return mergeFrom((AbstractGlobalEndResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractGlobalEndResponseProto other) { + if (other == AbstractGlobalEndResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionResponse()) { + mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); + } + if (other.globalStatus_ != 0) { + setGlobalStatusValue(other.getGlobalStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractGlobalEndResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractGlobalEndResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionResponseProto abstractTransactionResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } else { + return abstractTransactionResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionResponse_ = value; + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse( + AbstractTransactionResponseProto.Builder builderForValue) { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (abstractTransactionResponse_ != null) { + abstractTransactionResponse_ = + AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionResponse_ = value; + } + onChanged(); + } else { + abstractTransactionResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder clearAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + onChanged(); + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { + + onChanged(); + return getAbstractTransactionResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + if (abstractTransactionResponseBuilder_ != null) { + return abstractTransactionResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionResponse_ == null ? + AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> + getAbstractTransactionResponseFieldBuilder() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( + getAbstractTransactionResponse(), + getParentForChildren(), + isClean()); + abstractTransactionResponse_ = null; + } + return abstractTransactionResponseBuilder_; + } + + private int globalStatus_ = 0; + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The enum numeric value on the wire for globalStatus. + */ + @Override public int getGlobalStatusValue() { + return globalStatus_; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @param value The enum numeric value on the wire for globalStatus to set. + * @return This builder for chaining. + */ + public Builder setGlobalStatusValue(int value) { + + globalStatus_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The globalStatus. + */ + @Override + public GlobalStatusProto getGlobalStatus() { + @SuppressWarnings("deprecation") + GlobalStatusProto result = GlobalStatusProto.valueOf(globalStatus_); + return result == null ? GlobalStatusProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @param value The globalStatus to set. + * @return This builder for chaining. + */ + public Builder setGlobalStatus(GlobalStatusProto value) { + if (value == null) { + throw new NullPointerException(); + } + + globalStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return This builder for chaining. + */ + public Builder clearGlobalStatus() { + + globalStatus_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) + private static final AbstractGlobalEndResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractGlobalEndResponseProto(); + } + + public static AbstractGlobalEndResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractGlobalEndResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractGlobalEndResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractGlobalEndResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java new file mode 100644 index 00000000000..2b78f5cb240 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractGlobalEndResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractGlobalEndResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + boolean hasAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + AbstractTransactionResponseProto getAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); + + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The enum numeric value on the wire for globalStatus. + */ + int getGlobalStatusValue(); + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The globalStatus. + */ + GlobalStatusProto getGlobalStatus(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequest.java new file mode 100644 index 00000000000..e883b233176 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequest.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractIdentifyRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractIdentifyRequest { + private AbstractIdentifyRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\035abstractIdentifyRequest.proto\022\"org.apa" + + "che.seata.protocol.protobuf\032\025abstractMes" + + "sage.proto\"\315\001\n\034AbstractIdentifyRequestPr" + + "oto\022Q\n\017abstractMessage\030\001 \001(\01328.org.apach" + + "e.seata.protocol.protobuf.AbstractMessag" + + "eProto\022\017\n\007version\030\002 \001(\t\022\025\n\rapplicationId" + + "\030\003 \001(\t\022\037\n\027transactionServiceGroup\030\004 \001(\t\022" + + "\021\n\textraData\030\005 \001(\tBP\n3org.apache.seata.c" + + "ore.serializer.protobuf.generatedB\027Abstr" + + "actIdentifyRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractMessage.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor, + new String[] { "AbstractMessage", "Version", "ApplicationId", "TransactionServiceGroup", "ExtraData", }); + AbstractMessage.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProto.java new file mode 100644 index 00000000000..3e72f403aa9 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProto.java @@ -0,0 +1,1169 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractIdentifyRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto} + */ +public final class AbstractIdentifyRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) + AbstractIdentifyRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractIdentifyRequestProto.newBuilder() to construct. + private AbstractIdentifyRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractIdentifyRequestProto() { + version_ = ""; + applicationId_ = ""; + transactionServiceGroup_ = ""; + extraData_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractIdentifyRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractIdentifyRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractMessageProto.Builder subBuilder = null; + if (abstractMessage_ != null) { + subBuilder = abstractMessage_.toBuilder(); + } + abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractMessage_); + abstractMessage_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + applicationId_ = s; + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + transactionServiceGroup_ = s; + break; + } + case 42: { + String s = input.readStringRequireUtf8(); + + extraData_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractIdentifyRequestProto.class, Builder.class); + } + + public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; + private AbstractMessageProto abstractMessage_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + @Override + public boolean hasAbstractMessage() { + return abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + @Override + public AbstractMessageProto getAbstractMessage() { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + @Override + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + return getAbstractMessage(); + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile Object version_; + /** + * string version = 2; + * @return The version. + */ + @Override + public String getVersion() { + Object ref = version_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * string version = 2; + * @return The bytes for version. + */ + @Override + public com.google.protobuf.ByteString + getVersionBytes() { + Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATIONID_FIELD_NUMBER = 3; + private volatile Object applicationId_; + /** + * string applicationId = 3; + * @return The applicationId. + */ + @Override + public String getApplicationId() { + Object ref = applicationId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + applicationId_ = s; + return s; + } + } + /** + * string applicationId = 3; + * @return The bytes for applicationId. + */ + @Override + public com.google.protobuf.ByteString + getApplicationIdBytes() { + Object ref = applicationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + applicationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSACTIONSERVICEGROUP_FIELD_NUMBER = 4; + private volatile Object transactionServiceGroup_; + /** + * string transactionServiceGroup = 4; + * @return The transactionServiceGroup. + */ + @Override + public String getTransactionServiceGroup() { + Object ref = transactionServiceGroup_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + transactionServiceGroup_ = s; + return s; + } + } + /** + * string transactionServiceGroup = 4; + * @return The bytes for transactionServiceGroup. + */ + @Override + public com.google.protobuf.ByteString + getTransactionServiceGroupBytes() { + Object ref = transactionServiceGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + transactionServiceGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTRADATA_FIELD_NUMBER = 5; + private volatile Object extraData_; + /** + * string extraData = 5; + * @return The extraData. + */ + @Override + public String getExtraData() { + Object ref = extraData_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + extraData_ = s; + return s; + } + } + /** + * string extraData = 5; + * @return The bytes for extraData. + */ + @Override + public com.google.protobuf.ByteString + getExtraDataBytes() { + Object ref = extraData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + extraData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractMessage_ != null) { + output.writeMessage(1, getAbstractMessage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, applicationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionServiceGroup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, transactionServiceGroup_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, extraData_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractMessage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractMessage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, applicationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionServiceGroup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, transactionServiceGroup_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, extraData_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractIdentifyRequestProto)) { + return super.equals(obj); + } + AbstractIdentifyRequestProto other = (AbstractIdentifyRequestProto) obj; + + if (hasAbstractMessage() != other.hasAbstractMessage()) return false; + if (hasAbstractMessage()) { + if (!getAbstractMessage() + .equals(other.getAbstractMessage())) return false; + } + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getApplicationId() + .equals(other.getApplicationId())) return false; + if (!getTransactionServiceGroup() + .equals(other.getTransactionServiceGroup())) return false; + if (!getExtraData() + .equals(other.getExtraData())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractMessage()) { + hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractMessage().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + APPLICATIONID_FIELD_NUMBER; + hash = (53 * hash) + getApplicationId().hashCode(); + hash = (37 * hash) + TRANSACTIONSERVICEGROUP_FIELD_NUMBER; + hash = (53 * hash) + getTransactionServiceGroup().hashCode(); + hash = (37 * hash) + EXTRADATA_FIELD_NUMBER; + hash = (53 * hash) + getExtraData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractIdentifyRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractIdentifyRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractIdentifyRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractIdentifyRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractIdentifyRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractIdentifyRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractIdentifyRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractIdentifyRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractIdentifyRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractIdentifyRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractIdentifyRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractIdentifyRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractIdentifyRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) + AbstractIdentifyRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractIdentifyRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + version_ = ""; + + applicationId_ = ""; + + transactionServiceGroup_ = ""; + + extraData_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; + } + + @Override + public AbstractIdentifyRequestProto getDefaultInstanceForType() { + return AbstractIdentifyRequestProto.getDefaultInstance(); + } + + @Override + public AbstractIdentifyRequestProto build() { + AbstractIdentifyRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractIdentifyRequestProto buildPartial() { + AbstractIdentifyRequestProto result = new AbstractIdentifyRequestProto(this); + if (abstractMessageBuilder_ == null) { + result.abstractMessage_ = abstractMessage_; + } else { + result.abstractMessage_ = abstractMessageBuilder_.build(); + } + result.version_ = version_; + result.applicationId_ = applicationId_; + result.transactionServiceGroup_ = transactionServiceGroup_; + result.extraData_ = extraData_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractIdentifyRequestProto) { + return mergeFrom((AbstractIdentifyRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractIdentifyRequestProto other) { + if (other == AbstractIdentifyRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractMessage()) { + mergeAbstractMessage(other.getAbstractMessage()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getApplicationId().isEmpty()) { + applicationId_ = other.applicationId_; + onChanged(); + } + if (!other.getTransactionServiceGroup().isEmpty()) { + transactionServiceGroup_ = other.transactionServiceGroup_; + onChanged(); + } + if (!other.getExtraData().isEmpty()) { + extraData_ = other.extraData_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractIdentifyRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractIdentifyRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractMessageProto abstractMessage_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + public boolean hasAbstractMessage() { + return abstractMessageBuilder_ != null || abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + public AbstractMessageProto getAbstractMessage() { + if (abstractMessageBuilder_ == null) { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } else { + return abstractMessageBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractMessage_ = value; + onChanged(); + } else { + abstractMessageBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage( + AbstractMessageProto.Builder builderForValue) { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = builderForValue.build(); + onChanged(); + } else { + abstractMessageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder mergeAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (abstractMessage_ != null) { + abstractMessage_ = + AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); + } else { + abstractMessage_ = value; + } + onChanged(); + } else { + abstractMessageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder clearAbstractMessage() { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + onChanged(); + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProto.Builder getAbstractMessageBuilder() { + + onChanged(); + return getAbstractMessageFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + if (abstractMessageBuilder_ != null) { + return abstractMessageBuilder_.getMessageOrBuilder(); + } else { + return abstractMessage_ == null ? + AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> + getAbstractMessageFieldBuilder() { + if (abstractMessageBuilder_ == null) { + abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( + getAbstractMessage(), + getParentForChildren(), + isClean()); + abstractMessage_ = null; + } + return abstractMessageBuilder_; + } + + private Object version_ = ""; + /** + * string version = 2; + * @return The version. + */ + public String getVersion() { + Object ref = version_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string version = 2; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string version = 2; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * string version = 2; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * string version = 2; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private Object applicationId_ = ""; + /** + * string applicationId = 3; + * @return The applicationId. + */ + public String getApplicationId() { + Object ref = applicationId_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + applicationId_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string applicationId = 3; + * @return The bytes for applicationId. + */ + public com.google.protobuf.ByteString + getApplicationIdBytes() { + Object ref = applicationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + applicationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string applicationId = 3; + * @param value The applicationId to set. + * @return This builder for chaining. + */ + public Builder setApplicationId( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationId_ = value; + onChanged(); + return this; + } + /** + * string applicationId = 3; + * @return This builder for chaining. + */ + public Builder clearApplicationId() { + + applicationId_ = getDefaultInstance().getApplicationId(); + onChanged(); + return this; + } + /** + * string applicationId = 3; + * @param value The bytes for applicationId to set. + * @return This builder for chaining. + */ + public Builder setApplicationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationId_ = value; + onChanged(); + return this; + } + + private Object transactionServiceGroup_ = ""; + /** + * string transactionServiceGroup = 4; + * @return The transactionServiceGroup. + */ + public String getTransactionServiceGroup() { + Object ref = transactionServiceGroup_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + transactionServiceGroup_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string transactionServiceGroup = 4; + * @return The bytes for transactionServiceGroup. + */ + public com.google.protobuf.ByteString + getTransactionServiceGroupBytes() { + Object ref = transactionServiceGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + transactionServiceGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string transactionServiceGroup = 4; + * @param value The transactionServiceGroup to set. + * @return This builder for chaining. + */ + public Builder setTransactionServiceGroup( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + transactionServiceGroup_ = value; + onChanged(); + return this; + } + /** + * string transactionServiceGroup = 4; + * @return This builder for chaining. + */ + public Builder clearTransactionServiceGroup() { + + transactionServiceGroup_ = getDefaultInstance().getTransactionServiceGroup(); + onChanged(); + return this; + } + /** + * string transactionServiceGroup = 4; + * @param value The bytes for transactionServiceGroup to set. + * @return This builder for chaining. + */ + public Builder setTransactionServiceGroupBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + transactionServiceGroup_ = value; + onChanged(); + return this; + } + + private Object extraData_ = ""; + /** + * string extraData = 5; + * @return The extraData. + */ + public String getExtraData() { + Object ref = extraData_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + extraData_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string extraData = 5; + * @return The bytes for extraData. + */ + public com.google.protobuf.ByteString + getExtraDataBytes() { + Object ref = extraData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + extraData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string extraData = 5; + * @param value The extraData to set. + * @return This builder for chaining. + */ + public Builder setExtraData( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + extraData_ = value; + onChanged(); + return this; + } + /** + * string extraData = 5; + * @return This builder for chaining. + */ + public Builder clearExtraData() { + + extraData_ = getDefaultInstance().getExtraData(); + onChanged(); + return this; + } + /** + * string extraData = 5; + * @param value The bytes for extraData to set. + * @return This builder for chaining. + */ + public Builder setExtraDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + extraData_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) + private static final AbstractIdentifyRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractIdentifyRequestProto(); + } + + public static AbstractIdentifyRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractIdentifyRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractIdentifyRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractIdentifyRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java new file mode 100644 index 00000000000..10522fdad97 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractIdentifyRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractIdentifyRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + boolean hasAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + AbstractMessageProto getAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); + + /** + * string version = 2; + * @return The version. + */ + String getVersion(); + /** + * string version = 2; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + * string applicationId = 3; + * @return The applicationId. + */ + String getApplicationId(); + /** + * string applicationId = 3; + * @return The bytes for applicationId. + */ + com.google.protobuf.ByteString + getApplicationIdBytes(); + + /** + * string transactionServiceGroup = 4; + * @return The transactionServiceGroup. + */ + String getTransactionServiceGroup(); + /** + * string transactionServiceGroup = 4; + * @return The bytes for transactionServiceGroup. + */ + com.google.protobuf.ByteString + getTransactionServiceGroupBytes(); + + /** + * string extraData = 5; + * @return The extraData. + */ + String getExtraData(); + /** + * string extraData = 5; + * @return The bytes for extraData. + */ + com.google.protobuf.ByteString + getExtraDataBytes(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponse.java new file mode 100644 index 00000000000..d2938287111 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponse.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractIdentifyResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractIdentifyResponse { + private AbstractIdentifyResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\036abstractIdentifyResponse.proto\022\"org.ap" + + "ache.seata.protocol.protobuf\032\033abstractRe" + + "sultMessage.proto\"\266\001\n\035AbstractIdentifyRe" + + "sponseProto\022]\n\025abstractResultMessage\030\001 \001" + + "(\0132>.org.apache.seata.protocol.protobuf." + + "AbstractResultMessageProto\022\017\n\007version\030\002 " + + "\001(\t\022\021\n\textraData\030\003 \001(\t\022\022\n\nidentified\030\004 \001" + + "(\010BQ\n3org.apache.seata.core.serializer.p" + + "rotobuf.generatedB\030AbstractIdentifyRespo" + + "nseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractResultMessage.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor, + new String[] { "AbstractResultMessage", "Version", "ExtraData", "Identified", }); + AbstractResultMessage.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProto.java new file mode 100644 index 00000000000..622dee13d07 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProto.java @@ -0,0 +1,958 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractIdentifyResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto} + */ +public final class AbstractIdentifyResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) + AbstractIdentifyResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractIdentifyResponseProto.newBuilder() to construct. + private AbstractIdentifyResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractIdentifyResponseProto() { + version_ = ""; + extraData_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractIdentifyResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractIdentifyResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractResultMessageProto.Builder subBuilder = null; + if (abstractResultMessage_ != null) { + subBuilder = abstractResultMessage_.toBuilder(); + } + abstractResultMessage_ = input.readMessage(AbstractResultMessageProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractResultMessage_); + abstractResultMessage_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + extraData_ = s; + break; + } + case 32: { + + identified_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractIdentifyResponseProto.class, Builder.class); + } + + public static final int ABSTRACTRESULTMESSAGE_FIELD_NUMBER = 1; + private AbstractResultMessageProto abstractResultMessage_; + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return Whether the abstractResultMessage field is set. + */ + @Override + public boolean hasAbstractResultMessage() { + return abstractResultMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return The abstractResultMessage. + */ + @Override + public AbstractResultMessageProto getAbstractResultMessage() { + return abstractResultMessage_ == null ? AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + @Override + public AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { + return getAbstractResultMessage(); + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile Object version_; + /** + * string version = 2; + * @return The version. + */ + @Override + public String getVersion() { + Object ref = version_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * string version = 2; + * @return The bytes for version. + */ + @Override + public com.google.protobuf.ByteString + getVersionBytes() { + Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTRADATA_FIELD_NUMBER = 3; + private volatile Object extraData_; + /** + * string extraData = 3; + * @return The extraData. + */ + @Override + public String getExtraData() { + Object ref = extraData_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + extraData_ = s; + return s; + } + } + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + @Override + public com.google.protobuf.ByteString + getExtraDataBytes() { + Object ref = extraData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + extraData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IDENTIFIED_FIELD_NUMBER = 4; + private boolean identified_; + /** + * bool identified = 4; + * @return The identified. + */ + @Override + public boolean getIdentified() { + return identified_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractResultMessage_ != null) { + output.writeMessage(1, getAbstractResultMessage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); + } + if (identified_ != false) { + output.writeBool(4, identified_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractResultMessage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractResultMessage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extraData_); + } + if (identified_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, identified_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractIdentifyResponseProto)) { + return super.equals(obj); + } + AbstractIdentifyResponseProto other = (AbstractIdentifyResponseProto) obj; + + if (hasAbstractResultMessage() != other.hasAbstractResultMessage()) return false; + if (hasAbstractResultMessage()) { + if (!getAbstractResultMessage() + .equals(other.getAbstractResultMessage())) return false; + } + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getExtraData() + .equals(other.getExtraData())) return false; + if (getIdentified() + != other.getIdentified()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractResultMessage()) { + hash = (37 * hash) + ABSTRACTRESULTMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractResultMessage().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + EXTRADATA_FIELD_NUMBER; + hash = (53 * hash) + getExtraData().hashCode(); + hash = (37 * hash) + IDENTIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIdentified()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractIdentifyResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractIdentifyResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractIdentifyResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractIdentifyResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractIdentifyResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractIdentifyResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractIdentifyResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractIdentifyResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractIdentifyResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractIdentifyResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractIdentifyResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractIdentifyResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractIdentifyResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) + AbstractIdentifyResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractIdentifyResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractResultMessageBuilder_ == null) { + abstractResultMessage_ = null; + } else { + abstractResultMessage_ = null; + abstractResultMessageBuilder_ = null; + } + version_ = ""; + + extraData_ = ""; + + identified_ = false; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; + } + + @Override + public AbstractIdentifyResponseProto getDefaultInstanceForType() { + return AbstractIdentifyResponseProto.getDefaultInstance(); + } + + @Override + public AbstractIdentifyResponseProto build() { + AbstractIdentifyResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractIdentifyResponseProto buildPartial() { + AbstractIdentifyResponseProto result = new AbstractIdentifyResponseProto(this); + if (abstractResultMessageBuilder_ == null) { + result.abstractResultMessage_ = abstractResultMessage_; + } else { + result.abstractResultMessage_ = abstractResultMessageBuilder_.build(); + } + result.version_ = version_; + result.extraData_ = extraData_; + result.identified_ = identified_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractIdentifyResponseProto) { + return mergeFrom((AbstractIdentifyResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractIdentifyResponseProto other) { + if (other == AbstractIdentifyResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractResultMessage()) { + mergeAbstractResultMessage(other.getAbstractResultMessage()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getExtraData().isEmpty()) { + extraData_ = other.extraData_; + onChanged(); + } + if (other.getIdentified() != false) { + setIdentified(other.getIdentified()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractIdentifyResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractIdentifyResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractResultMessageProto abstractResultMessage_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder> abstractResultMessageBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return Whether the abstractResultMessage field is set. + */ + public boolean hasAbstractResultMessage() { + return abstractResultMessageBuilder_ != null || abstractResultMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return The abstractResultMessage. + */ + public AbstractResultMessageProto getAbstractResultMessage() { + if (abstractResultMessageBuilder_ == null) { + return abstractResultMessage_ == null ? AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; + } else { + return abstractResultMessageBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public Builder setAbstractResultMessage(AbstractResultMessageProto value) { + if (abstractResultMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractResultMessage_ = value; + onChanged(); + } else { + abstractResultMessageBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public Builder setAbstractResultMessage( + AbstractResultMessageProto.Builder builderForValue) { + if (abstractResultMessageBuilder_ == null) { + abstractResultMessage_ = builderForValue.build(); + onChanged(); + } else { + abstractResultMessageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public Builder mergeAbstractResultMessage(AbstractResultMessageProto value) { + if (abstractResultMessageBuilder_ == null) { + if (abstractResultMessage_ != null) { + abstractResultMessage_ = + AbstractResultMessageProto.newBuilder(abstractResultMessage_).mergeFrom(value).buildPartial(); + } else { + abstractResultMessage_ = value; + } + onChanged(); + } else { + abstractResultMessageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public Builder clearAbstractResultMessage() { + if (abstractResultMessageBuilder_ == null) { + abstractResultMessage_ = null; + onChanged(); + } else { + abstractResultMessage_ = null; + abstractResultMessageBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public AbstractResultMessageProto.Builder getAbstractResultMessageBuilder() { + + onChanged(); + return getAbstractResultMessageFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { + if (abstractResultMessageBuilder_ != null) { + return abstractResultMessageBuilder_.getMessageOrBuilder(); + } else { + return abstractResultMessage_ == null ? + AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder> + getAbstractResultMessageFieldBuilder() { + if (abstractResultMessageBuilder_ == null) { + abstractResultMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder>( + getAbstractResultMessage(), + getParentForChildren(), + isClean()); + abstractResultMessage_ = null; + } + return abstractResultMessageBuilder_; + } + + private Object version_ = ""; + /** + * string version = 2; + * @return The version. + */ + public String getVersion() { + Object ref = version_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string version = 2; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string version = 2; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * string version = 2; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * string version = 2; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private Object extraData_ = ""; + /** + * string extraData = 3; + * @return The extraData. + */ + public String getExtraData() { + Object ref = extraData_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + extraData_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + public com.google.protobuf.ByteString + getExtraDataBytes() { + Object ref = extraData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + extraData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string extraData = 3; + * @param value The extraData to set. + * @return This builder for chaining. + */ + public Builder setExtraData( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + extraData_ = value; + onChanged(); + return this; + } + /** + * string extraData = 3; + * @return This builder for chaining. + */ + public Builder clearExtraData() { + + extraData_ = getDefaultInstance().getExtraData(); + onChanged(); + return this; + } + /** + * string extraData = 3; + * @param value The bytes for extraData to set. + * @return This builder for chaining. + */ + public Builder setExtraDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + extraData_ = value; + onChanged(); + return this; + } + + private boolean identified_ ; + /** + * bool identified = 4; + * @return The identified. + */ + @Override + public boolean getIdentified() { + return identified_; + } + /** + * bool identified = 4; + * @param value The identified to set. + * @return This builder for chaining. + */ + public Builder setIdentified(boolean value) { + + identified_ = value; + onChanged(); + return this; + } + /** + * bool identified = 4; + * @return This builder for chaining. + */ + public Builder clearIdentified() { + + identified_ = false; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) + private static final AbstractIdentifyResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractIdentifyResponseProto(); + } + + public static AbstractIdentifyResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractIdentifyResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractIdentifyResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractIdentifyResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java new file mode 100644 index 00000000000..97d50127e7c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractIdentifyResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractIdentifyResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return Whether the abstractResultMessage field is set. + */ + boolean hasAbstractResultMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return The abstractResultMessage. + */ + AbstractResultMessageProto getAbstractResultMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder(); + + /** + * string version = 2; + * @return The version. + */ + String getVersion(); + /** + * string version = 2; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + * string extraData = 3; + * @return The extraData. + */ + String getExtraData(); + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + com.google.protobuf.ByteString + getExtraDataBytes(); + + /** + * bool identified = 4; + * @return The identified. + */ + boolean getIdentified(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessage.java new file mode 100644 index 00000000000..5911521f0b3 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessage.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractMessage { + private AbstractMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\025abstractMessage.proto\022\"org.apache.seat" + + "a.protocol.protobuf\032\021messageType.proto\"a" + + "\n\024AbstractMessageProto\022I\n\013messageType\030\001 " + + "\001(\01624.org.apache.seata.protocol.protobuf" + + ".MessageTypeProtoBH\n3org.apache.seata.co" + + "re.serializer.protobuf.generatedB\017Abstra" + + "ctMessageP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + MessageType.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor, + new String[] { "MessageType", }); + MessageType.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProto.java new file mode 100644 index 00000000000..4a2a73673a1 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProto.java @@ -0,0 +1,525 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractMessageProto} + */ +public final class AbstractMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractMessageProto) + AbstractMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractMessageProto.newBuilder() to construct. + private AbstractMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractMessageProto() { + messageType_ = 0; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractMessageProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + messageType_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractMessageProto.class, Builder.class); + } + + public static final int MESSAGETYPE_FIELD_NUMBER = 1; + private int messageType_; + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @return The enum numeric value on the wire for messageType. + */ + @Override public int getMessageTypeValue() { + return messageType_; + } + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @return The messageType. + */ + @Override public MessageTypeProto getMessageType() { + @SuppressWarnings("deprecation") + MessageTypeProto result = MessageTypeProto.valueOf(messageType_); + return result == null ? MessageTypeProto.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (messageType_ != MessageTypeProto.TYPE_GLOBAL_PRESERVED.getNumber()) { + output.writeEnum(1, messageType_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (messageType_ != MessageTypeProto.TYPE_GLOBAL_PRESERVED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, messageType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractMessageProto)) { + return super.equals(obj); + } + AbstractMessageProto other = (AbstractMessageProto) obj; + + if (messageType_ != other.messageType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER; + hash = (53 * hash) + messageType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractMessageProto) + AbstractMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractMessageProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + messageType_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor; + } + + @Override + public AbstractMessageProto getDefaultInstanceForType() { + return AbstractMessageProto.getDefaultInstance(); + } + + @Override + public AbstractMessageProto build() { + AbstractMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractMessageProto buildPartial() { + AbstractMessageProto result = new AbstractMessageProto(this); + result.messageType_ = messageType_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractMessageProto) { + return mergeFrom((AbstractMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractMessageProto other) { + if (other == AbstractMessageProto.getDefaultInstance()) return this; + if (other.messageType_ != 0) { + setMessageTypeValue(other.getMessageTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int messageType_ = 0; + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @return The enum numeric value on the wire for messageType. + */ + @Override public int getMessageTypeValue() { + return messageType_; + } + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @param value The enum numeric value on the wire for messageType to set. + * @return This builder for chaining. + */ + public Builder setMessageTypeValue(int value) { + + messageType_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @return The messageType. + */ + @Override + public MessageTypeProto getMessageType() { + @SuppressWarnings("deprecation") + MessageTypeProto result = MessageTypeProto.valueOf(messageType_); + return result == null ? MessageTypeProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @param value The messageType to set. + * @return This builder for chaining. + */ + public Builder setMessageType(MessageTypeProto value) { + if (value == null) { + throw new NullPointerException(); + } + + messageType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @return This builder for chaining. + */ + public Builder clearMessageType() { + + messageType_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractMessageProto) + private static final AbstractMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractMessageProto(); + } + + public static AbstractMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProtoOrBuilder.java new file mode 100644 index 00000000000..d73f6000816 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProtoOrBuilder.java @@ -0,0 +1,20 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @return The enum numeric value on the wire for messageType. + */ + int getMessageTypeValue(); + /** + * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; + * @return The messageType. + */ + MessageTypeProto getMessageType(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessage.java new file mode 100644 index 00000000000..105e607b71b --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessage.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractResultMessage { + private AbstractResultMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\033abstractResultMessage.proto\022\"org.apach" + + "e.seata.protocol.protobuf\032\020resultCode.pr" + + "oto\032\025abstractMessage.proto\"\305\001\n\032AbstractR" + + "esultMessageProto\022Q\n\017AbstractMessage\030\001 \001" + + "(\01328.org.apache.seata.protocol.protobuf." + + "AbstractMessageProto\022G\n\nresultCode\030\002 \001(\016" + + "23.org.apache.seata.protocol.protobuf.Re" + + "sultCodeProto\022\013\n\003msg\030\003 \001(\tBN\n3org.apache" + + ".seata.core.serializer.protobuf.generate" + + "dB\025AbstractResultMessageP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + ResultCode.getDescriptor(), + AbstractMessage.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor, + new String[] { "AbstractMessage", "ResultCode", "Msg", }); + ResultCode.getDescriptor(); + AbstractMessage.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProto.java new file mode 100644 index 00000000000..cecbbca79c8 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProto.java @@ -0,0 +1,851 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractResultMessageProto} + */ +public final class AbstractResultMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) + AbstractResultMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractResultMessageProto.newBuilder() to construct. + private AbstractResultMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractResultMessageProto() { + resultCode_ = 0; + msg_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractResultMessageProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractResultMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractMessageProto.Builder subBuilder = null; + if (abstractMessage_ != null) { + subBuilder = abstractMessage_.toBuilder(); + } + abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractMessage_); + abstractMessage_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + resultCode_ = rawValue; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + msg_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractResultMessageProto.class, Builder.class); + } + + public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; + private AbstractMessageProto abstractMessage_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + @Override + public boolean hasAbstractMessage() { + return abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + * @return The abstractMessage. + */ + @Override + public AbstractMessageProto getAbstractMessage() { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + @Override + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + return getAbstractMessage(); + } + + public static final int RESULTCODE_FIELD_NUMBER = 2; + private int resultCode_; + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @return The enum numeric value on the wire for resultCode. + */ + @Override public int getResultCodeValue() { + return resultCode_; + } + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @return The resultCode. + */ + @Override public ResultCodeProto getResultCode() { + @SuppressWarnings("deprecation") + ResultCodeProto result = ResultCodeProto.valueOf(resultCode_); + return result == null ? ResultCodeProto.UNRECOGNIZED : result; + } + + public static final int MSG_FIELD_NUMBER = 3; + private volatile Object msg_; + /** + * string msg = 3; + * @return The msg. + */ + @Override + public String getMsg() { + Object ref = msg_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * string msg = 3; + * @return The bytes for msg. + */ + @Override + public com.google.protobuf.ByteString + getMsgBytes() { + Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractMessage_ != null) { + output.writeMessage(1, getAbstractMessage()); + } + if (resultCode_ != ResultCodeProto.Failed.getNumber()) { + output.writeEnum(2, resultCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, msg_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractMessage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractMessage()); + } + if (resultCode_ != ResultCodeProto.Failed.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, resultCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, msg_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractResultMessageProto)) { + return super.equals(obj); + } + AbstractResultMessageProto other = (AbstractResultMessageProto) obj; + + if (hasAbstractMessage() != other.hasAbstractMessage()) return false; + if (hasAbstractMessage()) { + if (!getAbstractMessage() + .equals(other.getAbstractMessage())) return false; + } + if (resultCode_ != other.resultCode_) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractMessage()) { + hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractMessage().hashCode(); + } + hash = (37 * hash) + RESULTCODE_FIELD_NUMBER; + hash = (53 * hash) + resultCode_; + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractResultMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractResultMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractResultMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractResultMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractResultMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractResultMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractResultMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractResultMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractResultMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractResultMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractResultMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractResultMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractResultMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractResultMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) + AbstractResultMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractResultMessageProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + resultCode_ = 0; + + msg_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; + } + + @Override + public AbstractResultMessageProto getDefaultInstanceForType() { + return AbstractResultMessageProto.getDefaultInstance(); + } + + @Override + public AbstractResultMessageProto build() { + AbstractResultMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractResultMessageProto buildPartial() { + AbstractResultMessageProto result = new AbstractResultMessageProto(this); + if (abstractMessageBuilder_ == null) { + result.abstractMessage_ = abstractMessage_; + } else { + result.abstractMessage_ = abstractMessageBuilder_.build(); + } + result.resultCode_ = resultCode_; + result.msg_ = msg_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractResultMessageProto) { + return mergeFrom((AbstractResultMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractResultMessageProto other) { + if (other == AbstractResultMessageProto.getDefaultInstance()) return this; + if (other.hasAbstractMessage()) { + mergeAbstractMessage(other.getAbstractMessage()); + } + if (other.resultCode_ != 0) { + setResultCodeValue(other.getResultCodeValue()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractResultMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractResultMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractMessageProto abstractMessage_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + public boolean hasAbstractMessage() { + return abstractMessageBuilder_ != null || abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + * @return The abstractMessage. + */ + public AbstractMessageProto getAbstractMessage() { + if (abstractMessageBuilder_ == null) { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } else { + return abstractMessageBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + public Builder setAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractMessage_ = value; + onChanged(); + } else { + abstractMessageBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + public Builder setAbstractMessage( + AbstractMessageProto.Builder builderForValue) { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = builderForValue.build(); + onChanged(); + } else { + abstractMessageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + public Builder mergeAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (abstractMessage_ != null) { + abstractMessage_ = + AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); + } else { + abstractMessage_ = value; + } + onChanged(); + } else { + abstractMessageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + public Builder clearAbstractMessage() { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + onChanged(); + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + public AbstractMessageProto.Builder getAbstractMessageBuilder() { + + onChanged(); + return getAbstractMessageFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + if (abstractMessageBuilder_ != null) { + return abstractMessageBuilder_.getMessageOrBuilder(); + } else { + return abstractMessage_ == null ? + AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> + getAbstractMessageFieldBuilder() { + if (abstractMessageBuilder_ == null) { + abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( + getAbstractMessage(), + getParentForChildren(), + isClean()); + abstractMessage_ = null; + } + return abstractMessageBuilder_; + } + + private int resultCode_ = 0; + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @return The enum numeric value on the wire for resultCode. + */ + @Override public int getResultCodeValue() { + return resultCode_; + } + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @param value The enum numeric value on the wire for resultCode to set. + * @return This builder for chaining. + */ + public Builder setResultCodeValue(int value) { + + resultCode_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @return The resultCode. + */ + @Override + public ResultCodeProto getResultCode() { + @SuppressWarnings("deprecation") + ResultCodeProto result = ResultCodeProto.valueOf(resultCode_); + return result == null ? ResultCodeProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @param value The resultCode to set. + * @return This builder for chaining. + */ + public Builder setResultCode(ResultCodeProto value) { + if (value == null) { + throw new NullPointerException(); + } + + resultCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @return This builder for chaining. + */ + public Builder clearResultCode() { + + resultCode_ = 0; + onChanged(); + return this; + } + + private Object msg_ = ""; + /** + * string msg = 3; + * @return The msg. + */ + public String getMsg() { + Object ref = msg_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string msg = 3; + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg = 3; + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + msg_ = value; + onChanged(); + return this; + } + /** + * string msg = 3; + * @return This builder for chaining. + */ + public Builder clearMsg() { + + msg_ = getDefaultInstance().getMsg(); + onChanged(); + return this; + } + /** + * string msg = 3; + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + msg_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) + private static final AbstractResultMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractResultMessageProto(); + } + + public static AbstractResultMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractResultMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractResultMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractResultMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProtoOrBuilder.java new file mode 100644 index 00000000000..d7870f7afa0 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProtoOrBuilder.java @@ -0,0 +1,47 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractResultMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + boolean hasAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + * @return The abstractMessage. + */ + AbstractMessageProto getAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; + */ + AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); + + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @return The enum numeric value on the wire for resultCode. + */ + int getResultCodeValue(); + /** + * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; + * @return The resultCode. + */ + ResultCodeProto getResultCode(); + + /** + * string msg = 3; + * @return The msg. + */ + String getMsg(); + /** + * string msg = 3; + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequest.java new file mode 100644 index 00000000000..d067c30590c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequest.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractTransactionRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractTransactionRequest { + private AbstractTransactionRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n abstractTransactionRequest.proto\022\"org." + + "apache.seata.protocol.protobuf\032\025abstract" + + "Message.proto\"t\n\037AbstractTransactionRequ" + + "estProto\022Q\n\017abstractMessage\030\001 \001(\01328.org." + + "apache.seata.protocol.protobuf.AbstractM" + + "essageProtoBS\n3org.apache.seata.core.ser" + + "ializer.protobuf.generatedB\032AbstractTran" + + "sactionRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractMessage.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor, + new String[] { "AbstractMessage", }); + AbstractMessage.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProto.java new file mode 100644 index 00000000000..572f7fc7230 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractTransactionRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto} + */ +public final class AbstractTransactionRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) + AbstractTransactionRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractTransactionRequestProto.newBuilder() to construct. + private AbstractTransactionRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractTransactionRequestProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractTransactionRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractTransactionRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractMessageProto.Builder subBuilder = null; + if (abstractMessage_ != null) { + subBuilder = abstractMessage_.toBuilder(); + } + abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractMessage_); + abstractMessage_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractTransactionRequestProto.class, Builder.class); + } + + public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; + private AbstractMessageProto abstractMessage_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + @Override + public boolean hasAbstractMessage() { + return abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + @Override + public AbstractMessageProto getAbstractMessage() { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + @Override + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + return getAbstractMessage(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractMessage_ != null) { + output.writeMessage(1, getAbstractMessage()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractMessage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractMessage()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractTransactionRequestProto)) { + return super.equals(obj); + } + AbstractTransactionRequestProto other = (AbstractTransactionRequestProto) obj; + + if (hasAbstractMessage() != other.hasAbstractMessage()) return false; + if (hasAbstractMessage()) { + if (!getAbstractMessage() + .equals(other.getAbstractMessage())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractMessage()) { + hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractMessage().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractTransactionRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractTransactionRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractTransactionRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractTransactionRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractTransactionRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractTransactionRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractTransactionRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractTransactionRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractTransactionRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractTransactionRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractTransactionRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractTransactionRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractTransactionRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) + AbstractTransactionRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractTransactionRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; + } + + @Override + public AbstractTransactionRequestProto getDefaultInstanceForType() { + return AbstractTransactionRequestProto.getDefaultInstance(); + } + + @Override + public AbstractTransactionRequestProto build() { + AbstractTransactionRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractTransactionRequestProto buildPartial() { + AbstractTransactionRequestProto result = new AbstractTransactionRequestProto(this); + if (abstractMessageBuilder_ == null) { + result.abstractMessage_ = abstractMessage_; + } else { + result.abstractMessage_ = abstractMessageBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractTransactionRequestProto) { + return mergeFrom((AbstractTransactionRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractTransactionRequestProto other) { + if (other == AbstractTransactionRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractMessage()) { + mergeAbstractMessage(other.getAbstractMessage()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractTransactionRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractTransactionRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractMessageProto abstractMessage_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + public boolean hasAbstractMessage() { + return abstractMessageBuilder_ != null || abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + public AbstractMessageProto getAbstractMessage() { + if (abstractMessageBuilder_ == null) { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } else { + return abstractMessageBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractMessage_ = value; + onChanged(); + } else { + abstractMessageBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage( + AbstractMessageProto.Builder builderForValue) { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = builderForValue.build(); + onChanged(); + } else { + abstractMessageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder mergeAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (abstractMessage_ != null) { + abstractMessage_ = + AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); + } else { + abstractMessage_ = value; + } + onChanged(); + } else { + abstractMessageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder clearAbstractMessage() { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + onChanged(); + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProto.Builder getAbstractMessageBuilder() { + + onChanged(); + return getAbstractMessageFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + if (abstractMessageBuilder_ != null) { + return abstractMessageBuilder_.getMessageOrBuilder(); + } else { + return abstractMessage_ == null ? + AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> + getAbstractMessageFieldBuilder() { + if (abstractMessageBuilder_ == null) { + abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( + getAbstractMessage(), + getParentForChildren(), + isClean()); + abstractMessage_ = null; + } + return abstractMessageBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) + private static final AbstractTransactionRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractTransactionRequestProto(); + } + + public static AbstractTransactionRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractTransactionRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractTransactionRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractTransactionRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java new file mode 100644 index 00000000000..62b81c56fe8 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractTransactionRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractTransactionRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + boolean hasAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + AbstractMessageProto getAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponse.java new file mode 100644 index 00000000000..68bd93885b5 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponse.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractTransactionResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class AbstractTransactionResponse { + private AbstractTransactionResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n!abstractTransactionResponse.proto\022\"org" + + ".apache.seata.protocol.protobuf\032\033abstrac" + + "tResultMessage.proto\032\036transactionExcepti" + + "onCode.proto\"\346\001\n AbstractTransactionResp" + + "onseProto\022]\n\025abstractResultMessage\030\001 \001(\013" + + "2>.org.apache.seata.protocol.protobuf.Ab" + + "stractResultMessageProto\022c\n\030transactionE" + + "xceptionCode\030\002 \001(\0162A.org.apache.seata.pr" + + "otocol.protobuf.TransactionExceptionCode" + + "ProtoBT\n3org.apache.seata.core.serialize" + + "r.protobuf.generatedB\033AbstractTransactio" + + "nResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractResultMessage.getDescriptor(), + TransactionExceptionCode.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor, + new String[] { "AbstractResultMessage", "TransactionExceptionCode", }); + AbstractResultMessage.getDescriptor(); + TransactionExceptionCode.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProto.java new file mode 100644 index 00000000000..ec8df2da47b --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProto.java @@ -0,0 +1,713 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractTransactionResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto} + */ +public final class AbstractTransactionResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) + AbstractTransactionResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use AbstractTransactionResponseProto.newBuilder() to construct. + private AbstractTransactionResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AbstractTransactionResponseProto() { + transactionExceptionCode_ = 0; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new AbstractTransactionResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbstractTransactionResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractResultMessageProto.Builder subBuilder = null; + if (abstractResultMessage_ != null) { + subBuilder = abstractResultMessage_.toBuilder(); + } + abstractResultMessage_ = input.readMessage(AbstractResultMessageProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractResultMessage_); + abstractResultMessage_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + transactionExceptionCode_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractTransactionResponseProto.class, Builder.class); + } + + public static final int ABSTRACTRESULTMESSAGE_FIELD_NUMBER = 1; + private AbstractResultMessageProto abstractResultMessage_; + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return Whether the abstractResultMessage field is set. + */ + @Override + public boolean hasAbstractResultMessage() { + return abstractResultMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return The abstractResultMessage. + */ + @Override + public AbstractResultMessageProto getAbstractResultMessage() { + return abstractResultMessage_ == null ? AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + @Override + public AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { + return getAbstractResultMessage(); + } + + public static final int TRANSACTIONEXCEPTIONCODE_FIELD_NUMBER = 2; + private int transactionExceptionCode_; + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @return The enum numeric value on the wire for transactionExceptionCode. + */ + @Override public int getTransactionExceptionCodeValue() { + return transactionExceptionCode_; + } + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @return The transactionExceptionCode. + */ + @Override public TransactionExceptionCodeProto getTransactionExceptionCode() { + @SuppressWarnings("deprecation") + TransactionExceptionCodeProto result = TransactionExceptionCodeProto.valueOf(transactionExceptionCode_); + return result == null ? TransactionExceptionCodeProto.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractResultMessage_ != null) { + output.writeMessage(1, getAbstractResultMessage()); + } + if (transactionExceptionCode_ != TransactionExceptionCodeProto.Unknown.getNumber()) { + output.writeEnum(2, transactionExceptionCode_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractResultMessage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractResultMessage()); + } + if (transactionExceptionCode_ != TransactionExceptionCodeProto.Unknown.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, transactionExceptionCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof AbstractTransactionResponseProto)) { + return super.equals(obj); + } + AbstractTransactionResponseProto other = (AbstractTransactionResponseProto) obj; + + if (hasAbstractResultMessage() != other.hasAbstractResultMessage()) return false; + if (hasAbstractResultMessage()) { + if (!getAbstractResultMessage() + .equals(other.getAbstractResultMessage())) return false; + } + if (transactionExceptionCode_ != other.transactionExceptionCode_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractResultMessage()) { + hash = (37 * hash) + ABSTRACTRESULTMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractResultMessage().hashCode(); + } + hash = (37 * hash) + TRANSACTIONEXCEPTIONCODE_FIELD_NUMBER; + hash = (53 * hash) + transactionExceptionCode_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static AbstractTransactionResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractTransactionResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractTransactionResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractTransactionResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractTransactionResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static AbstractTransactionResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static AbstractTransactionResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractTransactionResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractTransactionResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static AbstractTransactionResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static AbstractTransactionResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static AbstractTransactionResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(AbstractTransactionResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) + AbstractTransactionResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + AbstractTransactionResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractResultMessageBuilder_ == null) { + abstractResultMessage_ = null; + } else { + abstractResultMessage_ = null; + abstractResultMessageBuilder_ = null; + } + transactionExceptionCode_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; + } + + @Override + public AbstractTransactionResponseProto getDefaultInstanceForType() { + return AbstractTransactionResponseProto.getDefaultInstance(); + } + + @Override + public AbstractTransactionResponseProto build() { + AbstractTransactionResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public AbstractTransactionResponseProto buildPartial() { + AbstractTransactionResponseProto result = new AbstractTransactionResponseProto(this); + if (abstractResultMessageBuilder_ == null) { + result.abstractResultMessage_ = abstractResultMessage_; + } else { + result.abstractResultMessage_ = abstractResultMessageBuilder_.build(); + } + result.transactionExceptionCode_ = transactionExceptionCode_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof AbstractTransactionResponseProto) { + return mergeFrom((AbstractTransactionResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(AbstractTransactionResponseProto other) { + if (other == AbstractTransactionResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractResultMessage()) { + mergeAbstractResultMessage(other.getAbstractResultMessage()); + } + if (other.transactionExceptionCode_ != 0) { + setTransactionExceptionCodeValue(other.getTransactionExceptionCodeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + AbstractTransactionResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (AbstractTransactionResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractResultMessageProto abstractResultMessage_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder> abstractResultMessageBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return Whether the abstractResultMessage field is set. + */ + public boolean hasAbstractResultMessage() { + return abstractResultMessageBuilder_ != null || abstractResultMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return The abstractResultMessage. + */ + public AbstractResultMessageProto getAbstractResultMessage() { + if (abstractResultMessageBuilder_ == null) { + return abstractResultMessage_ == null ? AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; + } else { + return abstractResultMessageBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public Builder setAbstractResultMessage(AbstractResultMessageProto value) { + if (abstractResultMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractResultMessage_ = value; + onChanged(); + } else { + abstractResultMessageBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public Builder setAbstractResultMessage( + AbstractResultMessageProto.Builder builderForValue) { + if (abstractResultMessageBuilder_ == null) { + abstractResultMessage_ = builderForValue.build(); + onChanged(); + } else { + abstractResultMessageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public Builder mergeAbstractResultMessage(AbstractResultMessageProto value) { + if (abstractResultMessageBuilder_ == null) { + if (abstractResultMessage_ != null) { + abstractResultMessage_ = + AbstractResultMessageProto.newBuilder(abstractResultMessage_).mergeFrom(value).buildPartial(); + } else { + abstractResultMessage_ = value; + } + onChanged(); + } else { + abstractResultMessageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public Builder clearAbstractResultMessage() { + if (abstractResultMessageBuilder_ == null) { + abstractResultMessage_ = null; + onChanged(); + } else { + abstractResultMessage_ = null; + abstractResultMessageBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public AbstractResultMessageProto.Builder getAbstractResultMessageBuilder() { + + onChanged(); + return getAbstractResultMessageFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + public AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { + if (abstractResultMessageBuilder_ != null) { + return abstractResultMessageBuilder_.getMessageOrBuilder(); + } else { + return abstractResultMessage_ == null ? + AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder> + getAbstractResultMessageFieldBuilder() { + if (abstractResultMessageBuilder_ == null) { + abstractResultMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder>( + getAbstractResultMessage(), + getParentForChildren(), + isClean()); + abstractResultMessage_ = null; + } + return abstractResultMessageBuilder_; + } + + private int transactionExceptionCode_ = 0; + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @return The enum numeric value on the wire for transactionExceptionCode. + */ + @Override public int getTransactionExceptionCodeValue() { + return transactionExceptionCode_; + } + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @param value The enum numeric value on the wire for transactionExceptionCode to set. + * @return This builder for chaining. + */ + public Builder setTransactionExceptionCodeValue(int value) { + + transactionExceptionCode_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @return The transactionExceptionCode. + */ + @Override + public TransactionExceptionCodeProto getTransactionExceptionCode() { + @SuppressWarnings("deprecation") + TransactionExceptionCodeProto result = TransactionExceptionCodeProto.valueOf(transactionExceptionCode_); + return result == null ? TransactionExceptionCodeProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @param value The transactionExceptionCode to set. + * @return This builder for chaining. + */ + public Builder setTransactionExceptionCode(TransactionExceptionCodeProto value) { + if (value == null) { + throw new NullPointerException(); + } + + transactionExceptionCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @return This builder for chaining. + */ + public Builder clearTransactionExceptionCode() { + + transactionExceptionCode_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) + private static final AbstractTransactionResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new AbstractTransactionResponseProto(); + } + + public static AbstractTransactionResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public AbstractTransactionResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbstractTransactionResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public AbstractTransactionResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java new file mode 100644 index 00000000000..5fdc2ef6de9 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: abstractTransactionResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface AbstractTransactionResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return Whether the abstractResultMessage field is set. + */ + boolean hasAbstractResultMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + * @return The abstractResultMessage. + */ + AbstractResultMessageProto getAbstractResultMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; + */ + AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder(); + + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @return The enum numeric value on the wire for transactionExceptionCode. + */ + int getTransactionExceptionCodeValue(); + /** + * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; + * @return The transactionExceptionCode. + */ + TransactionExceptionCodeProto getTransactionExceptionCode(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessage.java new file mode 100644 index 00000000000..77eddef9e4f --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessage.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: batchResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BatchResultMessage { + private BatchResultMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\030batchResultMessage.proto\022\"org.apache.s" + + "eata.protocol.protobuf\032\025abstractMessage." + + "proto\032\031google/protobuf/any.proto\"\252\001\n\027Bat" + + "chResultMessageProto\022Q\n\017abstractMessage\030" + + "\001 \001(\01328.org.apache.seata.protocol.protob" + + "uf.AbstractMessageProto\022,\n\016resultMessage" + + "s\030\002 \003(\0132\024.google.protobuf.Any\022\016\n\006msgIds\030" + + "\003 \003(\005BK\n3org.apache.seata.core.serialize" + + "r.protobuf.generatedB\022BatchResultMessage" + + "P\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractMessage.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor, + new String[] { "AbstractMessage", "ResultMessages", "MsgIds", }); + AbstractMessage.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProto.java new file mode 100644 index 00000000000..41748757e72 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProto.java @@ -0,0 +1,1145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: batchResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BatchResultMessageProto} + */ +public final class BatchResultMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BatchResultMessageProto) + BatchResultMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchResultMessageProto.newBuilder() to construct. + private BatchResultMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchResultMessageProto() { + resultMessages_ = java.util.Collections.emptyList(); + msgIds_ = emptyIntList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BatchResultMessageProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchResultMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractMessageProto.Builder subBuilder = null; + if (abstractMessage_ != null) { + subBuilder = abstractMessage_.toBuilder(); + } + abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractMessage_); + abstractMessage_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resultMessages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resultMessages_.add( + input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + msgIds_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + msgIds_.addInt(input.readInt32()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + msgIds_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + msgIds_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resultMessages_ = java.util.Collections.unmodifiableList(resultMessages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + msgIds_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BatchResultMessageProto.class, Builder.class); + } + + public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; + private AbstractMessageProto abstractMessage_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + @Override + public boolean hasAbstractMessage() { + return abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + @Override + public AbstractMessageProto getAbstractMessage() { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + @Override + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + return getAbstractMessage(); + } + + public static final int RESULTMESSAGES_FIELD_NUMBER = 2; + private java.util.List resultMessages_; + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + @Override + public java.util.List getResultMessagesList() { + return resultMessages_; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + @Override + public java.util.List + getResultMessagesOrBuilderList() { + return resultMessages_; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + @Override + public int getResultMessagesCount() { + return resultMessages_.size(); + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + @Override + public com.google.protobuf.Any getResultMessages(int index) { + return resultMessages_.get(index); + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + @Override + public com.google.protobuf.AnyOrBuilder getResultMessagesOrBuilder( + int index) { + return resultMessages_.get(index); + } + + public static final int MSGIDS_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.IntList msgIds_; + /** + * repeated int32 msgIds = 3; + * @return A list containing the msgIds. + */ + @Override + public java.util.List + getMsgIdsList() { + return msgIds_; + } + /** + * repeated int32 msgIds = 3; + * @return The count of msgIds. + */ + public int getMsgIdsCount() { + return msgIds_.size(); + } + /** + * repeated int32 msgIds = 3; + * @param index The index of the element to return. + * @return The msgIds at the given index. + */ + public int getMsgIds(int index) { + return msgIds_.getInt(index); + } + private int msgIdsMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (abstractMessage_ != null) { + output.writeMessage(1, getAbstractMessage()); + } + for (int i = 0; i < resultMessages_.size(); i++) { + output.writeMessage(2, resultMessages_.get(i)); + } + if (getMsgIdsList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(msgIdsMemoizedSerializedSize); + } + for (int i = 0; i < msgIds_.size(); i++) { + output.writeInt32NoTag(msgIds_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractMessage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractMessage()); + } + for (int i = 0; i < resultMessages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, resultMessages_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < msgIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(msgIds_.getInt(i)); + } + size += dataSize; + if (!getMsgIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + msgIdsMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BatchResultMessageProto)) { + return super.equals(obj); + } + BatchResultMessageProto other = (BatchResultMessageProto) obj; + + if (hasAbstractMessage() != other.hasAbstractMessage()) return false; + if (hasAbstractMessage()) { + if (!getAbstractMessage() + .equals(other.getAbstractMessage())) return false; + } + if (!getResultMessagesList() + .equals(other.getResultMessagesList())) return false; + if (!getMsgIdsList() + .equals(other.getMsgIdsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractMessage()) { + hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractMessage().hashCode(); + } + if (getResultMessagesCount() > 0) { + hash = (37 * hash) + RESULTMESSAGES_FIELD_NUMBER; + hash = (53 * hash) + getResultMessagesList().hashCode(); + } + if (getMsgIdsCount() > 0) { + hash = (37 * hash) + MSGIDS_FIELD_NUMBER; + hash = (53 * hash) + getMsgIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BatchResultMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BatchResultMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BatchResultMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BatchResultMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BatchResultMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BatchResultMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BatchResultMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BatchResultMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BatchResultMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BatchResultMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BatchResultMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BatchResultMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BatchResultMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BatchResultMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BatchResultMessageProto) + BatchResultMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BatchResultMessageProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BatchResultMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultMessagesFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + if (resultMessagesBuilder_ == null) { + resultMessages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultMessagesBuilder_.clear(); + } + msgIds_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor; + } + + @Override + public BatchResultMessageProto getDefaultInstanceForType() { + return BatchResultMessageProto.getDefaultInstance(); + } + + @Override + public BatchResultMessageProto build() { + BatchResultMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BatchResultMessageProto buildPartial() { + BatchResultMessageProto result = new BatchResultMessageProto(this); + int from_bitField0_ = bitField0_; + if (abstractMessageBuilder_ == null) { + result.abstractMessage_ = abstractMessage_; + } else { + result.abstractMessage_ = abstractMessageBuilder_.build(); + } + if (resultMessagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resultMessages_ = java.util.Collections.unmodifiableList(resultMessages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resultMessages_ = resultMessages_; + } else { + result.resultMessages_ = resultMessagesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + msgIds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.msgIds_ = msgIds_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BatchResultMessageProto) { + return mergeFrom((BatchResultMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BatchResultMessageProto other) { + if (other == BatchResultMessageProto.getDefaultInstance()) return this; + if (other.hasAbstractMessage()) { + mergeAbstractMessage(other.getAbstractMessage()); + } + if (resultMessagesBuilder_ == null) { + if (!other.resultMessages_.isEmpty()) { + if (resultMessages_.isEmpty()) { + resultMessages_ = other.resultMessages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultMessagesIsMutable(); + resultMessages_.addAll(other.resultMessages_); + } + onChanged(); + } + } else { + if (!other.resultMessages_.isEmpty()) { + if (resultMessagesBuilder_.isEmpty()) { + resultMessagesBuilder_.dispose(); + resultMessagesBuilder_ = null; + resultMessages_ = other.resultMessages_; + bitField0_ = (bitField0_ & ~0x00000001); + resultMessagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultMessagesFieldBuilder() : null; + } else { + resultMessagesBuilder_.addAllMessages(other.resultMessages_); + } + } + } + if (!other.msgIds_.isEmpty()) { + if (msgIds_.isEmpty()) { + msgIds_ = other.msgIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMsgIdsIsMutable(); + msgIds_.addAll(other.msgIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BatchResultMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BatchResultMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private AbstractMessageProto abstractMessage_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + public boolean hasAbstractMessage() { + return abstractMessageBuilder_ != null || abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + public AbstractMessageProto getAbstractMessage() { + if (abstractMessageBuilder_ == null) { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } else { + return abstractMessageBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractMessage_ = value; + onChanged(); + } else { + abstractMessageBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage( + AbstractMessageProto.Builder builderForValue) { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = builderForValue.build(); + onChanged(); + } else { + abstractMessageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder mergeAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (abstractMessage_ != null) { + abstractMessage_ = + AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); + } else { + abstractMessage_ = value; + } + onChanged(); + } else { + abstractMessageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder clearAbstractMessage() { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + onChanged(); + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProto.Builder getAbstractMessageBuilder() { + + onChanged(); + return getAbstractMessageFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + if (abstractMessageBuilder_ != null) { + return abstractMessageBuilder_.getMessageOrBuilder(); + } else { + return abstractMessage_ == null ? + AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> + getAbstractMessageFieldBuilder() { + if (abstractMessageBuilder_ == null) { + abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( + getAbstractMessage(), + getParentForChildren(), + isClean()); + abstractMessage_ = null; + } + return abstractMessageBuilder_; + } + + private java.util.List resultMessages_ = + java.util.Collections.emptyList(); + private void ensureResultMessagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resultMessages_ = new java.util.ArrayList(resultMessages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> resultMessagesBuilder_; + + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public java.util.List getResultMessagesList() { + if (resultMessagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resultMessages_); + } else { + return resultMessagesBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public int getResultMessagesCount() { + if (resultMessagesBuilder_ == null) { + return resultMessages_.size(); + } else { + return resultMessagesBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public com.google.protobuf.Any getResultMessages(int index) { + if (resultMessagesBuilder_ == null) { + return resultMessages_.get(index); + } else { + return resultMessagesBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder setResultMessages( + int index, com.google.protobuf.Any value) { + if (resultMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultMessagesIsMutable(); + resultMessages_.set(index, value); + onChanged(); + } else { + resultMessagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder setResultMessages( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (resultMessagesBuilder_ == null) { + ensureResultMessagesIsMutable(); + resultMessages_.set(index, builderForValue.build()); + onChanged(); + } else { + resultMessagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder addResultMessages(com.google.protobuf.Any value) { + if (resultMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultMessagesIsMutable(); + resultMessages_.add(value); + onChanged(); + } else { + resultMessagesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder addResultMessages( + int index, com.google.protobuf.Any value) { + if (resultMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultMessagesIsMutable(); + resultMessages_.add(index, value); + onChanged(); + } else { + resultMessagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder addResultMessages( + com.google.protobuf.Any.Builder builderForValue) { + if (resultMessagesBuilder_ == null) { + ensureResultMessagesIsMutable(); + resultMessages_.add(builderForValue.build()); + onChanged(); + } else { + resultMessagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder addResultMessages( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (resultMessagesBuilder_ == null) { + ensureResultMessagesIsMutable(); + resultMessages_.add(index, builderForValue.build()); + onChanged(); + } else { + resultMessagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder addAllResultMessages( + Iterable values) { + if (resultMessagesBuilder_ == null) { + ensureResultMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resultMessages_); + onChanged(); + } else { + resultMessagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder clearResultMessages() { + if (resultMessagesBuilder_ == null) { + resultMessages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultMessagesBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public Builder removeResultMessages(int index) { + if (resultMessagesBuilder_ == null) { + ensureResultMessagesIsMutable(); + resultMessages_.remove(index); + onChanged(); + } else { + resultMessagesBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public com.google.protobuf.Any.Builder getResultMessagesBuilder( + int index) { + return getResultMessagesFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public com.google.protobuf.AnyOrBuilder getResultMessagesOrBuilder( + int index) { + if (resultMessagesBuilder_ == null) { + return resultMessages_.get(index); } else { + return resultMessagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public java.util.List + getResultMessagesOrBuilderList() { + if (resultMessagesBuilder_ != null) { + return resultMessagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resultMessages_); + } + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public com.google.protobuf.Any.Builder addResultMessagesBuilder() { + return getResultMessagesFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public com.google.protobuf.Any.Builder addResultMessagesBuilder( + int index) { + return getResultMessagesFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + public java.util.List + getResultMessagesBuilderList() { + return getResultMessagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getResultMessagesFieldBuilder() { + if (resultMessagesBuilder_ == null) { + resultMessagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + resultMessages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + resultMessages_ = null; + } + return resultMessagesBuilder_; + } + + private com.google.protobuf.Internal.IntList msgIds_ = emptyIntList(); + private void ensureMsgIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + msgIds_ = mutableCopy(msgIds_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated int32 msgIds = 3; + * @return A list containing the msgIds. + */ + public java.util.List + getMsgIdsList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(msgIds_) : msgIds_; + } + /** + * repeated int32 msgIds = 3; + * @return The count of msgIds. + */ + public int getMsgIdsCount() { + return msgIds_.size(); + } + /** + * repeated int32 msgIds = 3; + * @param index The index of the element to return. + * @return The msgIds at the given index. + */ + public int getMsgIds(int index) { + return msgIds_.getInt(index); + } + /** + * repeated int32 msgIds = 3; + * @param index The index to set the value at. + * @param value The msgIds to set. + * @return This builder for chaining. + */ + public Builder setMsgIds( + int index, int value) { + ensureMsgIdsIsMutable(); + msgIds_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated int32 msgIds = 3; + * @param value The msgIds to add. + * @return This builder for chaining. + */ + public Builder addMsgIds(int value) { + ensureMsgIdsIsMutable(); + msgIds_.addInt(value); + onChanged(); + return this; + } + /** + * repeated int32 msgIds = 3; + * @param values The msgIds to add. + * @return This builder for chaining. + */ + public Builder addAllMsgIds( + Iterable values) { + ensureMsgIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, msgIds_); + onChanged(); + return this; + } + /** + * repeated int32 msgIds = 3; + * @return This builder for chaining. + */ + public Builder clearMsgIds() { + msgIds_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BatchResultMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BatchResultMessageProto) + private static final BatchResultMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BatchResultMessageProto(); + } + + public static BatchResultMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BatchResultMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchResultMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BatchResultMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProtoOrBuilder.java new file mode 100644 index 00000000000..8e644d356f3 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProtoOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: batchResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BatchResultMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BatchResultMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + boolean hasAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + AbstractMessageProto getAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); + + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + java.util.List + getResultMessagesList(); + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + com.google.protobuf.Any getResultMessages(int index); + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + int getResultMessagesCount(); + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + java.util.List + getResultMessagesOrBuilderList(); + /** + * repeated .google.protobuf.Any resultMessages = 2; + */ + com.google.protobuf.AnyOrBuilder getResultMessagesOrBuilder( + int index); + + /** + * repeated int32 msgIds = 3; + * @return A list containing the msgIds. + */ + java.util.List getMsgIdsList(); + /** + * repeated int32 msgIds = 3; + * @return The count of msgIds. + */ + int getMsgIdsCount(); + /** + * repeated int32 msgIds = 3; + * @param index The index of the element to return. + * @return The msgIds at the given index. + */ + int getMsgIds(int index); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequest.java new file mode 100644 index 00000000000..b4761a89066 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequest.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchCommitRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchCommitRequest { + private BranchCommitRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\031branchCommitRequest.proto\022\"org.apache." + + "seata.protocol.protobuf\032\036abstractBranchE" + + "ndRequest.proto\"\177\n\030BranchCommitRequestPr" + + "oto\022c\n\030abstractBranchEndRequest\030\001 \001(\0132A." + + "org.apache.seata.protocol.protobuf.Abstr" + + "actBranchEndRequestProtoBL\n3org.apache.s" + + "eata.core.serializer.protobuf.generatedB" + + "\023BranchCommitRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractBranchEndRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor, + new String[] { "AbstractBranchEndRequest", }); + AbstractBranchEndRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProto.java new file mode 100644 index 00000000000..fec377b4130 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchCommitRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchCommitRequestProto} + */ +public final class BranchCommitRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) + BranchCommitRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BranchCommitRequestProto.newBuilder() to construct. + private BranchCommitRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BranchCommitRequestProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BranchCommitRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BranchCommitRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractBranchEndRequestProto.Builder subBuilder = null; + if (abstractBranchEndRequest_ != null) { + subBuilder = abstractBranchEndRequest_.toBuilder(); + } + abstractBranchEndRequest_ = input.readMessage(AbstractBranchEndRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractBranchEndRequest_); + abstractBranchEndRequest_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchCommitRequestProto.class, Builder.class); + } + + public static final int ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER = 1; + private AbstractBranchEndRequestProto abstractBranchEndRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return Whether the abstractBranchEndRequest field is set. + */ + @Override + public boolean hasAbstractBranchEndRequest() { + return abstractBranchEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return The abstractBranchEndRequest. + */ + @Override + public AbstractBranchEndRequestProto getAbstractBranchEndRequest() { + return abstractBranchEndRequest_ == null ? AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + @Override + public AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { + return getAbstractBranchEndRequest(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractBranchEndRequest_ != null) { + output.writeMessage(1, getAbstractBranchEndRequest()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractBranchEndRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractBranchEndRequest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BranchCommitRequestProto)) { + return super.equals(obj); + } + BranchCommitRequestProto other = (BranchCommitRequestProto) obj; + + if (hasAbstractBranchEndRequest() != other.hasAbstractBranchEndRequest()) return false; + if (hasAbstractBranchEndRequest()) { + if (!getAbstractBranchEndRequest() + .equals(other.getAbstractBranchEndRequest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractBranchEndRequest()) { + hash = (37 * hash) + ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractBranchEndRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BranchCommitRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchCommitRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchCommitRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchCommitRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchCommitRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchCommitRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchCommitRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchCommitRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BranchCommitRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BranchCommitRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BranchCommitRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchCommitRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BranchCommitRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchCommitRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) + BranchCommitRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchCommitRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchCommitRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractBranchEndRequestBuilder_ == null) { + abstractBranchEndRequest_ = null; + } else { + abstractBranchEndRequest_ = null; + abstractBranchEndRequestBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; + } + + @Override + public BranchCommitRequestProto getDefaultInstanceForType() { + return BranchCommitRequestProto.getDefaultInstance(); + } + + @Override + public BranchCommitRequestProto build() { + BranchCommitRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BranchCommitRequestProto buildPartial() { + BranchCommitRequestProto result = new BranchCommitRequestProto(this); + if (abstractBranchEndRequestBuilder_ == null) { + result.abstractBranchEndRequest_ = abstractBranchEndRequest_; + } else { + result.abstractBranchEndRequest_ = abstractBranchEndRequestBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BranchCommitRequestProto) { + return mergeFrom((BranchCommitRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BranchCommitRequestProto other) { + if (other == BranchCommitRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractBranchEndRequest()) { + mergeAbstractBranchEndRequest(other.getAbstractBranchEndRequest()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BranchCommitRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BranchCommitRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractBranchEndRequestProto abstractBranchEndRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder> abstractBranchEndRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return Whether the abstractBranchEndRequest field is set. + */ + public boolean hasAbstractBranchEndRequest() { + return abstractBranchEndRequestBuilder_ != null || abstractBranchEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return The abstractBranchEndRequest. + */ + public AbstractBranchEndRequestProto getAbstractBranchEndRequest() { + if (abstractBranchEndRequestBuilder_ == null) { + return abstractBranchEndRequest_ == null ? AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; + } else { + return abstractBranchEndRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public Builder setAbstractBranchEndRequest(AbstractBranchEndRequestProto value) { + if (abstractBranchEndRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractBranchEndRequest_ = value; + onChanged(); + } else { + abstractBranchEndRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public Builder setAbstractBranchEndRequest( + AbstractBranchEndRequestProto.Builder builderForValue) { + if (abstractBranchEndRequestBuilder_ == null) { + abstractBranchEndRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractBranchEndRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public Builder mergeAbstractBranchEndRequest(AbstractBranchEndRequestProto value) { + if (abstractBranchEndRequestBuilder_ == null) { + if (abstractBranchEndRequest_ != null) { + abstractBranchEndRequest_ = + AbstractBranchEndRequestProto.newBuilder(abstractBranchEndRequest_).mergeFrom(value).buildPartial(); + } else { + abstractBranchEndRequest_ = value; + } + onChanged(); + } else { + abstractBranchEndRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public Builder clearAbstractBranchEndRequest() { + if (abstractBranchEndRequestBuilder_ == null) { + abstractBranchEndRequest_ = null; + onChanged(); + } else { + abstractBranchEndRequest_ = null; + abstractBranchEndRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public AbstractBranchEndRequestProto.Builder getAbstractBranchEndRequestBuilder() { + + onChanged(); + return getAbstractBranchEndRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { + if (abstractBranchEndRequestBuilder_ != null) { + return abstractBranchEndRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractBranchEndRequest_ == null ? + AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder> + getAbstractBranchEndRequestFieldBuilder() { + if (abstractBranchEndRequestBuilder_ == null) { + abstractBranchEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder>( + getAbstractBranchEndRequest(), + getParentForChildren(), + isClean()); + abstractBranchEndRequest_ = null; + } + return abstractBranchEndRequestBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) + private static final BranchCommitRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BranchCommitRequestProto(); + } + + public static BranchCommitRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BranchCommitRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BranchCommitRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BranchCommitRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProtoOrBuilder.java new file mode 100644 index 00000000000..1ecd11109fb --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchCommitRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BranchCommitRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return Whether the abstractBranchEndRequest field is set. + */ + boolean hasAbstractBranchEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return The abstractBranchEndRequest. + */ + AbstractBranchEndRequestProto getAbstractBranchEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponse.java new file mode 100644 index 00000000000..b75dc8e4d05 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponse.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchCommitResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchCommitResponse { + private BranchCommitResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\032branchCommitResponse.proto\022\"org.apache" + + ".seata.protocol.protobuf\032\037abstractBranch" + + "EndResponse.proto\"\202\001\n\031BranchCommitRespon" + + "seProto\022e\n\031abstractBranchEndResponse\030\001 \001" + + "(\0132B.org.apache.seata.protocol.protobuf." + + "AbstractBranchEndResponseProtoBM\n3org.ap" + + "ache.seata.core.serializer.protobuf.gene" + + "ratedB\024BranchCommitResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractBranchEndResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor, + new String[] { "AbstractBranchEndResponse", }); + AbstractBranchEndResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProto.java new file mode 100644 index 00000000000..d78f5cbc09d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchCommitResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchCommitResponseProto} + */ +public final class BranchCommitResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) + BranchCommitResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BranchCommitResponseProto.newBuilder() to construct. + private BranchCommitResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BranchCommitResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BranchCommitResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BranchCommitResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractBranchEndResponseProto.Builder subBuilder = null; + if (abstractBranchEndResponse_ != null) { + subBuilder = abstractBranchEndResponse_.toBuilder(); + } + abstractBranchEndResponse_ = input.readMessage(AbstractBranchEndResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractBranchEndResponse_); + abstractBranchEndResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchCommitResponseProto.class, Builder.class); + } + + public static final int ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER = 1; + private AbstractBranchEndResponseProto abstractBranchEndResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return Whether the abstractBranchEndResponse field is set. + */ + @Override + public boolean hasAbstractBranchEndResponse() { + return abstractBranchEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return The abstractBranchEndResponse. + */ + @Override + public AbstractBranchEndResponseProto getAbstractBranchEndResponse() { + return abstractBranchEndResponse_ == null ? AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + @Override + public AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { + return getAbstractBranchEndResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractBranchEndResponse_ != null) { + output.writeMessage(1, getAbstractBranchEndResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractBranchEndResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractBranchEndResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BranchCommitResponseProto)) { + return super.equals(obj); + } + BranchCommitResponseProto other = (BranchCommitResponseProto) obj; + + if (hasAbstractBranchEndResponse() != other.hasAbstractBranchEndResponse()) return false; + if (hasAbstractBranchEndResponse()) { + if (!getAbstractBranchEndResponse() + .equals(other.getAbstractBranchEndResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractBranchEndResponse()) { + hash = (37 * hash) + ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractBranchEndResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BranchCommitResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchCommitResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchCommitResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchCommitResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchCommitResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchCommitResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchCommitResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchCommitResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BranchCommitResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BranchCommitResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BranchCommitResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchCommitResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BranchCommitResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchCommitResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) + BranchCommitResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchCommitResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchCommitResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractBranchEndResponseBuilder_ == null) { + abstractBranchEndResponse_ = null; + } else { + abstractBranchEndResponse_ = null; + abstractBranchEndResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; + } + + @Override + public BranchCommitResponseProto getDefaultInstanceForType() { + return BranchCommitResponseProto.getDefaultInstance(); + } + + @Override + public BranchCommitResponseProto build() { + BranchCommitResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BranchCommitResponseProto buildPartial() { + BranchCommitResponseProto result = new BranchCommitResponseProto(this); + if (abstractBranchEndResponseBuilder_ == null) { + result.abstractBranchEndResponse_ = abstractBranchEndResponse_; + } else { + result.abstractBranchEndResponse_ = abstractBranchEndResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BranchCommitResponseProto) { + return mergeFrom((BranchCommitResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BranchCommitResponseProto other) { + if (other == BranchCommitResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractBranchEndResponse()) { + mergeAbstractBranchEndResponse(other.getAbstractBranchEndResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BranchCommitResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BranchCommitResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractBranchEndResponseProto abstractBranchEndResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder> abstractBranchEndResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return Whether the abstractBranchEndResponse field is set. + */ + public boolean hasAbstractBranchEndResponse() { + return abstractBranchEndResponseBuilder_ != null || abstractBranchEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return The abstractBranchEndResponse. + */ + public AbstractBranchEndResponseProto getAbstractBranchEndResponse() { + if (abstractBranchEndResponseBuilder_ == null) { + return abstractBranchEndResponse_ == null ? AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; + } else { + return abstractBranchEndResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public Builder setAbstractBranchEndResponse(AbstractBranchEndResponseProto value) { + if (abstractBranchEndResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractBranchEndResponse_ = value; + onChanged(); + } else { + abstractBranchEndResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public Builder setAbstractBranchEndResponse( + AbstractBranchEndResponseProto.Builder builderForValue) { + if (abstractBranchEndResponseBuilder_ == null) { + abstractBranchEndResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractBranchEndResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public Builder mergeAbstractBranchEndResponse(AbstractBranchEndResponseProto value) { + if (abstractBranchEndResponseBuilder_ == null) { + if (abstractBranchEndResponse_ != null) { + abstractBranchEndResponse_ = + AbstractBranchEndResponseProto.newBuilder(abstractBranchEndResponse_).mergeFrom(value).buildPartial(); + } else { + abstractBranchEndResponse_ = value; + } + onChanged(); + } else { + abstractBranchEndResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public Builder clearAbstractBranchEndResponse() { + if (abstractBranchEndResponseBuilder_ == null) { + abstractBranchEndResponse_ = null; + onChanged(); + } else { + abstractBranchEndResponse_ = null; + abstractBranchEndResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public AbstractBranchEndResponseProto.Builder getAbstractBranchEndResponseBuilder() { + + onChanged(); + return getAbstractBranchEndResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { + if (abstractBranchEndResponseBuilder_ != null) { + return abstractBranchEndResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractBranchEndResponse_ == null ? + AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder> + getAbstractBranchEndResponseFieldBuilder() { + if (abstractBranchEndResponseBuilder_ == null) { + abstractBranchEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder>( + getAbstractBranchEndResponse(), + getParentForChildren(), + isClean()); + abstractBranchEndResponse_ = null; + } + return abstractBranchEndResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) + private static final BranchCommitResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BranchCommitResponseProto(); + } + + public static BranchCommitResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BranchCommitResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BranchCommitResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BranchCommitResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProtoOrBuilder.java new file mode 100644 index 00000000000..fb53c6b7fb2 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchCommitResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BranchCommitResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return Whether the abstractBranchEndResponse field is set. + */ + boolean hasAbstractBranchEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return The abstractBranchEndResponse. + */ + AbstractBranchEndResponseProto getAbstractBranchEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequest.java new file mode 100644 index 00000000000..05e5ca2ee9c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequest.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRegisterRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchRegisterRequest { + private BranchRegisterRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\033branchRegisterRequest.proto\022\"org.apach" + + "e.seata.protocol.protobuf\032\020branchType.pr" + + "oto\032 abstractTransactionRequest.proto\"\231\002" + + "\n\032BranchRegisterRequestProto\022g\n\032abstract" + + "TransactionRequest\030\001 \001(\0132C.org.apache.se" + + "ata.protocol.protobuf.AbstractTransactio" + + "nRequestProto\022\013\n\003xid\030\002 \001(\t\022G\n\nbranchType" + + "\030\003 \001(\01623.org.apache.seata.protocol.proto" + + "buf.BranchTypeProto\022\022\n\nresourceId\030\004 \001(\t\022" + + "\017\n\007lockKey\030\005 \001(\t\022\027\n\017applicationData\030\006 \001(" + + "\tBN\n3org.apache.seata.core.serializer.pr" + + "otobuf.generatedB\025BranchRegisterRequestP" + + "\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + BranchType.getDescriptor(), + AbstractTransactionRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor, + new String[] { "AbstractTransactionRequest", "Xid", "BranchType", "ResourceId", "LockKey", "ApplicationData", }); + BranchType.getDescriptor(); + AbstractTransactionRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProto.java new file mode 100644 index 00000000000..a79d3122645 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProto.java @@ -0,0 +1,1265 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRegisterRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRegisterRequestProto} + */ +public final class BranchRegisterRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) + BranchRegisterRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BranchRegisterRequestProto.newBuilder() to construct. + private BranchRegisterRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BranchRegisterRequestProto() { + xid_ = ""; + branchType_ = 0; + resourceId_ = ""; + lockKey_ = ""; + applicationData_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BranchRegisterRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BranchRegisterRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionRequestProto.Builder subBuilder = null; + if (abstractTransactionRequest_ != null) { + subBuilder = abstractTransactionRequest_.toBuilder(); + } + abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionRequest_); + abstractTransactionRequest_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + xid_ = s; + break; + } + case 24: { + int rawValue = input.readEnum(); + + branchType_ = rawValue; + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + resourceId_ = s; + break; + } + case 42: { + String s = input.readStringRequireUtf8(); + + lockKey_ = s; + break; + } + case 50: { + String s = input.readStringRequireUtf8(); + + applicationData_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchRegisterRequestProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; + private AbstractTransactionRequestProto abstractTransactionRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + @Override + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + @Override + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + @Override + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + return getAbstractTransactionRequest(); + } + + public static final int XID_FIELD_NUMBER = 2; + private volatile Object xid_; + /** + * string xid = 2; + * @return The xid. + */ + @Override + public String getXid() { + Object ref = xid_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + @Override + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCHTYPE_FIELD_NUMBER = 3; + private int branchType_; + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @return The enum numeric value on the wire for branchType. + */ + @Override public int getBranchTypeValue() { + return branchType_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @return The branchType. + */ + @Override public BranchTypeProto getBranchType() { + @SuppressWarnings("deprecation") + BranchTypeProto result = BranchTypeProto.valueOf(branchType_); + return result == null ? BranchTypeProto.UNRECOGNIZED : result; + } + + public static final int RESOURCEID_FIELD_NUMBER = 4; + private volatile Object resourceId_; + /** + * string resourceId = 4; + * @return The resourceId. + */ + @Override + public String getResourceId() { + Object ref = resourceId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } + } + /** + * string resourceId = 4; + * @return The bytes for resourceId. + */ + @Override + public com.google.protobuf.ByteString + getResourceIdBytes() { + Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCKKEY_FIELD_NUMBER = 5; + private volatile Object lockKey_; + /** + * string lockKey = 5; + * @return The lockKey. + */ + @Override + public String getLockKey() { + Object ref = lockKey_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + lockKey_ = s; + return s; + } + } + /** + * string lockKey = 5; + * @return The bytes for lockKey. + */ + @Override + public com.google.protobuf.ByteString + getLockKeyBytes() { + Object ref = lockKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + lockKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATIONDATA_FIELD_NUMBER = 6; + private volatile Object applicationData_; + /** + * string applicationData = 6; + * @return The applicationData. + */ + @Override + public String getApplicationData() { + Object ref = applicationData_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + applicationData_ = s; + return s; + } + } + /** + * string applicationData = 6; + * @return The bytes for applicationData. + */ + @Override + public com.google.protobuf.ByteString + getApplicationDataBytes() { + Object ref = applicationData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + applicationData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionRequest_ != null) { + output.writeMessage(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); + } + if (branchType_ != BranchTypeProto.AT.getNumber()) { + output.writeEnum(3, branchType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lockKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lockKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); + } + if (branchType_ != BranchTypeProto.AT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, branchType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lockKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lockKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BranchRegisterRequestProto)) { + return super.equals(obj); + } + BranchRegisterRequestProto other = (BranchRegisterRequestProto) obj; + + if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; + if (hasAbstractTransactionRequest()) { + if (!getAbstractTransactionRequest() + .equals(other.getAbstractTransactionRequest())) return false; + } + if (!getXid() + .equals(other.getXid())) return false; + if (branchType_ != other.branchType_) return false; + if (!getResourceId() + .equals(other.getResourceId())) return false; + if (!getLockKey() + .equals(other.getLockKey())) return false; + if (!getApplicationData() + .equals(other.getApplicationData())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionRequest()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); + } + hash = (37 * hash) + XID_FIELD_NUMBER; + hash = (53 * hash) + getXid().hashCode(); + hash = (37 * hash) + BRANCHTYPE_FIELD_NUMBER; + hash = (53 * hash) + branchType_; + hash = (37 * hash) + RESOURCEID_FIELD_NUMBER; + hash = (53 * hash) + getResourceId().hashCode(); + hash = (37 * hash) + LOCKKEY_FIELD_NUMBER; + hash = (53 * hash) + getLockKey().hashCode(); + hash = (37 * hash) + APPLICATIONDATA_FIELD_NUMBER; + hash = (53 * hash) + getApplicationData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BranchRegisterRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRegisterRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRegisterRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRegisterRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRegisterRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRegisterRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRegisterRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchRegisterRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BranchRegisterRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BranchRegisterRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BranchRegisterRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchRegisterRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BranchRegisterRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRegisterRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) + BranchRegisterRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchRegisterRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + xid_ = ""; + + branchType_ = 0; + + resourceId_ = ""; + + lockKey_ = ""; + + applicationData_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; + } + + @Override + public BranchRegisterRequestProto getDefaultInstanceForType() { + return BranchRegisterRequestProto.getDefaultInstance(); + } + + @Override + public BranchRegisterRequestProto build() { + BranchRegisterRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BranchRegisterRequestProto buildPartial() { + BranchRegisterRequestProto result = new BranchRegisterRequestProto(this); + if (abstractTransactionRequestBuilder_ == null) { + result.abstractTransactionRequest_ = abstractTransactionRequest_; + } else { + result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); + } + result.xid_ = xid_; + result.branchType_ = branchType_; + result.resourceId_ = resourceId_; + result.lockKey_ = lockKey_; + result.applicationData_ = applicationData_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BranchRegisterRequestProto) { + return mergeFrom((BranchRegisterRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BranchRegisterRequestProto other) { + if (other == BranchRegisterRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionRequest()) { + mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); + } + if (!other.getXid().isEmpty()) { + xid_ = other.xid_; + onChanged(); + } + if (other.branchType_ != 0) { + setBranchTypeValue(other.getBranchTypeValue()); + } + if (!other.getResourceId().isEmpty()) { + resourceId_ = other.resourceId_; + onChanged(); + } + if (!other.getLockKey().isEmpty()) { + lockKey_ = other.lockKey_; + onChanged(); + } + if (!other.getApplicationData().isEmpty()) { + applicationData_ = other.applicationData_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BranchRegisterRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BranchRegisterRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionRequestProto abstractTransactionRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } else { + return abstractTransactionRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionRequest_ = value; + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest( + AbstractTransactionRequestProto.Builder builderForValue) { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (abstractTransactionRequest_ != null) { + abstractTransactionRequest_ = + AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionRequest_ = value; + } + onChanged(); + } else { + abstractTransactionRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder clearAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + onChanged(); + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { + + onChanged(); + return getAbstractTransactionRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + if (abstractTransactionRequestBuilder_ != null) { + return abstractTransactionRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionRequest_ == null ? + AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> + getAbstractTransactionRequestFieldBuilder() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( + getAbstractTransactionRequest(), + getParentForChildren(), + isClean()); + abstractTransactionRequest_ = null; + } + return abstractTransactionRequestBuilder_; + } + + private Object xid_ = ""; + /** + * string xid = 2; + * @return The xid. + */ + public String getXid() { + Object ref = xid_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string xid = 2; + * @param value The xid to set. + * @return This builder for chaining. + */ + public Builder setXid( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + xid_ = value; + onChanged(); + return this; + } + /** + * string xid = 2; + * @return This builder for chaining. + */ + public Builder clearXid() { + + xid_ = getDefaultInstance().getXid(); + onChanged(); + return this; + } + /** + * string xid = 2; + * @param value The bytes for xid to set. + * @return This builder for chaining. + */ + public Builder setXidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + xid_ = value; + onChanged(); + return this; + } + + private int branchType_ = 0; + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @return The enum numeric value on the wire for branchType. + */ + @Override public int getBranchTypeValue() { + return branchType_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @param value The enum numeric value on the wire for branchType to set. + * @return This builder for chaining. + */ + public Builder setBranchTypeValue(int value) { + + branchType_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @return The branchType. + */ + @Override + public BranchTypeProto getBranchType() { + @SuppressWarnings("deprecation") + BranchTypeProto result = BranchTypeProto.valueOf(branchType_); + return result == null ? BranchTypeProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @param value The branchType to set. + * @return This builder for chaining. + */ + public Builder setBranchType(BranchTypeProto value) { + if (value == null) { + throw new NullPointerException(); + } + + branchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @return This builder for chaining. + */ + public Builder clearBranchType() { + + branchType_ = 0; + onChanged(); + return this; + } + + private Object resourceId_ = ""; + /** + * string resourceId = 4; + * @return The resourceId. + */ + public String getResourceId() { + Object ref = resourceId_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string resourceId = 4; + * @return The bytes for resourceId. + */ + public com.google.protobuf.ByteString + getResourceIdBytes() { + Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string resourceId = 4; + * @param value The resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceId( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceId_ = value; + onChanged(); + return this; + } + /** + * string resourceId = 4; + * @return This builder for chaining. + */ + public Builder clearResourceId() { + + resourceId_ = getDefaultInstance().getResourceId(); + onChanged(); + return this; + } + /** + * string resourceId = 4; + * @param value The bytes for resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceId_ = value; + onChanged(); + return this; + } + + private Object lockKey_ = ""; + /** + * string lockKey = 5; + * @return The lockKey. + */ + public String getLockKey() { + Object ref = lockKey_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + lockKey_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string lockKey = 5; + * @return The bytes for lockKey. + */ + public com.google.protobuf.ByteString + getLockKeyBytes() { + Object ref = lockKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + lockKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string lockKey = 5; + * @param value The lockKey to set. + * @return This builder for chaining. + */ + public Builder setLockKey( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + lockKey_ = value; + onChanged(); + return this; + } + /** + * string lockKey = 5; + * @return This builder for chaining. + */ + public Builder clearLockKey() { + + lockKey_ = getDefaultInstance().getLockKey(); + onChanged(); + return this; + } + /** + * string lockKey = 5; + * @param value The bytes for lockKey to set. + * @return This builder for chaining. + */ + public Builder setLockKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lockKey_ = value; + onChanged(); + return this; + } + + private Object applicationData_ = ""; + /** + * string applicationData = 6; + * @return The applicationData. + */ + public String getApplicationData() { + Object ref = applicationData_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + applicationData_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string applicationData = 6; + * @return The bytes for applicationData. + */ + public com.google.protobuf.ByteString + getApplicationDataBytes() { + Object ref = applicationData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + applicationData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string applicationData = 6; + * @param value The applicationData to set. + * @return This builder for chaining. + */ + public Builder setApplicationData( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationData_ = value; + onChanged(); + return this; + } + /** + * string applicationData = 6; + * @return This builder for chaining. + */ + public Builder clearApplicationData() { + + applicationData_ = getDefaultInstance().getApplicationData(); + onChanged(); + return this; + } + /** + * string applicationData = 6; + * @param value The bytes for applicationData to set. + * @return This builder for chaining. + */ + public Builder setApplicationDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationData_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) + private static final BranchRegisterRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BranchRegisterRequestProto(); + } + + public static BranchRegisterRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BranchRegisterRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BranchRegisterRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BranchRegisterRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java new file mode 100644 index 00000000000..793ed6ec33f --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRegisterRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BranchRegisterRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + boolean hasAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + AbstractTransactionRequestProto getAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); + + /** + * string xid = 2; + * @return The xid. + */ + String getXid(); + /** + * string xid = 2; + * @return The bytes for xid. + */ + com.google.protobuf.ByteString + getXidBytes(); + + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @return The enum numeric value on the wire for branchType. + */ + int getBranchTypeValue(); + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; + * @return The branchType. + */ + BranchTypeProto getBranchType(); + + /** + * string resourceId = 4; + * @return The resourceId. + */ + String getResourceId(); + /** + * string resourceId = 4; + * @return The bytes for resourceId. + */ + com.google.protobuf.ByteString + getResourceIdBytes(); + + /** + * string lockKey = 5; + * @return The lockKey. + */ + String getLockKey(); + /** + * string lockKey = 5; + * @return The bytes for lockKey. + */ + com.google.protobuf.ByteString + getLockKeyBytes(); + + /** + * string applicationData = 6; + * @return The applicationData. + */ + String getApplicationData(); + /** + * string applicationData = 6; + * @return The bytes for applicationData. + */ + com.google.protobuf.ByteString + getApplicationDataBytes(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponse.java new file mode 100644 index 00000000000..6deaf2da27b --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponse.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRegisterResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchRegisterResponse { + private BranchRegisterResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\034branchRegisterResponse.proto\022\"org.apac" + + "he.seata.protocol.protobuf\032!abstractTran" + + "sactionResponse.proto\"\232\001\n\033BranchRegister" + + "ResponseProto\022i\n\033abstractTransactionResp" + + "onse\030\001 \001(\0132D.org.apache.seata.protocol.p" + + "rotobuf.AbstractTransactionResponseProto" + + "\022\020\n\010branchId\030\002 \001(\003BO\n3org.apache.seata.c" + + "ore.serializer.protobuf.generatedB\026Branc" + + "hRegisterResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor, + new String[] { "AbstractTransactionResponse", "BranchId", }); + AbstractTransactionResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProto.java new file mode 100644 index 00000000000..ef82e077cd2 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProto.java @@ -0,0 +1,682 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRegisterResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRegisterResponseProto} + */ +public final class BranchRegisterResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) + BranchRegisterResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BranchRegisterResponseProto.newBuilder() to construct. + private BranchRegisterResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BranchRegisterResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BranchRegisterResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BranchRegisterResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionResponseProto.Builder subBuilder = null; + if (abstractTransactionResponse_ != null) { + subBuilder = abstractTransactionResponse_.toBuilder(); + } + abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionResponse_); + abstractTransactionResponse_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + branchId_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchRegisterResponseProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; + private AbstractTransactionResponseProto abstractTransactionResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + @Override + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + @Override + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + @Override + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + return getAbstractTransactionResponse(); + } + + public static final int BRANCHID_FIELD_NUMBER = 2; + private long branchId_; + /** + * int64 branchId = 2; + * @return The branchId. + */ + @Override + public long getBranchId() { + return branchId_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionResponse_ != null) { + output.writeMessage(1, getAbstractTransactionResponse()); + } + if (branchId_ != 0L) { + output.writeInt64(2, branchId_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionResponse()); + } + if (branchId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, branchId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BranchRegisterResponseProto)) { + return super.equals(obj); + } + BranchRegisterResponseProto other = (BranchRegisterResponseProto) obj; + + if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; + if (hasAbstractTransactionResponse()) { + if (!getAbstractTransactionResponse() + .equals(other.getAbstractTransactionResponse())) return false; + } + if (getBranchId() + != other.getBranchId()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionResponse()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); + } + hash = (37 * hash) + BRANCHID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBranchId()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BranchRegisterResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRegisterResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRegisterResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRegisterResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRegisterResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRegisterResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRegisterResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchRegisterResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BranchRegisterResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BranchRegisterResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BranchRegisterResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchRegisterResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BranchRegisterResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRegisterResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) + BranchRegisterResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchRegisterResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchRegisterResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + branchId_ = 0L; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; + } + + @Override + public BranchRegisterResponseProto getDefaultInstanceForType() { + return BranchRegisterResponseProto.getDefaultInstance(); + } + + @Override + public BranchRegisterResponseProto build() { + BranchRegisterResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BranchRegisterResponseProto buildPartial() { + BranchRegisterResponseProto result = new BranchRegisterResponseProto(this); + if (abstractTransactionResponseBuilder_ == null) { + result.abstractTransactionResponse_ = abstractTransactionResponse_; + } else { + result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); + } + result.branchId_ = branchId_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BranchRegisterResponseProto) { + return mergeFrom((BranchRegisterResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BranchRegisterResponseProto other) { + if (other == BranchRegisterResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionResponse()) { + mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); + } + if (other.getBranchId() != 0L) { + setBranchId(other.getBranchId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BranchRegisterResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BranchRegisterResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionResponseProto abstractTransactionResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } else { + return abstractTransactionResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionResponse_ = value; + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse( + AbstractTransactionResponseProto.Builder builderForValue) { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (abstractTransactionResponse_ != null) { + abstractTransactionResponse_ = + AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionResponse_ = value; + } + onChanged(); + } else { + abstractTransactionResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder clearAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + onChanged(); + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { + + onChanged(); + return getAbstractTransactionResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + if (abstractTransactionResponseBuilder_ != null) { + return abstractTransactionResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionResponse_ == null ? + AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> + getAbstractTransactionResponseFieldBuilder() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( + getAbstractTransactionResponse(), + getParentForChildren(), + isClean()); + abstractTransactionResponse_ = null; + } + return abstractTransactionResponseBuilder_; + } + + private long branchId_ ; + /** + * int64 branchId = 2; + * @return The branchId. + */ + @Override + public long getBranchId() { + return branchId_; + } + /** + * int64 branchId = 2; + * @param value The branchId to set. + * @return This builder for chaining. + */ + public Builder setBranchId(long value) { + + branchId_ = value; + onChanged(); + return this; + } + /** + * int64 branchId = 2; + * @return This builder for chaining. + */ + public Builder clearBranchId() { + + branchId_ = 0L; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) + private static final BranchRegisterResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BranchRegisterResponseProto(); + } + + public static BranchRegisterResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BranchRegisterResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BranchRegisterResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BranchRegisterResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java new file mode 100644 index 00000000000..111fded3ef6 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java @@ -0,0 +1,30 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRegisterResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BranchRegisterResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + boolean hasAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + AbstractTransactionResponseProto getAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); + + /** + * int64 branchId = 2; + * @return The branchId. + */ + long getBranchId(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequest.java new file mode 100644 index 00000000000..e7d62bf132d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequest.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchReportRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchReportRequest { + private BranchReportRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\031branchReportRequest.proto\022\"org.apache." + + "seata.protocol.protobuf\032\022branchStatus.pr" + + "oto\032\020branchType.proto\032 abstractTransacti" + + "onRequest.proto\"\337\002\n\030BranchReportRequestP" + + "roto\022g\n\032abstractTransactionRequest\030\001 \001(\013" + + "2C.org.apache.seata.protocol.protobuf.Ab" + + "stractTransactionRequestProto\022\013\n\003xid\030\002 \001" + + "(\t\022\020\n\010branchId\030\003 \001(\003\022\022\n\nresourceId\030\004 \001(\t" + + "\022E\n\006status\030\005 \001(\01625.org.apache.seata.prot" + + "ocol.protobuf.BranchStatusProto\022\027\n\017appli" + + "cationData\030\006 \001(\t\022G\n\nbranchType\030\007 \001(\01623.o" + + "rg.apache.seata.protocol.protobuf.Branch" + + "TypeProtoBL\n3org.apache.seata.core.seria" + + "lizer.protobuf.generatedB\023BranchReportRe" + + "questP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + BranchStatus.getDescriptor(), + BranchType.getDescriptor(), + AbstractTransactionRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor, + new String[] { "AbstractTransactionRequest", "Xid", "BranchId", "ResourceId", "Status", "ApplicationData", "BranchType", }); + BranchStatus.getDescriptor(); + BranchType.getDescriptor(); + AbstractTransactionRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProto.java new file mode 100644 index 00000000000..b3cbf2cb449 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProto.java @@ -0,0 +1,1280 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchReportRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchReportRequestProto} + */ +public final class BranchReportRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchReportRequestProto) + BranchReportRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BranchReportRequestProto.newBuilder() to construct. + private BranchReportRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BranchReportRequestProto() { + xid_ = ""; + resourceId_ = ""; + status_ = 0; + applicationData_ = ""; + branchType_ = 0; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BranchReportRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BranchReportRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionRequestProto.Builder subBuilder = null; + if (abstractTransactionRequest_ != null) { + subBuilder = abstractTransactionRequest_.toBuilder(); + } + abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionRequest_); + abstractTransactionRequest_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + xid_ = s; + break; + } + case 24: { + + branchId_ = input.readInt64(); + break; + } + case 34: { + String s = input.readStringRequireUtf8(); + + resourceId_ = s; + break; + } + case 40: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 50: { + String s = input.readStringRequireUtf8(); + + applicationData_ = s; + break; + } + case 56: { + int rawValue = input.readEnum(); + + branchType_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchReportRequestProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; + private AbstractTransactionRequestProto abstractTransactionRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + @Override + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + @Override + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + @Override + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + return getAbstractTransactionRequest(); + } + + public static final int XID_FIELD_NUMBER = 2; + private volatile Object xid_; + /** + * string xid = 2; + * @return The xid. + */ + @Override + public String getXid() { + Object ref = xid_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + @Override + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCHID_FIELD_NUMBER = 3; + private long branchId_; + /** + * int64 branchId = 3; + * @return The branchId. + */ + @Override + public long getBranchId() { + return branchId_; + } + + public static final int RESOURCEID_FIELD_NUMBER = 4; + private volatile Object resourceId_; + /** + * string resourceId = 4; + * @return The resourceId. + */ + @Override + public String getResourceId() { + Object ref = resourceId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } + } + /** + * string resourceId = 4; + * @return The bytes for resourceId. + */ + @Override + public com.google.protobuf.ByteString + getResourceIdBytes() { + Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 5; + private int status_; + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @return The enum numeric value on the wire for status. + */ + @Override public int getStatusValue() { + return status_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @return The status. + */ + @Override public BranchStatusProto getStatus() { + @SuppressWarnings("deprecation") + BranchStatusProto result = BranchStatusProto.valueOf(status_); + return result == null ? BranchStatusProto.UNRECOGNIZED : result; + } + + public static final int APPLICATIONDATA_FIELD_NUMBER = 6; + private volatile Object applicationData_; + /** + * string applicationData = 6; + * @return The applicationData. + */ + @Override + public String getApplicationData() { + Object ref = applicationData_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + applicationData_ = s; + return s; + } + } + /** + * string applicationData = 6; + * @return The bytes for applicationData. + */ + @Override + public com.google.protobuf.ByteString + getApplicationDataBytes() { + Object ref = applicationData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + applicationData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCHTYPE_FIELD_NUMBER = 7; + private int branchType_; + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @return The enum numeric value on the wire for branchType. + */ + @Override public int getBranchTypeValue() { + return branchType_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @return The branchType. + */ + @Override public BranchTypeProto getBranchType() { + @SuppressWarnings("deprecation") + BranchTypeProto result = BranchTypeProto.valueOf(branchType_); + return result == null ? BranchTypeProto.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionRequest_ != null) { + output.writeMessage(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); + } + if (branchId_ != 0L) { + output.writeInt64(3, branchId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceId_); + } + if (status_ != BranchStatusProto.BUnknown.getNumber()) { + output.writeEnum(5, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); + } + if (branchType_ != BranchTypeProto.AT.getNumber()) { + output.writeEnum(7, branchType_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); + } + if (branchId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, branchId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceId_); + } + if (status_ != BranchStatusProto.BUnknown.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); + } + if (branchType_ != BranchTypeProto.AT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, branchType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BranchReportRequestProto)) { + return super.equals(obj); + } + BranchReportRequestProto other = (BranchReportRequestProto) obj; + + if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; + if (hasAbstractTransactionRequest()) { + if (!getAbstractTransactionRequest() + .equals(other.getAbstractTransactionRequest())) return false; + } + if (!getXid() + .equals(other.getXid())) return false; + if (getBranchId() + != other.getBranchId()) return false; + if (!getResourceId() + .equals(other.getResourceId())) return false; + if (status_ != other.status_) return false; + if (!getApplicationData() + .equals(other.getApplicationData())) return false; + if (branchType_ != other.branchType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionRequest()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); + } + hash = (37 * hash) + XID_FIELD_NUMBER; + hash = (53 * hash) + getXid().hashCode(); + hash = (37 * hash) + BRANCHID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBranchId()); + hash = (37 * hash) + RESOURCEID_FIELD_NUMBER; + hash = (53 * hash) + getResourceId().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (37 * hash) + APPLICATIONDATA_FIELD_NUMBER; + hash = (53 * hash) + getApplicationData().hashCode(); + hash = (37 * hash) + BRANCHTYPE_FIELD_NUMBER; + hash = (53 * hash) + branchType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BranchReportRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchReportRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchReportRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchReportRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchReportRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchReportRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchReportRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchReportRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BranchReportRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BranchReportRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BranchReportRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchReportRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BranchReportRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchReportRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchReportRequestProto) + BranchReportRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchReportRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchReportRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + xid_ = ""; + + branchId_ = 0L; + + resourceId_ = ""; + + status_ = 0; + + applicationData_ = ""; + + branchType_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor; + } + + @Override + public BranchReportRequestProto getDefaultInstanceForType() { + return BranchReportRequestProto.getDefaultInstance(); + } + + @Override + public BranchReportRequestProto build() { + BranchReportRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BranchReportRequestProto buildPartial() { + BranchReportRequestProto result = new BranchReportRequestProto(this); + if (abstractTransactionRequestBuilder_ == null) { + result.abstractTransactionRequest_ = abstractTransactionRequest_; + } else { + result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); + } + result.xid_ = xid_; + result.branchId_ = branchId_; + result.resourceId_ = resourceId_; + result.status_ = status_; + result.applicationData_ = applicationData_; + result.branchType_ = branchType_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BranchReportRequestProto) { + return mergeFrom((BranchReportRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BranchReportRequestProto other) { + if (other == BranchReportRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionRequest()) { + mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); + } + if (!other.getXid().isEmpty()) { + xid_ = other.xid_; + onChanged(); + } + if (other.getBranchId() != 0L) { + setBranchId(other.getBranchId()); + } + if (!other.getResourceId().isEmpty()) { + resourceId_ = other.resourceId_; + onChanged(); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (!other.getApplicationData().isEmpty()) { + applicationData_ = other.applicationData_; + onChanged(); + } + if (other.branchType_ != 0) { + setBranchTypeValue(other.getBranchTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BranchReportRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BranchReportRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionRequestProto abstractTransactionRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } else { + return abstractTransactionRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionRequest_ = value; + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest( + AbstractTransactionRequestProto.Builder builderForValue) { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (abstractTransactionRequest_ != null) { + abstractTransactionRequest_ = + AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionRequest_ = value; + } + onChanged(); + } else { + abstractTransactionRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder clearAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + onChanged(); + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { + + onChanged(); + return getAbstractTransactionRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + if (abstractTransactionRequestBuilder_ != null) { + return abstractTransactionRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionRequest_ == null ? + AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> + getAbstractTransactionRequestFieldBuilder() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( + getAbstractTransactionRequest(), + getParentForChildren(), + isClean()); + abstractTransactionRequest_ = null; + } + return abstractTransactionRequestBuilder_; + } + + private Object xid_ = ""; + /** + * string xid = 2; + * @return The xid. + */ + public String getXid() { + Object ref = xid_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string xid = 2; + * @param value The xid to set. + * @return This builder for chaining. + */ + public Builder setXid( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + xid_ = value; + onChanged(); + return this; + } + /** + * string xid = 2; + * @return This builder for chaining. + */ + public Builder clearXid() { + + xid_ = getDefaultInstance().getXid(); + onChanged(); + return this; + } + /** + * string xid = 2; + * @param value The bytes for xid to set. + * @return This builder for chaining. + */ + public Builder setXidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + xid_ = value; + onChanged(); + return this; + } + + private long branchId_ ; + /** + * int64 branchId = 3; + * @return The branchId. + */ + @Override + public long getBranchId() { + return branchId_; + } + /** + * int64 branchId = 3; + * @param value The branchId to set. + * @return This builder for chaining. + */ + public Builder setBranchId(long value) { + + branchId_ = value; + onChanged(); + return this; + } + /** + * int64 branchId = 3; + * @return This builder for chaining. + */ + public Builder clearBranchId() { + + branchId_ = 0L; + onChanged(); + return this; + } + + private Object resourceId_ = ""; + /** + * string resourceId = 4; + * @return The resourceId. + */ + public String getResourceId() { + Object ref = resourceId_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string resourceId = 4; + * @return The bytes for resourceId. + */ + public com.google.protobuf.ByteString + getResourceIdBytes() { + Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string resourceId = 4; + * @param value The resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceId( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceId_ = value; + onChanged(); + return this; + } + /** + * string resourceId = 4; + * @return This builder for chaining. + */ + public Builder clearResourceId() { + + resourceId_ = getDefaultInstance().getResourceId(); + onChanged(); + return this; + } + /** + * string resourceId = 4; + * @param value The bytes for resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceId_ = value; + onChanged(); + return this; + } + + private int status_ = 0; + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @return The enum numeric value on the wire for status. + */ + @Override public int getStatusValue() { + return status_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @return The status. + */ + @Override + public BranchStatusProto getStatus() { + @SuppressWarnings("deprecation") + BranchStatusProto result = BranchStatusProto.valueOf(status_); + return result == null ? BranchStatusProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(BranchStatusProto value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private Object applicationData_ = ""; + /** + * string applicationData = 6; + * @return The applicationData. + */ + public String getApplicationData() { + Object ref = applicationData_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + applicationData_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string applicationData = 6; + * @return The bytes for applicationData. + */ + public com.google.protobuf.ByteString + getApplicationDataBytes() { + Object ref = applicationData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + applicationData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string applicationData = 6; + * @param value The applicationData to set. + * @return This builder for chaining. + */ + public Builder setApplicationData( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationData_ = value; + onChanged(); + return this; + } + /** + * string applicationData = 6; + * @return This builder for chaining. + */ + public Builder clearApplicationData() { + + applicationData_ = getDefaultInstance().getApplicationData(); + onChanged(); + return this; + } + /** + * string applicationData = 6; + * @param value The bytes for applicationData to set. + * @return This builder for chaining. + */ + public Builder setApplicationDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationData_ = value; + onChanged(); + return this; + } + + private int branchType_ = 0; + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @return The enum numeric value on the wire for branchType. + */ + @Override public int getBranchTypeValue() { + return branchType_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @param value The enum numeric value on the wire for branchType to set. + * @return This builder for chaining. + */ + public Builder setBranchTypeValue(int value) { + + branchType_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @return The branchType. + */ + @Override + public BranchTypeProto getBranchType() { + @SuppressWarnings("deprecation") + BranchTypeProto result = BranchTypeProto.valueOf(branchType_); + return result == null ? BranchTypeProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @param value The branchType to set. + * @return This builder for chaining. + */ + public Builder setBranchType(BranchTypeProto value) { + if (value == null) { + throw new NullPointerException(); + } + + branchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @return This builder for chaining. + */ + public Builder clearBranchType() { + + branchType_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchReportRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchReportRequestProto) + private static final BranchReportRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BranchReportRequestProto(); + } + + public static BranchReportRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BranchReportRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BranchReportRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BranchReportRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProtoOrBuilder.java new file mode 100644 index 00000000000..9fda3b9c96b --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProtoOrBuilder.java @@ -0,0 +1,88 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchReportRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BranchReportRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchReportRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + boolean hasAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + AbstractTransactionRequestProto getAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); + + /** + * string xid = 2; + * @return The xid. + */ + String getXid(); + /** + * string xid = 2; + * @return The bytes for xid. + */ + com.google.protobuf.ByteString + getXidBytes(); + + /** + * int64 branchId = 3; + * @return The branchId. + */ + long getBranchId(); + + /** + * string resourceId = 4; + * @return The resourceId. + */ + String getResourceId(); + /** + * string resourceId = 4; + * @return The bytes for resourceId. + */ + com.google.protobuf.ByteString + getResourceIdBytes(); + + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; + * @return The status. + */ + BranchStatusProto getStatus(); + + /** + * string applicationData = 6; + * @return The applicationData. + */ + String getApplicationData(); + /** + * string applicationData = 6; + * @return The bytes for applicationData. + */ + com.google.protobuf.ByteString + getApplicationDataBytes(); + + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @return The enum numeric value on the wire for branchType. + */ + int getBranchTypeValue(); + /** + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; + * @return The branchType. + */ + BranchTypeProto getBranchType(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponse.java new file mode 100644 index 00000000000..27dd77c68d7 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponse.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchReportResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchReportResponse { + private BranchReportResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\032branchReportResponse.proto\022\"org.apache" + + ".seata.protocol.protobuf\032!abstractTransa" + + "ctionResponse.proto\"\206\001\n\031BranchReportResp" + + "onseProto\022i\n\033abstractTransactionResponse" + + "\030\001 \001(\0132D.org.apache.seata.protocol.proto" + + "buf.AbstractTransactionResponseProtoBM\n3" + + "org.apache.seata.core.serializer.protobu" + + "f.generatedB\024BranchReportResponseP\001b\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor, + new String[] { "AbstractTransactionResponse", }); + AbstractTransactionResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProto.java new file mode 100644 index 00000000000..b5497928cd1 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchReportResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchReportResponseProto} + */ +public final class BranchReportResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchReportResponseProto) + BranchReportResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BranchReportResponseProto.newBuilder() to construct. + private BranchReportResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BranchReportResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BranchReportResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BranchReportResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionResponseProto.Builder subBuilder = null; + if (abstractTransactionResponse_ != null) { + subBuilder = abstractTransactionResponse_.toBuilder(); + } + abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionResponse_); + abstractTransactionResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchReportResponseProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; + private AbstractTransactionResponseProto abstractTransactionResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + @Override + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + @Override + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + @Override + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + return getAbstractTransactionResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionResponse_ != null) { + output.writeMessage(1, getAbstractTransactionResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BranchReportResponseProto)) { + return super.equals(obj); + } + BranchReportResponseProto other = (BranchReportResponseProto) obj; + + if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; + if (hasAbstractTransactionResponse()) { + if (!getAbstractTransactionResponse() + .equals(other.getAbstractTransactionResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionResponse()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BranchReportResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchReportResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchReportResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchReportResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchReportResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchReportResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchReportResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchReportResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BranchReportResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BranchReportResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BranchReportResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchReportResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BranchReportResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchReportResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchReportResponseProto) + BranchReportResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchReportResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchReportResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor; + } + + @Override + public BranchReportResponseProto getDefaultInstanceForType() { + return BranchReportResponseProto.getDefaultInstance(); + } + + @Override + public BranchReportResponseProto build() { + BranchReportResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BranchReportResponseProto buildPartial() { + BranchReportResponseProto result = new BranchReportResponseProto(this); + if (abstractTransactionResponseBuilder_ == null) { + result.abstractTransactionResponse_ = abstractTransactionResponse_; + } else { + result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BranchReportResponseProto) { + return mergeFrom((BranchReportResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BranchReportResponseProto other) { + if (other == BranchReportResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionResponse()) { + mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BranchReportResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BranchReportResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionResponseProto abstractTransactionResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } else { + return abstractTransactionResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionResponse_ = value; + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse( + AbstractTransactionResponseProto.Builder builderForValue) { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (abstractTransactionResponse_ != null) { + abstractTransactionResponse_ = + AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionResponse_ = value; + } + onChanged(); + } else { + abstractTransactionResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder clearAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + onChanged(); + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { + + onChanged(); + return getAbstractTransactionResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + if (abstractTransactionResponseBuilder_ != null) { + return abstractTransactionResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionResponse_ == null ? + AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> + getAbstractTransactionResponseFieldBuilder() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( + getAbstractTransactionResponse(), + getParentForChildren(), + isClean()); + abstractTransactionResponse_ = null; + } + return abstractTransactionResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchReportResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchReportResponseProto) + private static final BranchReportResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BranchReportResponseProto(); + } + + public static BranchReportResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BranchReportResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BranchReportResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BranchReportResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProtoOrBuilder.java new file mode 100644 index 00000000000..e42fe6a644d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchReportResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BranchReportResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchReportResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + boolean hasAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + AbstractTransactionResponseProto getAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequest.java new file mode 100644 index 00000000000..c2ebeb339e4 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequest.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRollbackRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchRollbackRequest { + private BranchRollbackRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\033branchRollbackRequest.proto\022\"org.apach" + + "e.seata.protocol.protobuf\032\036abstractBranc" + + "hEndRequest.proto\"\201\001\n\032BranchRollbackRequ" + + "estProto\022c\n\030abstractBranchEndRequest\030\001 \001" + + "(\0132A.org.apache.seata.protocol.protobuf." + + "AbstractBranchEndRequestProtoBN\n3org.apa" + + "che.seata.core.serializer.protobuf.gener" + + "atedB\025BranchRollbackRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractBranchEndRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor, + new String[] { "AbstractBranchEndRequest", }); + AbstractBranchEndRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProto.java new file mode 100644 index 00000000000..d3110be20f4 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRollbackRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRollbackRequestProto} + */ +public final class BranchRollbackRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) + BranchRollbackRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BranchRollbackRequestProto.newBuilder() to construct. + private BranchRollbackRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BranchRollbackRequestProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BranchRollbackRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BranchRollbackRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractBranchEndRequestProto.Builder subBuilder = null; + if (abstractBranchEndRequest_ != null) { + subBuilder = abstractBranchEndRequest_.toBuilder(); + } + abstractBranchEndRequest_ = input.readMessage(AbstractBranchEndRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractBranchEndRequest_); + abstractBranchEndRequest_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchRollbackRequestProto.class, Builder.class); + } + + public static final int ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER = 1; + private AbstractBranchEndRequestProto abstractBranchEndRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return Whether the abstractBranchEndRequest field is set. + */ + @Override + public boolean hasAbstractBranchEndRequest() { + return abstractBranchEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return The abstractBranchEndRequest. + */ + @Override + public AbstractBranchEndRequestProto getAbstractBranchEndRequest() { + return abstractBranchEndRequest_ == null ? AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + @Override + public AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { + return getAbstractBranchEndRequest(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractBranchEndRequest_ != null) { + output.writeMessage(1, getAbstractBranchEndRequest()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractBranchEndRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractBranchEndRequest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BranchRollbackRequestProto)) { + return super.equals(obj); + } + BranchRollbackRequestProto other = (BranchRollbackRequestProto) obj; + + if (hasAbstractBranchEndRequest() != other.hasAbstractBranchEndRequest()) return false; + if (hasAbstractBranchEndRequest()) { + if (!getAbstractBranchEndRequest() + .equals(other.getAbstractBranchEndRequest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractBranchEndRequest()) { + hash = (37 * hash) + ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractBranchEndRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BranchRollbackRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRollbackRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRollbackRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRollbackRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRollbackRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRollbackRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRollbackRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchRollbackRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BranchRollbackRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BranchRollbackRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BranchRollbackRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchRollbackRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BranchRollbackRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRollbackRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) + BranchRollbackRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchRollbackRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchRollbackRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractBranchEndRequestBuilder_ == null) { + abstractBranchEndRequest_ = null; + } else { + abstractBranchEndRequest_ = null; + abstractBranchEndRequestBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; + } + + @Override + public BranchRollbackRequestProto getDefaultInstanceForType() { + return BranchRollbackRequestProto.getDefaultInstance(); + } + + @Override + public BranchRollbackRequestProto build() { + BranchRollbackRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BranchRollbackRequestProto buildPartial() { + BranchRollbackRequestProto result = new BranchRollbackRequestProto(this); + if (abstractBranchEndRequestBuilder_ == null) { + result.abstractBranchEndRequest_ = abstractBranchEndRequest_; + } else { + result.abstractBranchEndRequest_ = abstractBranchEndRequestBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BranchRollbackRequestProto) { + return mergeFrom((BranchRollbackRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BranchRollbackRequestProto other) { + if (other == BranchRollbackRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractBranchEndRequest()) { + mergeAbstractBranchEndRequest(other.getAbstractBranchEndRequest()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BranchRollbackRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BranchRollbackRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractBranchEndRequestProto abstractBranchEndRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder> abstractBranchEndRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return Whether the abstractBranchEndRequest field is set. + */ + public boolean hasAbstractBranchEndRequest() { + return abstractBranchEndRequestBuilder_ != null || abstractBranchEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return The abstractBranchEndRequest. + */ + public AbstractBranchEndRequestProto getAbstractBranchEndRequest() { + if (abstractBranchEndRequestBuilder_ == null) { + return abstractBranchEndRequest_ == null ? AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; + } else { + return abstractBranchEndRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public Builder setAbstractBranchEndRequest(AbstractBranchEndRequestProto value) { + if (abstractBranchEndRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractBranchEndRequest_ = value; + onChanged(); + } else { + abstractBranchEndRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public Builder setAbstractBranchEndRequest( + AbstractBranchEndRequestProto.Builder builderForValue) { + if (abstractBranchEndRequestBuilder_ == null) { + abstractBranchEndRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractBranchEndRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public Builder mergeAbstractBranchEndRequest(AbstractBranchEndRequestProto value) { + if (abstractBranchEndRequestBuilder_ == null) { + if (abstractBranchEndRequest_ != null) { + abstractBranchEndRequest_ = + AbstractBranchEndRequestProto.newBuilder(abstractBranchEndRequest_).mergeFrom(value).buildPartial(); + } else { + abstractBranchEndRequest_ = value; + } + onChanged(); + } else { + abstractBranchEndRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public Builder clearAbstractBranchEndRequest() { + if (abstractBranchEndRequestBuilder_ == null) { + abstractBranchEndRequest_ = null; + onChanged(); + } else { + abstractBranchEndRequest_ = null; + abstractBranchEndRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public AbstractBranchEndRequestProto.Builder getAbstractBranchEndRequestBuilder() { + + onChanged(); + return getAbstractBranchEndRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + public AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { + if (abstractBranchEndRequestBuilder_ != null) { + return abstractBranchEndRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractBranchEndRequest_ == null ? + AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder> + getAbstractBranchEndRequestFieldBuilder() { + if (abstractBranchEndRequestBuilder_ == null) { + abstractBranchEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder>( + getAbstractBranchEndRequest(), + getParentForChildren(), + isClean()); + abstractBranchEndRequest_ = null; + } + return abstractBranchEndRequestBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) + private static final BranchRollbackRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BranchRollbackRequestProto(); + } + + public static BranchRollbackRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BranchRollbackRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BranchRollbackRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BranchRollbackRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java new file mode 100644 index 00000000000..7952b09c47a --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRollbackRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BranchRollbackRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return Whether the abstractBranchEndRequest field is set. + */ + boolean hasAbstractBranchEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + * @return The abstractBranchEndRequest. + */ + AbstractBranchEndRequestProto getAbstractBranchEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; + */ + AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponse.java new file mode 100644 index 00000000000..41c75b397e1 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponse.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRollbackResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchRollbackResponse { + private BranchRollbackResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\034branchRollbackResponse.proto\022\"org.apac" + + "he.seata.protocol.protobuf\032\037abstractBran" + + "chEndResponse.proto\"\204\001\n\033BranchRollbackRe" + + "sponseProto\022e\n\031abstractBranchEndResponse" + + "\030\001 \001(\0132B.org.apache.seata.protocol.proto" + + "buf.AbstractBranchEndResponseProtoBO\n3or" + + "g.apache.seata.core.serializer.protobuf." + + "generatedB\026BranchRollbackResponseP\001b\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractBranchEndResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor, + new String[] { "AbstractBranchEndResponse", }); + AbstractBranchEndResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProto.java new file mode 100644 index 00000000000..7bc7a44aa33 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRollbackResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRollbackResponseProto} + */ +public final class BranchRollbackResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) + BranchRollbackResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use BranchRollbackResponseProto.newBuilder() to construct. + private BranchRollbackResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BranchRollbackResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new BranchRollbackResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BranchRollbackResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractBranchEndResponseProto.Builder subBuilder = null; + if (abstractBranchEndResponse_ != null) { + subBuilder = abstractBranchEndResponse_.toBuilder(); + } + abstractBranchEndResponse_ = input.readMessage(AbstractBranchEndResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractBranchEndResponse_); + abstractBranchEndResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchRollbackResponseProto.class, Builder.class); + } + + public static final int ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER = 1; + private AbstractBranchEndResponseProto abstractBranchEndResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return Whether the abstractBranchEndResponse field is set. + */ + @Override + public boolean hasAbstractBranchEndResponse() { + return abstractBranchEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return The abstractBranchEndResponse. + */ + @Override + public AbstractBranchEndResponseProto getAbstractBranchEndResponse() { + return abstractBranchEndResponse_ == null ? AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + @Override + public AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { + return getAbstractBranchEndResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractBranchEndResponse_ != null) { + output.writeMessage(1, getAbstractBranchEndResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractBranchEndResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractBranchEndResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof BranchRollbackResponseProto)) { + return super.equals(obj); + } + BranchRollbackResponseProto other = (BranchRollbackResponseProto) obj; + + if (hasAbstractBranchEndResponse() != other.hasAbstractBranchEndResponse()) return false; + if (hasAbstractBranchEndResponse()) { + if (!getAbstractBranchEndResponse() + .equals(other.getAbstractBranchEndResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractBranchEndResponse()) { + hash = (37 * hash) + ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractBranchEndResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static BranchRollbackResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRollbackResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRollbackResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRollbackResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRollbackResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static BranchRollbackResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static BranchRollbackResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchRollbackResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static BranchRollbackResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static BranchRollbackResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static BranchRollbackResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static BranchRollbackResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(BranchRollbackResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRollbackResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) + BranchRollbackResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + BranchRollbackResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchRollbackResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractBranchEndResponseBuilder_ == null) { + abstractBranchEndResponse_ = null; + } else { + abstractBranchEndResponse_ = null; + abstractBranchEndResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; + } + + @Override + public BranchRollbackResponseProto getDefaultInstanceForType() { + return BranchRollbackResponseProto.getDefaultInstance(); + } + + @Override + public BranchRollbackResponseProto build() { + BranchRollbackResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public BranchRollbackResponseProto buildPartial() { + BranchRollbackResponseProto result = new BranchRollbackResponseProto(this); + if (abstractBranchEndResponseBuilder_ == null) { + result.abstractBranchEndResponse_ = abstractBranchEndResponse_; + } else { + result.abstractBranchEndResponse_ = abstractBranchEndResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof BranchRollbackResponseProto) { + return mergeFrom((BranchRollbackResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(BranchRollbackResponseProto other) { + if (other == BranchRollbackResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractBranchEndResponse()) { + mergeAbstractBranchEndResponse(other.getAbstractBranchEndResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + BranchRollbackResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (BranchRollbackResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractBranchEndResponseProto abstractBranchEndResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder> abstractBranchEndResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return Whether the abstractBranchEndResponse field is set. + */ + public boolean hasAbstractBranchEndResponse() { + return abstractBranchEndResponseBuilder_ != null || abstractBranchEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return The abstractBranchEndResponse. + */ + public AbstractBranchEndResponseProto getAbstractBranchEndResponse() { + if (abstractBranchEndResponseBuilder_ == null) { + return abstractBranchEndResponse_ == null ? AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; + } else { + return abstractBranchEndResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public Builder setAbstractBranchEndResponse(AbstractBranchEndResponseProto value) { + if (abstractBranchEndResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractBranchEndResponse_ = value; + onChanged(); + } else { + abstractBranchEndResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public Builder setAbstractBranchEndResponse( + AbstractBranchEndResponseProto.Builder builderForValue) { + if (abstractBranchEndResponseBuilder_ == null) { + abstractBranchEndResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractBranchEndResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public Builder mergeAbstractBranchEndResponse(AbstractBranchEndResponseProto value) { + if (abstractBranchEndResponseBuilder_ == null) { + if (abstractBranchEndResponse_ != null) { + abstractBranchEndResponse_ = + AbstractBranchEndResponseProto.newBuilder(abstractBranchEndResponse_).mergeFrom(value).buildPartial(); + } else { + abstractBranchEndResponse_ = value; + } + onChanged(); + } else { + abstractBranchEndResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public Builder clearAbstractBranchEndResponse() { + if (abstractBranchEndResponseBuilder_ == null) { + abstractBranchEndResponse_ = null; + onChanged(); + } else { + abstractBranchEndResponse_ = null; + abstractBranchEndResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public AbstractBranchEndResponseProto.Builder getAbstractBranchEndResponseBuilder() { + + onChanged(); + return getAbstractBranchEndResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + public AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { + if (abstractBranchEndResponseBuilder_ != null) { + return abstractBranchEndResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractBranchEndResponse_ == null ? + AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder> + getAbstractBranchEndResponseFieldBuilder() { + if (abstractBranchEndResponseBuilder_ == null) { + abstractBranchEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder>( + getAbstractBranchEndResponse(), + getParentForChildren(), + isClean()); + abstractBranchEndResponse_ = null; + } + return abstractBranchEndResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) + private static final BranchRollbackResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new BranchRollbackResponseProto(); + } + + public static BranchRollbackResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public BranchRollbackResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BranchRollbackResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public BranchRollbackResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java new file mode 100644 index 00000000000..19db29f11db --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchRollbackResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface BranchRollbackResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return Whether the abstractBranchEndResponse field is set. + */ + boolean hasAbstractBranchEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + * @return The abstractBranchEndResponse. + */ + AbstractBranchEndResponseProto getAbstractBranchEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; + */ + AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatus.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatus.java new file mode 100644 index 00000000000..969d68aa034 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatus.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchStatus.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchStatus { + private BranchStatus() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\022branchStatus.proto\022\"org.apache.seata.p" + + "rotocol.protobuf*\321\002\n\021BranchStatusProto\022\014" + + "\n\010BUnknown\020\000\022\016\n\nRegistered\020\001\022\021\n\rPhaseOne" + + "_Done\020\002\022\023\n\017PhaseOne_Failed\020\003\022\024\n\020PhaseOne" + + "_Timeout\020\004\022\026\n\022PhaseTwo_Committed\020\005\022#\n\037Ph" + + "aseTwo_CommitFailed_Retryable\020\006\022%\n!Phase" + + "Two_CommitFailed_Unretryable\020\007\022\027\n\023PhaseT" + + "wo_Rollbacked\020\010\022%\n!PhaseTwo_RollbackFail" + + "ed_Retryable\020\t\022\'\n#PhaseTwo_RollbackFaile" + + "d_Unretryable\020\n\022\023\n\017PhaseOne_RDONLY\020\rBE\n3" + + "org.apache.seata.core.serializer.protobu" + + "f.generatedB\014BranchStatusP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatusProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatusProto.java new file mode 100644 index 00000000000..2ec4b0cfd4a --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatusProto.java @@ -0,0 +1,303 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchStatus.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf enum {@code org.apache.seata.protocol.protobuf.BranchStatusProto} + */ +public enum BranchStatusProto + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * special for Unknown
+   * 
+ * + * BUnknown = 0; + */ + BUnknown(0), + /** + *
+   * Registered to TC.
+   * 
+ * + * Registered = 1; + */ + Registered(1), + /** + *
+   * Branch logic is successfully done at phase one.
+   * 
+ * + * PhaseOne_Done = 2; + */ + PhaseOne_Done(2), + /** + *
+   * Branch logic is failed at phase one.
+   * 
+ * + * PhaseOne_Failed = 3; + */ + PhaseOne_Failed(3), + /** + *
+   * Branch logic is NOT reported for a timeout.
+   * 
+ * + * PhaseOne_Timeout = 4; + */ + PhaseOne_Timeout(4), + /** + *
+   * Commit logic is successfully done at phase two.
+   * 
+ * + * PhaseTwo_Committed = 5; + */ + PhaseTwo_Committed(5), + /** + *
+   * Commit logic is failed but retryable.
+   * 
+ * + * PhaseTwo_CommitFailed_Retryable = 6; + */ + PhaseTwo_CommitFailed_Retryable(6), + /** + *
+   * Commit logic is failed and NOT retryable.
+   * 
+ * + * PhaseTwo_CommitFailed_Unretryable = 7; + */ + PhaseTwo_CommitFailed_Unretryable(7), + /** + *
+   * Rollback logic is successfully done at phase two.
+   * 
+ * + * PhaseTwo_Rollbacked = 8; + */ + PhaseTwo_Rollbacked(8), + /** + *
+   * Rollback logic is failed but retryable.
+   * 
+ * + * PhaseTwo_RollbackFailed_Retryable = 9; + */ + PhaseTwo_RollbackFailed_Retryable(9), + /** + *
+   * Rollback logic is failed but NOT retryable.
+   * 
+ * + * PhaseTwo_RollbackFailed_Unretryable = 10; + */ + PhaseTwo_RollbackFailed_Unretryable(10), + /** + *
+   * In the branch transaction, only purely read-only query statements were executed.
+   * 
+ * + * PhaseOne_RDONLY = 13; + */ + PhaseOne_RDONLY(13), + UNRECOGNIZED(-1), + ; + + /** + *
+   * special for Unknown
+   * 
+ * + * BUnknown = 0; + */ + public static final int BUnknown_VALUE = 0; + /** + *
+   * Registered to TC.
+   * 
+ * + * Registered = 1; + */ + public static final int Registered_VALUE = 1; + /** + *
+   * Branch logic is successfully done at phase one.
+   * 
+ * + * PhaseOne_Done = 2; + */ + public static final int PhaseOne_Done_VALUE = 2; + /** + *
+   * Branch logic is failed at phase one.
+   * 
+ * + * PhaseOne_Failed = 3; + */ + public static final int PhaseOne_Failed_VALUE = 3; + /** + *
+   * Branch logic is NOT reported for a timeout.
+   * 
+ * + * PhaseOne_Timeout = 4; + */ + public static final int PhaseOne_Timeout_VALUE = 4; + /** + *
+   * Commit logic is successfully done at phase two.
+   * 
+ * + * PhaseTwo_Committed = 5; + */ + public static final int PhaseTwo_Committed_VALUE = 5; + /** + *
+   * Commit logic is failed but retryable.
+   * 
+ * + * PhaseTwo_CommitFailed_Retryable = 6; + */ + public static final int PhaseTwo_CommitFailed_Retryable_VALUE = 6; + /** + *
+   * Commit logic is failed and NOT retryable.
+   * 
+ * + * PhaseTwo_CommitFailed_Unretryable = 7; + */ + public static final int PhaseTwo_CommitFailed_Unretryable_VALUE = 7; + /** + *
+   * Rollback logic is successfully done at phase two.
+   * 
+ * + * PhaseTwo_Rollbacked = 8; + */ + public static final int PhaseTwo_Rollbacked_VALUE = 8; + /** + *
+   * Rollback logic is failed but retryable.
+   * 
+ * + * PhaseTwo_RollbackFailed_Retryable = 9; + */ + public static final int PhaseTwo_RollbackFailed_Retryable_VALUE = 9; + /** + *
+   * Rollback logic is failed but NOT retryable.
+   * 
+ * + * PhaseTwo_RollbackFailed_Unretryable = 10; + */ + public static final int PhaseTwo_RollbackFailed_Unretryable_VALUE = 10; + /** + *
+   * In the branch transaction, only purely read-only query statements were executed.
+   * 
+ * + * PhaseOne_RDONLY = 13; + */ + public static final int PhaseOne_RDONLY_VALUE = 13; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static BranchStatusProto valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BranchStatusProto forNumber(int value) { + switch (value) { + case 0: return BUnknown; + case 1: return Registered; + case 2: return PhaseOne_Done; + case 3: return PhaseOne_Failed; + case 4: return PhaseOne_Timeout; + case 5: return PhaseTwo_Committed; + case 6: return PhaseTwo_CommitFailed_Retryable; + case 7: return PhaseTwo_CommitFailed_Unretryable; + case 8: return PhaseTwo_Rollbacked; + case 9: return PhaseTwo_RollbackFailed_Retryable; + case 10: return PhaseTwo_RollbackFailed_Unretryable; + case 13: return PhaseOne_RDONLY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BranchStatusProto> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BranchStatusProto findValueByNumber(int number) { + return BranchStatusProto.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return BranchStatus.getDescriptor().getEnumTypes().get(0); + } + + private static final BranchStatusProto[] VALUES = values(); + + public static BranchStatusProto valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BranchStatusProto(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.BranchStatusProto) +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchType.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchType.java new file mode 100644 index 00000000000..eabd7a0ecce --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchType.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchType.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class BranchType { + private BranchType() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\020branchType.proto\022\"org.apache.seata.pro" + + "tocol.protobuf*,\n\017BranchTypeProto\022\006\n\002AT\020" + + "\000\022\007\n\003TCC\020\001\022\010\n\004SAGA\020\002BC\n3org.apache.seata" + + ".core.serializer.protobuf.generatedB\nBra" + + "nchTypeP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchTypeProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchTypeProto.java new file mode 100644 index 00000000000..4e99c226109 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchTypeProto.java @@ -0,0 +1,126 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: branchType.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf enum {@code org.apache.seata.protocol.protobuf.BranchTypeProto} + */ +public enum BranchTypeProto + implements com.google.protobuf.ProtocolMessageEnum { + /** + * AT = 0; + */ + AT(0), + /** + * TCC = 1; + */ + TCC(1), + /** + * SAGA = 2; + */ + SAGA(2), + UNRECOGNIZED(-1), + ; + + /** + * AT = 0; + */ + public static final int AT_VALUE = 0; + /** + * TCC = 1; + */ + public static final int TCC_VALUE = 1; + /** + * SAGA = 2; + */ + public static final int SAGA_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static BranchTypeProto valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BranchTypeProto forNumber(int value) { + switch (value) { + case 0: return AT; + case 1: return TCC; + case 2: return SAGA; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BranchTypeProto> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BranchTypeProto findValueByNumber(int number) { + return BranchTypeProto.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return BranchType.getDescriptor().getEnumTypes().get(0); + } + + private static final BranchTypeProto[] VALUES = values(); + + public static BranchTypeProto valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BranchTypeProto(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.BranchTypeProto) +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequest.java new file mode 100644 index 00000000000..50d7bb2a8ef --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequest.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalBeginRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalBeginRequest { + private GlobalBeginRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\030globalBeginRequest.proto\022\"org.apache.s" + + "eata.protocol.protobuf\032 abstractTransact" + + "ionRequest.proto\"\254\001\n\027GlobalBeginRequestP" + + "roto\022g\n\032abstractTransactionRequest\030\001 \001(\013" + + "2C.org.apache.seata.protocol.protobuf.Ab" + + "stractTransactionRequestProto\022\017\n\007timeout" + + "\030\002 \001(\005\022\027\n\017transactionName\030\003 \001(\tBK\n3org.a" + + "pache.seata.core.serializer.protobuf.gen" + + "eratedB\022GlobalBeginRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor, + new String[] { "AbstractTransactionRequest", "Timeout", "TransactionName", }); + AbstractTransactionRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProto.java new file mode 100644 index 00000000000..6b2b7eb012c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProto.java @@ -0,0 +1,811 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalBeginRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalBeginRequestProto} + */ +public final class GlobalBeginRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) + GlobalBeginRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalBeginRequestProto.newBuilder() to construct. + private GlobalBeginRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalBeginRequestProto() { + transactionName_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalBeginRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalBeginRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionRequestProto.Builder subBuilder = null; + if (abstractTransactionRequest_ != null) { + subBuilder = abstractTransactionRequest_.toBuilder(); + } + abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionRequest_); + abstractTransactionRequest_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + timeout_ = input.readInt32(); + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + transactionName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalBeginRequestProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; + private AbstractTransactionRequestProto abstractTransactionRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + @Override + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + @Override + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + @Override + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + return getAbstractTransactionRequest(); + } + + public static final int TIMEOUT_FIELD_NUMBER = 2; + private int timeout_; + /** + * int32 timeout = 2; + * @return The timeout. + */ + @Override + public int getTimeout() { + return timeout_; + } + + public static final int TRANSACTIONNAME_FIELD_NUMBER = 3; + private volatile Object transactionName_; + /** + * string transactionName = 3; + * @return The transactionName. + */ + @Override + public String getTransactionName() { + Object ref = transactionName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + transactionName_ = s; + return s; + } + } + /** + * string transactionName = 3; + * @return The bytes for transactionName. + */ + @Override + public com.google.protobuf.ByteString + getTransactionNameBytes() { + Object ref = transactionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + transactionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionRequest_ != null) { + output.writeMessage(1, getAbstractTransactionRequest()); + } + if (timeout_ != 0) { + output.writeInt32(2, timeout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, transactionName_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionRequest()); + } + if (timeout_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, timeout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, transactionName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalBeginRequestProto)) { + return super.equals(obj); + } + GlobalBeginRequestProto other = (GlobalBeginRequestProto) obj; + + if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; + if (hasAbstractTransactionRequest()) { + if (!getAbstractTransactionRequest() + .equals(other.getAbstractTransactionRequest())) return false; + } + if (getTimeout() + != other.getTimeout()) return false; + if (!getTransactionName() + .equals(other.getTransactionName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionRequest()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); + } + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout(); + hash = (37 * hash) + TRANSACTIONNAME_FIELD_NUMBER; + hash = (53 * hash) + getTransactionName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalBeginRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalBeginRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalBeginRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalBeginRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalBeginRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalBeginRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalBeginRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalBeginRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalBeginRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalBeginRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalBeginRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalBeginRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalBeginRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalBeginRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) + GlobalBeginRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalBeginRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalBeginRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + timeout_ = 0; + + transactionName_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; + } + + @Override + public GlobalBeginRequestProto getDefaultInstanceForType() { + return GlobalBeginRequestProto.getDefaultInstance(); + } + + @Override + public GlobalBeginRequestProto build() { + GlobalBeginRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalBeginRequestProto buildPartial() { + GlobalBeginRequestProto result = new GlobalBeginRequestProto(this); + if (abstractTransactionRequestBuilder_ == null) { + result.abstractTransactionRequest_ = abstractTransactionRequest_; + } else { + result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); + } + result.timeout_ = timeout_; + result.transactionName_ = transactionName_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalBeginRequestProto) { + return mergeFrom((GlobalBeginRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalBeginRequestProto other) { + if (other == GlobalBeginRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionRequest()) { + mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); + } + if (other.getTimeout() != 0) { + setTimeout(other.getTimeout()); + } + if (!other.getTransactionName().isEmpty()) { + transactionName_ = other.transactionName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalBeginRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalBeginRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionRequestProto abstractTransactionRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } else { + return abstractTransactionRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionRequest_ = value; + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest( + AbstractTransactionRequestProto.Builder builderForValue) { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (abstractTransactionRequest_ != null) { + abstractTransactionRequest_ = + AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionRequest_ = value; + } + onChanged(); + } else { + abstractTransactionRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder clearAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + onChanged(); + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { + + onChanged(); + return getAbstractTransactionRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + if (abstractTransactionRequestBuilder_ != null) { + return abstractTransactionRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionRequest_ == null ? + AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> + getAbstractTransactionRequestFieldBuilder() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( + getAbstractTransactionRequest(), + getParentForChildren(), + isClean()); + abstractTransactionRequest_ = null; + } + return abstractTransactionRequestBuilder_; + } + + private int timeout_ ; + /** + * int32 timeout = 2; + * @return The timeout. + */ + @Override + public int getTimeout() { + return timeout_; + } + /** + * int32 timeout = 2; + * @param value The timeout to set. + * @return This builder for chaining. + */ + public Builder setTimeout(int value) { + + timeout_ = value; + onChanged(); + return this; + } + /** + * int32 timeout = 2; + * @return This builder for chaining. + */ + public Builder clearTimeout() { + + timeout_ = 0; + onChanged(); + return this; + } + + private Object transactionName_ = ""; + /** + * string transactionName = 3; + * @return The transactionName. + */ + public String getTransactionName() { + Object ref = transactionName_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + transactionName_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string transactionName = 3; + * @return The bytes for transactionName. + */ + public com.google.protobuf.ByteString + getTransactionNameBytes() { + Object ref = transactionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + transactionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string transactionName = 3; + * @param value The transactionName to set. + * @return This builder for chaining. + */ + public Builder setTransactionName( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + transactionName_ = value; + onChanged(); + return this; + } + /** + * string transactionName = 3; + * @return This builder for chaining. + */ + public Builder clearTransactionName() { + + transactionName_ = getDefaultInstance().getTransactionName(); + onChanged(); + return this; + } + /** + * string transactionName = 3; + * @param value The bytes for transactionName to set. + * @return This builder for chaining. + */ + public Builder setTransactionNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + transactionName_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) + private static final GlobalBeginRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalBeginRequestProto(); + } + + public static GlobalBeginRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalBeginRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalBeginRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalBeginRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java new file mode 100644 index 00000000000..9240645ddaf --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java @@ -0,0 +1,42 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalBeginRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalBeginRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + boolean hasAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + AbstractTransactionRequestProto getAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); + + /** + * int32 timeout = 2; + * @return The timeout. + */ + int getTimeout(); + + /** + * string transactionName = 3; + * @return The transactionName. + */ + String getTransactionName(); + /** + * string transactionName = 3; + * @return The bytes for transactionName. + */ + com.google.protobuf.ByteString + getTransactionNameBytes(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponse.java new file mode 100644 index 00000000000..facef46920f --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponse.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalBeginResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalBeginResponse { + private GlobalBeginResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\031globalBeginResponse.proto\022\"org.apache." + + "seata.protocol.protobuf\032!abstractTransac" + + "tionResponse.proto\"\245\001\n\030GlobalBeginRespon" + + "seProto\022i\n\033abstractTransactionResponse\030\001" + + " \001(\0132D.org.apache.seata.protocol.protobu" + + "f.AbstractTransactionResponseProto\022\013\n\003xi" + + "d\030\002 \001(\t\022\021\n\textraData\030\003 \001(\tBL\n3org.apache" + + ".seata.core.serializer.protobuf.generate" + + "dB\023GlobalBeginResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor, + new String[] { "AbstractTransactionResponse", "Xid", "ExtraData", }); + AbstractTransactionResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProto.java new file mode 100644 index 00000000000..2b137c596e2 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProto.java @@ -0,0 +1,885 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalBeginResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalBeginResponseProto} + */ +public final class GlobalBeginResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) + GlobalBeginResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalBeginResponseProto.newBuilder() to construct. + private GlobalBeginResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalBeginResponseProto() { + xid_ = ""; + extraData_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalBeginResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalBeginResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionResponseProto.Builder subBuilder = null; + if (abstractTransactionResponse_ != null) { + subBuilder = abstractTransactionResponse_.toBuilder(); + } + abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionResponse_); + abstractTransactionResponse_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + xid_ = s; + break; + } + case 26: { + String s = input.readStringRequireUtf8(); + + extraData_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalBeginResponseProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; + private AbstractTransactionResponseProto abstractTransactionResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + @Override + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + @Override + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + @Override + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + return getAbstractTransactionResponse(); + } + + public static final int XID_FIELD_NUMBER = 2; + private volatile Object xid_; + /** + * string xid = 2; + * @return The xid. + */ + @Override + public String getXid() { + Object ref = xid_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + @Override + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTRADATA_FIELD_NUMBER = 3; + private volatile Object extraData_; + /** + * string extraData = 3; + * @return The extraData. + */ + @Override + public String getExtraData() { + Object ref = extraData_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + extraData_ = s; + return s; + } + } + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + @Override + public com.google.protobuf.ByteString + getExtraDataBytes() { + Object ref = extraData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + extraData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionResponse_ != null) { + output.writeMessage(1, getAbstractTransactionResponse()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionResponse()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extraData_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalBeginResponseProto)) { + return super.equals(obj); + } + GlobalBeginResponseProto other = (GlobalBeginResponseProto) obj; + + if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; + if (hasAbstractTransactionResponse()) { + if (!getAbstractTransactionResponse() + .equals(other.getAbstractTransactionResponse())) return false; + } + if (!getXid() + .equals(other.getXid())) return false; + if (!getExtraData() + .equals(other.getExtraData())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionResponse()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); + } + hash = (37 * hash) + XID_FIELD_NUMBER; + hash = (53 * hash) + getXid().hashCode(); + hash = (37 * hash) + EXTRADATA_FIELD_NUMBER; + hash = (53 * hash) + getExtraData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalBeginResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalBeginResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalBeginResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalBeginResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalBeginResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalBeginResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalBeginResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalBeginResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalBeginResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalBeginResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalBeginResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalBeginResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalBeginResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalBeginResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) + GlobalBeginResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalBeginResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalBeginResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + xid_ = ""; + + extraData_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; + } + + @Override + public GlobalBeginResponseProto getDefaultInstanceForType() { + return GlobalBeginResponseProto.getDefaultInstance(); + } + + @Override + public GlobalBeginResponseProto build() { + GlobalBeginResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalBeginResponseProto buildPartial() { + GlobalBeginResponseProto result = new GlobalBeginResponseProto(this); + if (abstractTransactionResponseBuilder_ == null) { + result.abstractTransactionResponse_ = abstractTransactionResponse_; + } else { + result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); + } + result.xid_ = xid_; + result.extraData_ = extraData_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalBeginResponseProto) { + return mergeFrom((GlobalBeginResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalBeginResponseProto other) { + if (other == GlobalBeginResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionResponse()) { + mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); + } + if (!other.getXid().isEmpty()) { + xid_ = other.xid_; + onChanged(); + } + if (!other.getExtraData().isEmpty()) { + extraData_ = other.extraData_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalBeginResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalBeginResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionResponseProto abstractTransactionResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } else { + return abstractTransactionResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionResponse_ = value; + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse( + AbstractTransactionResponseProto.Builder builderForValue) { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (abstractTransactionResponse_ != null) { + abstractTransactionResponse_ = + AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionResponse_ = value; + } + onChanged(); + } else { + abstractTransactionResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder clearAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + onChanged(); + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { + + onChanged(); + return getAbstractTransactionResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + if (abstractTransactionResponseBuilder_ != null) { + return abstractTransactionResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionResponse_ == null ? + AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> + getAbstractTransactionResponseFieldBuilder() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( + getAbstractTransactionResponse(), + getParentForChildren(), + isClean()); + abstractTransactionResponse_ = null; + } + return abstractTransactionResponseBuilder_; + } + + private Object xid_ = ""; + /** + * string xid = 2; + * @return The xid. + */ + public String getXid() { + Object ref = xid_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + xid_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string xid = 2; + * @return The bytes for xid. + */ + public com.google.protobuf.ByteString + getXidBytes() { + Object ref = xid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + xid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string xid = 2; + * @param value The xid to set. + * @return This builder for chaining. + */ + public Builder setXid( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + xid_ = value; + onChanged(); + return this; + } + /** + * string xid = 2; + * @return This builder for chaining. + */ + public Builder clearXid() { + + xid_ = getDefaultInstance().getXid(); + onChanged(); + return this; + } + /** + * string xid = 2; + * @param value The bytes for xid to set. + * @return This builder for chaining. + */ + public Builder setXidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + xid_ = value; + onChanged(); + return this; + } + + private Object extraData_ = ""; + /** + * string extraData = 3; + * @return The extraData. + */ + public String getExtraData() { + Object ref = extraData_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + extraData_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + public com.google.protobuf.ByteString + getExtraDataBytes() { + Object ref = extraData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + extraData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string extraData = 3; + * @param value The extraData to set. + * @return This builder for chaining. + */ + public Builder setExtraData( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + extraData_ = value; + onChanged(); + return this; + } + /** + * string extraData = 3; + * @return This builder for chaining. + */ + public Builder clearExtraData() { + + extraData_ = getDefaultInstance().getExtraData(); + onChanged(); + return this; + } + /** + * string extraData = 3; + * @param value The bytes for extraData to set. + * @return This builder for chaining. + */ + public Builder setExtraDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + extraData_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) + private static final GlobalBeginResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalBeginResponseProto(); + } + + public static GlobalBeginResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalBeginResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalBeginResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalBeginResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java new file mode 100644 index 00000000000..74521b4b36d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalBeginResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalBeginResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + boolean hasAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + AbstractTransactionResponseProto getAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); + + /** + * string xid = 2; + * @return The xid. + */ + String getXid(); + /** + * string xid = 2; + * @return The bytes for xid. + */ + com.google.protobuf.ByteString + getXidBytes(); + + /** + * string extraData = 3; + * @return The extraData. + */ + String getExtraData(); + /** + * string extraData = 3; + * @return The bytes for extraData. + */ + com.google.protobuf.ByteString + getExtraDataBytes(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequest.java new file mode 100644 index 00000000000..c8612cc26b8 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequest.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalCommitRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalCommitRequest { + private GlobalCommitRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\031globalCommitRequest.proto\022\"org.apache." + + "seata.protocol.protobuf\032\036abstractGlobalE" + + "ndRequest.proto\"\177\n\030GlobalCommitRequestPr" + + "oto\022c\n\030abstractGlobalEndRequest\030\001 \001(\0132A." + + "org.apache.seata.protocol.protobuf.Abstr" + + "actGlobalEndRequestProtoBL\n3org.apache.s" + + "eata.core.serializer.protobuf.generatedB" + + "\023GlobalCommitRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractGlobalEndRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor, + new String[] { "AbstractGlobalEndRequest", }); + AbstractGlobalEndRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProto.java new file mode 100644 index 00000000000..846212cb936 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalCommitRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalCommitRequestProto} + */ +public final class GlobalCommitRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) + GlobalCommitRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalCommitRequestProto.newBuilder() to construct. + private GlobalCommitRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalCommitRequestProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalCommitRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalCommitRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractGlobalEndRequestProto.Builder subBuilder = null; + if (abstractGlobalEndRequest_ != null) { + subBuilder = abstractGlobalEndRequest_.toBuilder(); + } + abstractGlobalEndRequest_ = input.readMessage(AbstractGlobalEndRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractGlobalEndRequest_); + abstractGlobalEndRequest_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalCommitRequestProto.class, Builder.class); + } + + public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; + private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + @Override + public boolean hasAbstractGlobalEndRequest() { + return abstractGlobalEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + @Override + public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { + return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + @Override + public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { + return getAbstractGlobalEndRequest(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractGlobalEndRequest_ != null) { + output.writeMessage(1, getAbstractGlobalEndRequest()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractGlobalEndRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractGlobalEndRequest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalCommitRequestProto)) { + return super.equals(obj); + } + GlobalCommitRequestProto other = (GlobalCommitRequestProto) obj; + + if (hasAbstractGlobalEndRequest() != other.hasAbstractGlobalEndRequest()) return false; + if (hasAbstractGlobalEndRequest()) { + if (!getAbstractGlobalEndRequest() + .equals(other.getAbstractGlobalEndRequest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractGlobalEndRequest()) { + hash = (37 * hash) + ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractGlobalEndRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalCommitRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalCommitRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalCommitRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalCommitRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalCommitRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalCommitRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalCommitRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalCommitRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalCommitRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalCommitRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalCommitRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalCommitRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalCommitRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalCommitRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) + GlobalCommitRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalCommitRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalCommitRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = null; + } else { + abstractGlobalEndRequest_ = null; + abstractGlobalEndRequestBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; + } + + @Override + public GlobalCommitRequestProto getDefaultInstanceForType() { + return GlobalCommitRequestProto.getDefaultInstance(); + } + + @Override + public GlobalCommitRequestProto build() { + GlobalCommitRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalCommitRequestProto buildPartial() { + GlobalCommitRequestProto result = new GlobalCommitRequestProto(this); + if (abstractGlobalEndRequestBuilder_ == null) { + result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; + } else { + result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalCommitRequestProto) { + return mergeFrom((GlobalCommitRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalCommitRequestProto other) { + if (other == GlobalCommitRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractGlobalEndRequest()) { + mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalCommitRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalCommitRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + public boolean hasAbstractGlobalEndRequest() { + return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { + if (abstractGlobalEndRequestBuilder_ == null) { + return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } else { + return abstractGlobalEndRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder setAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { + if (abstractGlobalEndRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractGlobalEndRequest_ = value; + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder setAbstractGlobalEndRequest( + AbstractGlobalEndRequestProto.Builder builderForValue) { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder mergeAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { + if (abstractGlobalEndRequestBuilder_ == null) { + if (abstractGlobalEndRequest_ != null) { + abstractGlobalEndRequest_ = + AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); + } else { + abstractGlobalEndRequest_ = value; + } + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder clearAbstractGlobalEndRequest() { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = null; + onChanged(); + } else { + abstractGlobalEndRequest_ = null; + abstractGlobalEndRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { + + onChanged(); + return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { + if (abstractGlobalEndRequestBuilder_ != null) { + return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractGlobalEndRequest_ == null ? + AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> + getAbstractGlobalEndRequestFieldBuilder() { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder>( + getAbstractGlobalEndRequest(), + getParentForChildren(), + isClean()); + abstractGlobalEndRequest_ = null; + } + return abstractGlobalEndRequestBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) + private static final GlobalCommitRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalCommitRequestProto(); + } + + public static GlobalCommitRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalCommitRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalCommitRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalCommitRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java new file mode 100644 index 00000000000..b3ab81a7d75 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalCommitRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalCommitRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + boolean hasAbstractGlobalEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponse.java new file mode 100644 index 00000000000..74d4c1afcc5 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponse.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalCommitResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalCommitResponse { + private GlobalCommitResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\032globalCommitResponse.proto\022\"org.apache" + + ".seata.protocol.protobuf\032\037abstractGlobal" + + "EndResponse.proto\"\202\001\n\031GlobalCommitRespon" + + "seProto\022e\n\031abstractGlobalEndResponse\030\001 \001" + + "(\0132B.org.apache.seata.protocol.protobuf." + + "AbstractGlobalEndResponseProtoBM\n3org.ap" + + "ache.seata.core.serializer.protobuf.gene" + + "ratedB\024GlobalCommitResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractGlobalEndResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor, + new String[] { "AbstractGlobalEndResponse", }); + AbstractGlobalEndResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProto.java new file mode 100644 index 00000000000..f587555dfac --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalCommitResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalCommitResponseProto} + */ +public final class GlobalCommitResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) + GlobalCommitResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalCommitResponseProto.newBuilder() to construct. + private GlobalCommitResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalCommitResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalCommitResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalCommitResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractGlobalEndResponseProto.Builder subBuilder = null; + if (abstractGlobalEndResponse_ != null) { + subBuilder = abstractGlobalEndResponse_.toBuilder(); + } + abstractGlobalEndResponse_ = input.readMessage(AbstractGlobalEndResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractGlobalEndResponse_); + abstractGlobalEndResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalCommitResponseProto.class, Builder.class); + } + + public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; + private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + @Override + public boolean hasAbstractGlobalEndResponse() { + return abstractGlobalEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + @Override + public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { + return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + @Override + public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { + return getAbstractGlobalEndResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractGlobalEndResponse_ != null) { + output.writeMessage(1, getAbstractGlobalEndResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractGlobalEndResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractGlobalEndResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalCommitResponseProto)) { + return super.equals(obj); + } + GlobalCommitResponseProto other = (GlobalCommitResponseProto) obj; + + if (hasAbstractGlobalEndResponse() != other.hasAbstractGlobalEndResponse()) return false; + if (hasAbstractGlobalEndResponse()) { + if (!getAbstractGlobalEndResponse() + .equals(other.getAbstractGlobalEndResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractGlobalEndResponse()) { + hash = (37 * hash) + ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractGlobalEndResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalCommitResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalCommitResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalCommitResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalCommitResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalCommitResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalCommitResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalCommitResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalCommitResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalCommitResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalCommitResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalCommitResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalCommitResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalCommitResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalCommitResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) + GlobalCommitResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalCommitResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalCommitResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = null; + } else { + abstractGlobalEndResponse_ = null; + abstractGlobalEndResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; + } + + @Override + public GlobalCommitResponseProto getDefaultInstanceForType() { + return GlobalCommitResponseProto.getDefaultInstance(); + } + + @Override + public GlobalCommitResponseProto build() { + GlobalCommitResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalCommitResponseProto buildPartial() { + GlobalCommitResponseProto result = new GlobalCommitResponseProto(this); + if (abstractGlobalEndResponseBuilder_ == null) { + result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; + } else { + result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalCommitResponseProto) { + return mergeFrom((GlobalCommitResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalCommitResponseProto other) { + if (other == GlobalCommitResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractGlobalEndResponse()) { + mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalCommitResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalCommitResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + public boolean hasAbstractGlobalEndResponse() { + return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { + if (abstractGlobalEndResponseBuilder_ == null) { + return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } else { + return abstractGlobalEndResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder setAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { + if (abstractGlobalEndResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractGlobalEndResponse_ = value; + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder setAbstractGlobalEndResponse( + AbstractGlobalEndResponseProto.Builder builderForValue) { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder mergeAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { + if (abstractGlobalEndResponseBuilder_ == null) { + if (abstractGlobalEndResponse_ != null) { + abstractGlobalEndResponse_ = + AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); + } else { + abstractGlobalEndResponse_ = value; + } + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder clearAbstractGlobalEndResponse() { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = null; + onChanged(); + } else { + abstractGlobalEndResponse_ = null; + abstractGlobalEndResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { + + onChanged(); + return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { + if (abstractGlobalEndResponseBuilder_ != null) { + return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractGlobalEndResponse_ == null ? + AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> + getAbstractGlobalEndResponseFieldBuilder() { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder>( + getAbstractGlobalEndResponse(), + getParentForChildren(), + isClean()); + abstractGlobalEndResponse_ = null; + } + return abstractGlobalEndResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) + private static final GlobalCommitResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalCommitResponseProto(); + } + + public static GlobalCommitResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalCommitResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalCommitResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalCommitResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java new file mode 100644 index 00000000000..218846d7657 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalCommitResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalCommitResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + boolean hasAbstractGlobalEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequest.java new file mode 100644 index 00000000000..ff72cd8429c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequest.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalLockQueryRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalLockQueryRequest { + private GlobalLockQueryRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\034globalLockQueryRequest.proto\022\"org.apac" + + "he.seata.protocol.protobuf\032\033branchRegist" + + "erRequest.proto\"|\n\033GlobalLockQueryReques" + + "tProto\022]\n\025branchRegisterRequest\030\001 \001(\0132>." + + "org.apache.seata.protocol.protobuf.Branc" + + "hRegisterRequestProtoBO\n3org.apache.seat" + + "a.core.serializer.protobuf.generatedB\026Gl" + + "obalLockQueryRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + BranchRegisterRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor, + new String[] { "BranchRegisterRequest", }); + BranchRegisterRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProto.java new file mode 100644 index 00000000000..9469dfd18ce --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalLockQueryRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto} + */ +public final class GlobalLockQueryRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) + GlobalLockQueryRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalLockQueryRequestProto.newBuilder() to construct. + private GlobalLockQueryRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalLockQueryRequestProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalLockQueryRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalLockQueryRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + BranchRegisterRequestProto.Builder subBuilder = null; + if (branchRegisterRequest_ != null) { + subBuilder = branchRegisterRequest_.toBuilder(); + } + branchRegisterRequest_ = input.readMessage(BranchRegisterRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(branchRegisterRequest_); + branchRegisterRequest_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalLockQueryRequestProto.class, Builder.class); + } + + public static final int BRANCHREGISTERREQUEST_FIELD_NUMBER = 1; + private BranchRegisterRequestProto branchRegisterRequest_; + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + * @return Whether the branchRegisterRequest field is set. + */ + @Override + public boolean hasBranchRegisterRequest() { + return branchRegisterRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + * @return The branchRegisterRequest. + */ + @Override + public BranchRegisterRequestProto getBranchRegisterRequest() { + return branchRegisterRequest_ == null ? BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + @Override + public BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder() { + return getBranchRegisterRequest(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (branchRegisterRequest_ != null) { + output.writeMessage(1, getBranchRegisterRequest()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (branchRegisterRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBranchRegisterRequest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalLockQueryRequestProto)) { + return super.equals(obj); + } + GlobalLockQueryRequestProto other = (GlobalLockQueryRequestProto) obj; + + if (hasBranchRegisterRequest() != other.hasBranchRegisterRequest()) return false; + if (hasBranchRegisterRequest()) { + if (!getBranchRegisterRequest() + .equals(other.getBranchRegisterRequest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBranchRegisterRequest()) { + hash = (37 * hash) + BRANCHREGISTERREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getBranchRegisterRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalLockQueryRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalLockQueryRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalLockQueryRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalLockQueryRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalLockQueryRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalLockQueryRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalLockQueryRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalLockQueryRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalLockQueryRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalLockQueryRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalLockQueryRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalLockQueryRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalLockQueryRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) + GlobalLockQueryRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalLockQueryRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (branchRegisterRequestBuilder_ == null) { + branchRegisterRequest_ = null; + } else { + branchRegisterRequest_ = null; + branchRegisterRequestBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; + } + + @Override + public GlobalLockQueryRequestProto getDefaultInstanceForType() { + return GlobalLockQueryRequestProto.getDefaultInstance(); + } + + @Override + public GlobalLockQueryRequestProto build() { + GlobalLockQueryRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalLockQueryRequestProto buildPartial() { + GlobalLockQueryRequestProto result = new GlobalLockQueryRequestProto(this); + if (branchRegisterRequestBuilder_ == null) { + result.branchRegisterRequest_ = branchRegisterRequest_; + } else { + result.branchRegisterRequest_ = branchRegisterRequestBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalLockQueryRequestProto) { + return mergeFrom((GlobalLockQueryRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalLockQueryRequestProto other) { + if (other == GlobalLockQueryRequestProto.getDefaultInstance()) return this; + if (other.hasBranchRegisterRequest()) { + mergeBranchRegisterRequest(other.getBranchRegisterRequest()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalLockQueryRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalLockQueryRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private BranchRegisterRequestProto branchRegisterRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + BranchRegisterRequestProto, BranchRegisterRequestProto.Builder, BranchRegisterRequestProtoOrBuilder> branchRegisterRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + * @return Whether the branchRegisterRequest field is set. + */ + public boolean hasBranchRegisterRequest() { + return branchRegisterRequestBuilder_ != null || branchRegisterRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + * @return The branchRegisterRequest. + */ + public BranchRegisterRequestProto getBranchRegisterRequest() { + if (branchRegisterRequestBuilder_ == null) { + return branchRegisterRequest_ == null ? BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; + } else { + return branchRegisterRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + public Builder setBranchRegisterRequest(BranchRegisterRequestProto value) { + if (branchRegisterRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + branchRegisterRequest_ = value; + onChanged(); + } else { + branchRegisterRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + public Builder setBranchRegisterRequest( + BranchRegisterRequestProto.Builder builderForValue) { + if (branchRegisterRequestBuilder_ == null) { + branchRegisterRequest_ = builderForValue.build(); + onChanged(); + } else { + branchRegisterRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + public Builder mergeBranchRegisterRequest(BranchRegisterRequestProto value) { + if (branchRegisterRequestBuilder_ == null) { + if (branchRegisterRequest_ != null) { + branchRegisterRequest_ = + BranchRegisterRequestProto.newBuilder(branchRegisterRequest_).mergeFrom(value).buildPartial(); + } else { + branchRegisterRequest_ = value; + } + onChanged(); + } else { + branchRegisterRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + public Builder clearBranchRegisterRequest() { + if (branchRegisterRequestBuilder_ == null) { + branchRegisterRequest_ = null; + onChanged(); + } else { + branchRegisterRequest_ = null; + branchRegisterRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + public BranchRegisterRequestProto.Builder getBranchRegisterRequestBuilder() { + + onChanged(); + return getBranchRegisterRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + public BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder() { + if (branchRegisterRequestBuilder_ != null) { + return branchRegisterRequestBuilder_.getMessageOrBuilder(); + } else { + return branchRegisterRequest_ == null ? + BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + BranchRegisterRequestProto, BranchRegisterRequestProto.Builder, BranchRegisterRequestProtoOrBuilder> + getBranchRegisterRequestFieldBuilder() { + if (branchRegisterRequestBuilder_ == null) { + branchRegisterRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + BranchRegisterRequestProto, BranchRegisterRequestProto.Builder, BranchRegisterRequestProtoOrBuilder>( + getBranchRegisterRequest(), + getParentForChildren(), + isClean()); + branchRegisterRequest_ = null; + } + return branchRegisterRequestBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) + private static final GlobalLockQueryRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalLockQueryRequestProto(); + } + + public static GlobalLockQueryRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalLockQueryRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalLockQueryRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalLockQueryRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java new file mode 100644 index 00000000000..1a87b840ee6 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalLockQueryRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalLockQueryRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + * @return Whether the branchRegisterRequest field is set. + */ + boolean hasBranchRegisterRequest(); + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + * @return The branchRegisterRequest. + */ + BranchRegisterRequestProto getBranchRegisterRequest(); + /** + * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; + */ + BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponse.java new file mode 100644 index 00000000000..9b185dec692 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponse.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalLockQueryResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalLockQueryResponse { + private GlobalLockQueryResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\035globalLockQueryResponse.proto\022\"org.apa" + + "che.seata.protocol.protobuf\032!abstractTra" + + "nsactionResponse.proto\"\233\001\n\034GlobalLockQue" + + "ryResponseProto\022i\n\033abstractTransactionRe" + + "sponse\030\001 \001(\0132D.org.apache.seata.protocol" + + ".protobuf.AbstractTransactionResponsePro" + + "to\022\020\n\010lockable\030\002 \001(\010BP\n3org.apache.seata" + + ".core.serializer.protobuf.generatedB\027Glo" + + "balLockQueryResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor, + new String[] { "AbstractTransactionResponse", "Lockable", }); + AbstractTransactionResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProto.java new file mode 100644 index 00000000000..2b75a78fc78 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProto.java @@ -0,0 +1,674 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalLockQueryResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto} + */ +public final class GlobalLockQueryResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) + GlobalLockQueryResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalLockQueryResponseProto.newBuilder() to construct. + private GlobalLockQueryResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalLockQueryResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalLockQueryResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalLockQueryResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionResponseProto.Builder subBuilder = null; + if (abstractTransactionResponse_ != null) { + subBuilder = abstractTransactionResponse_.toBuilder(); + } + abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionResponse_); + abstractTransactionResponse_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + lockable_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalLockQueryResponseProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; + private AbstractTransactionResponseProto abstractTransactionResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + @Override + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + @Override + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + @Override + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + return getAbstractTransactionResponse(); + } + + public static final int LOCKABLE_FIELD_NUMBER = 2; + private boolean lockable_; + /** + * bool lockable = 2; + * @return The lockable. + */ + @Override + public boolean getLockable() { + return lockable_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionResponse_ != null) { + output.writeMessage(1, getAbstractTransactionResponse()); + } + if (lockable_ != false) { + output.writeBool(2, lockable_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionResponse()); + } + if (lockable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, lockable_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalLockQueryResponseProto)) { + return super.equals(obj); + } + GlobalLockQueryResponseProto other = (GlobalLockQueryResponseProto) obj; + + if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; + if (hasAbstractTransactionResponse()) { + if (!getAbstractTransactionResponse() + .equals(other.getAbstractTransactionResponse())) return false; + } + if (getLockable() + != other.getLockable()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionResponse()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); + } + hash = (37 * hash) + LOCKABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getLockable()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalLockQueryResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalLockQueryResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalLockQueryResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalLockQueryResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalLockQueryResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalLockQueryResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalLockQueryResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalLockQueryResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalLockQueryResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalLockQueryResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalLockQueryResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalLockQueryResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalLockQueryResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) + GlobalLockQueryResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalLockQueryResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + lockable_ = false; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; + } + + @Override + public GlobalLockQueryResponseProto getDefaultInstanceForType() { + return GlobalLockQueryResponseProto.getDefaultInstance(); + } + + @Override + public GlobalLockQueryResponseProto build() { + GlobalLockQueryResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalLockQueryResponseProto buildPartial() { + GlobalLockQueryResponseProto result = new GlobalLockQueryResponseProto(this); + if (abstractTransactionResponseBuilder_ == null) { + result.abstractTransactionResponse_ = abstractTransactionResponse_; + } else { + result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); + } + result.lockable_ = lockable_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalLockQueryResponseProto) { + return mergeFrom((GlobalLockQueryResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalLockQueryResponseProto other) { + if (other == GlobalLockQueryResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionResponse()) { + mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); + } + if (other.getLockable() != false) { + setLockable(other.getLockable()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalLockQueryResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalLockQueryResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionResponseProto abstractTransactionResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + public boolean hasAbstractTransactionResponse() { + return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + public AbstractTransactionResponseProto getAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } else { + return abstractTransactionResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionResponse_ = value; + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder setAbstractTransactionResponse( + AbstractTransactionResponseProto.Builder builderForValue) { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { + if (abstractTransactionResponseBuilder_ == null) { + if (abstractTransactionResponse_ != null) { + abstractTransactionResponse_ = + AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionResponse_ = value; + } + onChanged(); + } else { + abstractTransactionResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public Builder clearAbstractTransactionResponse() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponse_ = null; + onChanged(); + } else { + abstractTransactionResponse_ = null; + abstractTransactionResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { + + onChanged(); + return getAbstractTransactionResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { + if (abstractTransactionResponseBuilder_ != null) { + return abstractTransactionResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionResponse_ == null ? + AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> + getAbstractTransactionResponseFieldBuilder() { + if (abstractTransactionResponseBuilder_ == null) { + abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( + getAbstractTransactionResponse(), + getParentForChildren(), + isClean()); + abstractTransactionResponse_ = null; + } + return abstractTransactionResponseBuilder_; + } + + private boolean lockable_ ; + /** + * bool lockable = 2; + * @return The lockable. + */ + @Override + public boolean getLockable() { + return lockable_; + } + /** + * bool lockable = 2; + * @param value The lockable to set. + * @return This builder for chaining. + */ + public Builder setLockable(boolean value) { + + lockable_ = value; + onChanged(); + return this; + } + /** + * bool lockable = 2; + * @return This builder for chaining. + */ + public Builder clearLockable() { + + lockable_ = false; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) + private static final GlobalLockQueryResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalLockQueryResponseProto(); + } + + public static GlobalLockQueryResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalLockQueryResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalLockQueryResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalLockQueryResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java new file mode 100644 index 00000000000..4b55dc43e82 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java @@ -0,0 +1,30 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalLockQueryResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalLockQueryResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return Whether the abstractTransactionResponse field is set. + */ + boolean hasAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + * @return The abstractTransactionResponse. + */ + AbstractTransactionResponseProto getAbstractTransactionResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; + */ + AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); + + /** + * bool lockable = 2; + * @return The lockable. + */ + boolean getLockable(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequest.java new file mode 100644 index 00000000000..90f35c83822 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequest.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalReportRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalReportRequest { + private GlobalReportRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\031globalReportRequest.proto\022\"org.apache." + + "seata.protocol.protobuf\032\036abstractGlobalE" + + "ndRequest.proto\032\022globalStatus.proto\"\314\001\n\030" + + "GlobalReportRequestProto\022c\n\030abstractGlob" + + "alEndRequest\030\001 \001(\0132A.org.apache.seata.pr" + + "otocol.protobuf.AbstractGlobalEndRequest" + + "Proto\022K\n\014globalStatus\030\002 \001(\01625.org.apache" + + ".seata.protocol.protobuf.GlobalStatusPro" + + "toBL\n3org.apache.seata.core.serializer.p" + + "rotobuf.generatedB\023GlobalReportRequestP\001" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractGlobalEndRequest.getDescriptor(), + GlobalStatus.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor, + new String[] { "AbstractGlobalEndRequest", "GlobalStatus", }); + AbstractGlobalEndRequest.getDescriptor(); + GlobalStatus.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProto.java new file mode 100644 index 00000000000..526fc3d6951 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProto.java @@ -0,0 +1,705 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalReportRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalReportRequestProto} + */ +public final class GlobalReportRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) + GlobalReportRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalReportRequestProto.newBuilder() to construct. + private GlobalReportRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalReportRequestProto() { + globalStatus_ = 0; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalReportRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalReportRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractGlobalEndRequestProto.Builder subBuilder = null; + if (abstractGlobalEndRequest_ != null) { + subBuilder = abstractGlobalEndRequest_.toBuilder(); + } + abstractGlobalEndRequest_ = input.readMessage(AbstractGlobalEndRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractGlobalEndRequest_); + abstractGlobalEndRequest_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + globalStatus_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalReportRequestProto.class, Builder.class); + } + + public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; + private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + @Override + public boolean hasAbstractGlobalEndRequest() { + return abstractGlobalEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + @Override + public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { + return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + @Override + public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { + return getAbstractGlobalEndRequest(); + } + + public static final int GLOBALSTATUS_FIELD_NUMBER = 2; + private int globalStatus_; + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The enum numeric value on the wire for globalStatus. + */ + @Override public int getGlobalStatusValue() { + return globalStatus_; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The globalStatus. + */ + @Override public GlobalStatusProto getGlobalStatus() { + @SuppressWarnings("deprecation") + GlobalStatusProto result = GlobalStatusProto.valueOf(globalStatus_); + return result == null ? GlobalStatusProto.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractGlobalEndRequest_ != null) { + output.writeMessage(1, getAbstractGlobalEndRequest()); + } + if (globalStatus_ != GlobalStatusProto.UnKnown.getNumber()) { + output.writeEnum(2, globalStatus_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractGlobalEndRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractGlobalEndRequest()); + } + if (globalStatus_ != GlobalStatusProto.UnKnown.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, globalStatus_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalReportRequestProto)) { + return super.equals(obj); + } + GlobalReportRequestProto other = (GlobalReportRequestProto) obj; + + if (hasAbstractGlobalEndRequest() != other.hasAbstractGlobalEndRequest()) return false; + if (hasAbstractGlobalEndRequest()) { + if (!getAbstractGlobalEndRequest() + .equals(other.getAbstractGlobalEndRequest())) return false; + } + if (globalStatus_ != other.globalStatus_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractGlobalEndRequest()) { + hash = (37 * hash) + ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractGlobalEndRequest().hashCode(); + } + hash = (37 * hash) + GLOBALSTATUS_FIELD_NUMBER; + hash = (53 * hash) + globalStatus_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalReportRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalReportRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalReportRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalReportRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalReportRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalReportRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalReportRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalReportRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalReportRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalReportRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalReportRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalReportRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalReportRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalReportRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) + GlobalReportRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalReportRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalReportRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = null; + } else { + abstractGlobalEndRequest_ = null; + abstractGlobalEndRequestBuilder_ = null; + } + globalStatus_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor; + } + + @Override + public GlobalReportRequestProto getDefaultInstanceForType() { + return GlobalReportRequestProto.getDefaultInstance(); + } + + @Override + public GlobalReportRequestProto build() { + GlobalReportRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalReportRequestProto buildPartial() { + GlobalReportRequestProto result = new GlobalReportRequestProto(this); + if (abstractGlobalEndRequestBuilder_ == null) { + result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; + } else { + result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.build(); + } + result.globalStatus_ = globalStatus_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalReportRequestProto) { + return mergeFrom((GlobalReportRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalReportRequestProto other) { + if (other == GlobalReportRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractGlobalEndRequest()) { + mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); + } + if (other.globalStatus_ != 0) { + setGlobalStatusValue(other.getGlobalStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalReportRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalReportRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + public boolean hasAbstractGlobalEndRequest() { + return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { + if (abstractGlobalEndRequestBuilder_ == null) { + return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } else { + return abstractGlobalEndRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder setAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { + if (abstractGlobalEndRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractGlobalEndRequest_ = value; + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder setAbstractGlobalEndRequest( + AbstractGlobalEndRequestProto.Builder builderForValue) { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder mergeAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { + if (abstractGlobalEndRequestBuilder_ == null) { + if (abstractGlobalEndRequest_ != null) { + abstractGlobalEndRequest_ = + AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); + } else { + abstractGlobalEndRequest_ = value; + } + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder clearAbstractGlobalEndRequest() { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = null; + onChanged(); + } else { + abstractGlobalEndRequest_ = null; + abstractGlobalEndRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { + + onChanged(); + return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { + if (abstractGlobalEndRequestBuilder_ != null) { + return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractGlobalEndRequest_ == null ? + AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> + getAbstractGlobalEndRequestFieldBuilder() { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder>( + getAbstractGlobalEndRequest(), + getParentForChildren(), + isClean()); + abstractGlobalEndRequest_ = null; + } + return abstractGlobalEndRequestBuilder_; + } + + private int globalStatus_ = 0; + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The enum numeric value on the wire for globalStatus. + */ + @Override public int getGlobalStatusValue() { + return globalStatus_; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @param value The enum numeric value on the wire for globalStatus to set. + * @return This builder for chaining. + */ + public Builder setGlobalStatusValue(int value) { + + globalStatus_ = value; + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The globalStatus. + */ + @Override + public GlobalStatusProto getGlobalStatus() { + @SuppressWarnings("deprecation") + GlobalStatusProto result = GlobalStatusProto.valueOf(globalStatus_); + return result == null ? GlobalStatusProto.UNRECOGNIZED : result; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @param value The globalStatus to set. + * @return This builder for chaining. + */ + public Builder setGlobalStatus(GlobalStatusProto value) { + if (value == null) { + throw new NullPointerException(); + } + + globalStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return This builder for chaining. + */ + public Builder clearGlobalStatus() { + + globalStatus_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) + private static final GlobalReportRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalReportRequestProto(); + } + + public static GlobalReportRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalReportRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalReportRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalReportRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProtoOrBuilder.java new file mode 100644 index 00000000000..64777f31aea --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProtoOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalReportRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalReportRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + boolean hasAbstractGlobalEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); + + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The enum numeric value on the wire for globalStatus. + */ + int getGlobalStatusValue(); + /** + * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; + * @return The globalStatus. + */ + GlobalStatusProto getGlobalStatus(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponse.java new file mode 100644 index 00000000000..9229b777c32 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponse.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalReportResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalReportResponse { + private GlobalReportResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\032globalReportResponse.proto\022\"org.apache" + + ".seata.protocol.protobuf\032\037abstractGlobal" + + "EndResponse.proto\"\202\001\n\031GlobalReportRespon" + + "seProto\022e\n\031abstractGlobalEndResponse\030\001 \001" + + "(\0132B.org.apache.seata.protocol.protobuf." + + "AbstractGlobalEndResponseProtoBM\n3org.ap" + + "ache.seata.core.serializer.protobuf.gene" + + "ratedB\024GlobalReportResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractGlobalEndResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor, + new String[] { "AbstractGlobalEndResponse", }); + AbstractGlobalEndResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProto.java new file mode 100644 index 00000000000..e66882b6ce5 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalReportResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalReportResponseProto} + */ +public final class GlobalReportResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) + GlobalReportResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalReportResponseProto.newBuilder() to construct. + private GlobalReportResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalReportResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalReportResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalReportResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractGlobalEndResponseProto.Builder subBuilder = null; + if (abstractGlobalEndResponse_ != null) { + subBuilder = abstractGlobalEndResponse_.toBuilder(); + } + abstractGlobalEndResponse_ = input.readMessage(AbstractGlobalEndResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractGlobalEndResponse_); + abstractGlobalEndResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalReportResponseProto.class, Builder.class); + } + + public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; + private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + @Override + public boolean hasAbstractGlobalEndResponse() { + return abstractGlobalEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + @Override + public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { + return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + @Override + public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { + return getAbstractGlobalEndResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractGlobalEndResponse_ != null) { + output.writeMessage(1, getAbstractGlobalEndResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractGlobalEndResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractGlobalEndResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalReportResponseProto)) { + return super.equals(obj); + } + GlobalReportResponseProto other = (GlobalReportResponseProto) obj; + + if (hasAbstractGlobalEndResponse() != other.hasAbstractGlobalEndResponse()) return false; + if (hasAbstractGlobalEndResponse()) { + if (!getAbstractGlobalEndResponse() + .equals(other.getAbstractGlobalEndResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractGlobalEndResponse()) { + hash = (37 * hash) + ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractGlobalEndResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalReportResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalReportResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalReportResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalReportResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalReportResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalReportResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalReportResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalReportResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalReportResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalReportResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalReportResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalReportResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalReportResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalReportResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) + GlobalReportResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalReportResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalReportResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = null; + } else { + abstractGlobalEndResponse_ = null; + abstractGlobalEndResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor; + } + + @Override + public GlobalReportResponseProto getDefaultInstanceForType() { + return GlobalReportResponseProto.getDefaultInstance(); + } + + @Override + public GlobalReportResponseProto build() { + GlobalReportResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalReportResponseProto buildPartial() { + GlobalReportResponseProto result = new GlobalReportResponseProto(this); + if (abstractGlobalEndResponseBuilder_ == null) { + result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; + } else { + result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalReportResponseProto) { + return mergeFrom((GlobalReportResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalReportResponseProto other) { + if (other == GlobalReportResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractGlobalEndResponse()) { + mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalReportResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalReportResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + public boolean hasAbstractGlobalEndResponse() { + return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { + if (abstractGlobalEndResponseBuilder_ == null) { + return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } else { + return abstractGlobalEndResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder setAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { + if (abstractGlobalEndResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractGlobalEndResponse_ = value; + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder setAbstractGlobalEndResponse( + AbstractGlobalEndResponseProto.Builder builderForValue) { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder mergeAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { + if (abstractGlobalEndResponseBuilder_ == null) { + if (abstractGlobalEndResponse_ != null) { + abstractGlobalEndResponse_ = + AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); + } else { + abstractGlobalEndResponse_ = value; + } + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder clearAbstractGlobalEndResponse() { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = null; + onChanged(); + } else { + abstractGlobalEndResponse_ = null; + abstractGlobalEndResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { + + onChanged(); + return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { + if (abstractGlobalEndResponseBuilder_ != null) { + return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractGlobalEndResponse_ == null ? + AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> + getAbstractGlobalEndResponseFieldBuilder() { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder>( + getAbstractGlobalEndResponse(), + getParentForChildren(), + isClean()); + abstractGlobalEndResponse_ = null; + } + return abstractGlobalEndResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) + private static final GlobalReportResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalReportResponseProto(); + } + + public static GlobalReportResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalReportResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalReportResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalReportResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProtoOrBuilder.java new file mode 100644 index 00000000000..04d4880893b --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalReportResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalReportResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + boolean hasAbstractGlobalEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequest.java new file mode 100644 index 00000000000..01262c8f43c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequest.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalRollbackRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalRollbackRequest { + private GlobalRollbackRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\033globalRollbackRequest.proto\022\"org.apach" + + "e.seata.protocol.protobuf\032\036abstractGloba" + + "lEndRequest.proto\"\201\001\n\032GlobalRollbackRequ" + + "estProto\022c\n\030abstractGlobalEndRequest\030\001 \001" + + "(\0132A.org.apache.seata.protocol.protobuf." + + "AbstractGlobalEndRequestProtoBN\n3org.apa" + + "che.seata.core.serializer.protobuf.gener" + + "atedB\025GlobalRollbackRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractGlobalEndRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor, + new String[] { "AbstractGlobalEndRequest", }); + AbstractGlobalEndRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProto.java new file mode 100644 index 00000000000..d54c2a357c2 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalRollbackRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto} + */ +public final class GlobalRollbackRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) + GlobalRollbackRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalRollbackRequestProto.newBuilder() to construct. + private GlobalRollbackRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalRollbackRequestProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalRollbackRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalRollbackRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractGlobalEndRequestProto.Builder subBuilder = null; + if (abstractGlobalEndRequest_ != null) { + subBuilder = abstractGlobalEndRequest_.toBuilder(); + } + abstractGlobalEndRequest_ = input.readMessage(AbstractGlobalEndRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractGlobalEndRequest_); + abstractGlobalEndRequest_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalRollbackRequestProto.class, Builder.class); + } + + public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; + private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + @Override + public boolean hasAbstractGlobalEndRequest() { + return abstractGlobalEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + @Override + public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { + return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + @Override + public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { + return getAbstractGlobalEndRequest(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractGlobalEndRequest_ != null) { + output.writeMessage(1, getAbstractGlobalEndRequest()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractGlobalEndRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractGlobalEndRequest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalRollbackRequestProto)) { + return super.equals(obj); + } + GlobalRollbackRequestProto other = (GlobalRollbackRequestProto) obj; + + if (hasAbstractGlobalEndRequest() != other.hasAbstractGlobalEndRequest()) return false; + if (hasAbstractGlobalEndRequest()) { + if (!getAbstractGlobalEndRequest() + .equals(other.getAbstractGlobalEndRequest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractGlobalEndRequest()) { + hash = (37 * hash) + ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractGlobalEndRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalRollbackRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalRollbackRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalRollbackRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalRollbackRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalRollbackRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalRollbackRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalRollbackRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalRollbackRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalRollbackRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalRollbackRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalRollbackRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalRollbackRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalRollbackRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) + GlobalRollbackRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalRollbackRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = null; + } else { + abstractGlobalEndRequest_ = null; + abstractGlobalEndRequestBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; + } + + @Override + public GlobalRollbackRequestProto getDefaultInstanceForType() { + return GlobalRollbackRequestProto.getDefaultInstance(); + } + + @Override + public GlobalRollbackRequestProto build() { + GlobalRollbackRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalRollbackRequestProto buildPartial() { + GlobalRollbackRequestProto result = new GlobalRollbackRequestProto(this); + if (abstractGlobalEndRequestBuilder_ == null) { + result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; + } else { + result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalRollbackRequestProto) { + return mergeFrom((GlobalRollbackRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalRollbackRequestProto other) { + if (other == GlobalRollbackRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractGlobalEndRequest()) { + mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalRollbackRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalRollbackRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + public boolean hasAbstractGlobalEndRequest() { + return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { + if (abstractGlobalEndRequestBuilder_ == null) { + return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } else { + return abstractGlobalEndRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder setAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { + if (abstractGlobalEndRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractGlobalEndRequest_ = value; + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder setAbstractGlobalEndRequest( + AbstractGlobalEndRequestProto.Builder builderForValue) { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder mergeAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { + if (abstractGlobalEndRequestBuilder_ == null) { + if (abstractGlobalEndRequest_ != null) { + abstractGlobalEndRequest_ = + AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); + } else { + abstractGlobalEndRequest_ = value; + } + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder clearAbstractGlobalEndRequest() { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = null; + onChanged(); + } else { + abstractGlobalEndRequest_ = null; + abstractGlobalEndRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { + + onChanged(); + return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { + if (abstractGlobalEndRequestBuilder_ != null) { + return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractGlobalEndRequest_ == null ? + AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> + getAbstractGlobalEndRequestFieldBuilder() { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder>( + getAbstractGlobalEndRequest(), + getParentForChildren(), + isClean()); + abstractGlobalEndRequest_ = null; + } + return abstractGlobalEndRequestBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) + private static final GlobalRollbackRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalRollbackRequestProto(); + } + + public static GlobalRollbackRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalRollbackRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalRollbackRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalRollbackRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java new file mode 100644 index 00000000000..ef97ce18099 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalRollbackRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalRollbackRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + boolean hasAbstractGlobalEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponse.java new file mode 100644 index 00000000000..1d0f9d68aaa --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponse.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalRollbackResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalRollbackResponse { + private GlobalRollbackResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\034globalRollbackResponse.proto\022\"org.apac" + + "he.seata.protocol.protobuf\032\037abstractGlob" + + "alEndResponse.proto\"\204\001\n\033GlobalRollbackRe" + + "sponseProto\022e\n\031abstractGlobalEndResponse" + + "\030\001 \001(\0132B.org.apache.seata.protocol.proto" + + "buf.AbstractGlobalEndResponseProtoBO\n3or" + + "g.apache.seata.core.serializer.protobuf." + + "generatedB\026GlobalRollbackResponseP\001b\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractGlobalEndResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor, + new String[] { "AbstractGlobalEndResponse", }); + AbstractGlobalEndResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProto.java new file mode 100644 index 00000000000..0e8fe5addeb --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalRollbackResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto} + */ +public final class GlobalRollbackResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) + GlobalRollbackResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalRollbackResponseProto.newBuilder() to construct. + private GlobalRollbackResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalRollbackResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalRollbackResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalRollbackResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractGlobalEndResponseProto.Builder subBuilder = null; + if (abstractGlobalEndResponse_ != null) { + subBuilder = abstractGlobalEndResponse_.toBuilder(); + } + abstractGlobalEndResponse_ = input.readMessage(AbstractGlobalEndResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractGlobalEndResponse_); + abstractGlobalEndResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalRollbackResponseProto.class, Builder.class); + } + + public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; + private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + @Override + public boolean hasAbstractGlobalEndResponse() { + return abstractGlobalEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + @Override + public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { + return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + @Override + public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { + return getAbstractGlobalEndResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractGlobalEndResponse_ != null) { + output.writeMessage(1, getAbstractGlobalEndResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractGlobalEndResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractGlobalEndResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalRollbackResponseProto)) { + return super.equals(obj); + } + GlobalRollbackResponseProto other = (GlobalRollbackResponseProto) obj; + + if (hasAbstractGlobalEndResponse() != other.hasAbstractGlobalEndResponse()) return false; + if (hasAbstractGlobalEndResponse()) { + if (!getAbstractGlobalEndResponse() + .equals(other.getAbstractGlobalEndResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractGlobalEndResponse()) { + hash = (37 * hash) + ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractGlobalEndResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalRollbackResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalRollbackResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalRollbackResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalRollbackResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalRollbackResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalRollbackResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalRollbackResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalRollbackResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalRollbackResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalRollbackResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalRollbackResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalRollbackResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalRollbackResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) + GlobalRollbackResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalRollbackResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = null; + } else { + abstractGlobalEndResponse_ = null; + abstractGlobalEndResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; + } + + @Override + public GlobalRollbackResponseProto getDefaultInstanceForType() { + return GlobalRollbackResponseProto.getDefaultInstance(); + } + + @Override + public GlobalRollbackResponseProto build() { + GlobalRollbackResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalRollbackResponseProto buildPartial() { + GlobalRollbackResponseProto result = new GlobalRollbackResponseProto(this); + if (abstractGlobalEndResponseBuilder_ == null) { + result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; + } else { + result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalRollbackResponseProto) { + return mergeFrom((GlobalRollbackResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalRollbackResponseProto other) { + if (other == GlobalRollbackResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractGlobalEndResponse()) { + mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalRollbackResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalRollbackResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + public boolean hasAbstractGlobalEndResponse() { + return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { + if (abstractGlobalEndResponseBuilder_ == null) { + return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } else { + return abstractGlobalEndResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder setAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { + if (abstractGlobalEndResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractGlobalEndResponse_ = value; + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder setAbstractGlobalEndResponse( + AbstractGlobalEndResponseProto.Builder builderForValue) { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder mergeAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { + if (abstractGlobalEndResponseBuilder_ == null) { + if (abstractGlobalEndResponse_ != null) { + abstractGlobalEndResponse_ = + AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); + } else { + abstractGlobalEndResponse_ = value; + } + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder clearAbstractGlobalEndResponse() { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = null; + onChanged(); + } else { + abstractGlobalEndResponse_ = null; + abstractGlobalEndResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { + + onChanged(); + return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { + if (abstractGlobalEndResponseBuilder_ != null) { + return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractGlobalEndResponse_ == null ? + AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> + getAbstractGlobalEndResponseFieldBuilder() { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder>( + getAbstractGlobalEndResponse(), + getParentForChildren(), + isClean()); + abstractGlobalEndResponse_ = null; + } + return abstractGlobalEndResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) + private static final GlobalRollbackResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalRollbackResponseProto(); + } + + public static GlobalRollbackResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalRollbackResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalRollbackResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalRollbackResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java new file mode 100644 index 00000000000..75c55f4bb32 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalRollbackResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalRollbackResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + boolean hasAbstractGlobalEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatus.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatus.java new file mode 100644 index 00000000000..6725a2d0ddb --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatus.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalStatus.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalStatus { + private GlobalStatus() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\022globalStatus.proto\022\"org.apache.seata.p" + + "rotocol.protobuf*\305\002\n\021GlobalStatusProto\022\013" + + "\n\007UnKnown\020\000\022\t\n\005Begin\020\001\022\016\n\nCommitting\020\002\022\022" + + "\n\016CommitRetrying\020\003\022\017\n\013Rollbacking\020\004\022\024\n\020R" + + "ollbackRetrying\020\005\022\026\n\022TimeoutRollbacking\020" + + "\006\022\033\n\027TimeoutRollbackRetrying\020\007\022\023\n\017AsyncC" + + "ommitting\020\010\022\r\n\tCommitted\020\t\022\020\n\014CommitFail" + + "ed\020\n\022\016\n\nRollbacked\020\013\022\022\n\016RollbackFailed\020\014" + + "\022\025\n\021TimeoutRollbacked\020\r\022\031\n\025TimeoutRollba" + + "ckFailed\020\016\022\014\n\010Finished\020\017BE\n3org.apache.s" + + "eata.core.serializer.protobuf.generatedB" + + "\014GlobalStatusP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusProto.java new file mode 100644 index 00000000000..1f85255d03d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusProto.java @@ -0,0 +1,375 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalStatus.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf enum {@code org.apache.seata.protocol.protobuf.GlobalStatusProto} + */ +public enum GlobalStatusProto + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unknown
+   * 
+ * + * UnKnown = 0; + */ + UnKnown(0), + /** + *
+   * PHASE 1: can accept new branch registering.
+   * 
+ * + * Begin = 1; + */ + Begin(1), + /** + *
+   * Committing.
+   * 
+ * + * Committing = 2; + */ + Committing(2), + /** + *
+   * Retrying commit after a recoverable failure.
+   * 
+ * + * CommitRetrying = 3; + */ + CommitRetrying(3), + /** + *
+   * Rollbacking
+   * 
+ * + * Rollbacking = 4; + */ + Rollbacking(4), + /** + *
+   * Retrying rollback after a recoverable failure.
+   * 
+ * + * RollbackRetrying = 5; + */ + RollbackRetrying(5), + /** + *
+   * Rollbacking since timeout
+   * 
+ * + * TimeoutRollbacking = 6; + */ + TimeoutRollbacking(6), + /** + *
+   * Retrying rollback (since timeout) after a recoverable failure.
+   * 
+ * + * TimeoutRollbackRetrying = 7; + */ + TimeoutRollbackRetrying(7), + /** + *
+   **
+   * All branches can be async committed. The committing is NOT done yet, but it can be seen as committed for TM/RM
+   * client.
+   * 
+ * + * AsyncCommitting = 8; + */ + AsyncCommitting(8), + /** + *
+   * Finally: global transaction is successfully committed.
+   * 
+ * + * Committed = 9; + */ + Committed(9), + /** + *
+   * Finally: failed to commit
+   * 
+ * + * CommitFailed = 10; + */ + CommitFailed(10), + /** + *
+   * Finally: global transaction is successfully rollbacked.
+   * 
+ * + * Rollbacked = 11; + */ + Rollbacked(11), + /** + *
+   * Finally: failed to rollback
+   * 
+ * + * RollbackFailed = 12; + */ + RollbackFailed(12), + /** + *
+   * Finally: global transaction is successfully rollbacked since timeout.
+   * 
+ * + * TimeoutRollbacked = 13; + */ + TimeoutRollbacked(13), + /** + *
+   * Finally: failed to rollback since timeout
+   * 
+ * + * TimeoutRollbackFailed = 14; + */ + TimeoutRollbackFailed(14), + /** + *
+   * Not managed in session MAP any more
+   * 
+ * + * Finished = 15; + */ + Finished(15), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unknown
+   * 
+ * + * UnKnown = 0; + */ + public static final int UnKnown_VALUE = 0; + /** + *
+   * PHASE 1: can accept new branch registering.
+   * 
+ * + * Begin = 1; + */ + public static final int Begin_VALUE = 1; + /** + *
+   * Committing.
+   * 
+ * + * Committing = 2; + */ + public static final int Committing_VALUE = 2; + /** + *
+   * Retrying commit after a recoverable failure.
+   * 
+ * + * CommitRetrying = 3; + */ + public static final int CommitRetrying_VALUE = 3; + /** + *
+   * Rollbacking
+   * 
+ * + * Rollbacking = 4; + */ + public static final int Rollbacking_VALUE = 4; + /** + *
+   * Retrying rollback after a recoverable failure.
+   * 
+ * + * RollbackRetrying = 5; + */ + public static final int RollbackRetrying_VALUE = 5; + /** + *
+   * Rollbacking since timeout
+   * 
+ * + * TimeoutRollbacking = 6; + */ + public static final int TimeoutRollbacking_VALUE = 6; + /** + *
+   * Retrying rollback (since timeout) after a recoverable failure.
+   * 
+ * + * TimeoutRollbackRetrying = 7; + */ + public static final int TimeoutRollbackRetrying_VALUE = 7; + /** + *
+   **
+   * All branches can be async committed. The committing is NOT done yet, but it can be seen as committed for TM/RM
+   * client.
+   * 
+ * + * AsyncCommitting = 8; + */ + public static final int AsyncCommitting_VALUE = 8; + /** + *
+   * Finally: global transaction is successfully committed.
+   * 
+ * + * Committed = 9; + */ + public static final int Committed_VALUE = 9; + /** + *
+   * Finally: failed to commit
+   * 
+ * + * CommitFailed = 10; + */ + public static final int CommitFailed_VALUE = 10; + /** + *
+   * Finally: global transaction is successfully rollbacked.
+   * 
+ * + * Rollbacked = 11; + */ + public static final int Rollbacked_VALUE = 11; + /** + *
+   * Finally: failed to rollback
+   * 
+ * + * RollbackFailed = 12; + */ + public static final int RollbackFailed_VALUE = 12; + /** + *
+   * Finally: global transaction is successfully rollbacked since timeout.
+   * 
+ * + * TimeoutRollbacked = 13; + */ + public static final int TimeoutRollbacked_VALUE = 13; + /** + *
+   * Finally: failed to rollback since timeout
+   * 
+ * + * TimeoutRollbackFailed = 14; + */ + public static final int TimeoutRollbackFailed_VALUE = 14; + /** + *
+   * Not managed in session MAP any more
+   * 
+ * + * Finished = 15; + */ + public static final int Finished_VALUE = 15; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static GlobalStatusProto valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static GlobalStatusProto forNumber(int value) { + switch (value) { + case 0: return UnKnown; + case 1: return Begin; + case 2: return Committing; + case 3: return CommitRetrying; + case 4: return Rollbacking; + case 5: return RollbackRetrying; + case 6: return TimeoutRollbacking; + case 7: return TimeoutRollbackRetrying; + case 8: return AsyncCommitting; + case 9: return Committed; + case 10: return CommitFailed; + case 11: return Rollbacked; + case 12: return RollbackFailed; + case 13: return TimeoutRollbacked; + case 14: return TimeoutRollbackFailed; + case 15: return Finished; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + GlobalStatusProto> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GlobalStatusProto findValueByNumber(int number) { + return GlobalStatusProto.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return GlobalStatus.getDescriptor().getEnumTypes().get(0); + } + + private static final GlobalStatusProto[] VALUES = values(); + + public static GlobalStatusProto valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private GlobalStatusProto(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.GlobalStatusProto) +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequest.java new file mode 100644 index 00000000000..3dfb30ff420 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequest.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalStatusRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalStatusRequest { + private GlobalStatusRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\031globalStatusRequest.proto\022\"org.apache." + + "seata.protocol.protobuf\032\036abstractGlobalE" + + "ndRequest.proto\"\177\n\030GlobalStatusRequestPr" + + "oto\022c\n\030abstractGlobalEndRequest\030\001 \001(\0132A." + + "org.apache.seata.protocol.protobuf.Abstr" + + "actGlobalEndRequestProtoBL\n3org.apache.s" + + "eata.core.serializer.protobuf.generatedB" + + "\023GlobalStatusRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractGlobalEndRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor, + new String[] { "AbstractGlobalEndRequest", }); + AbstractGlobalEndRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProto.java new file mode 100644 index 00000000000..75f070a8798 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalStatusRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalStatusRequestProto} + */ +public final class GlobalStatusRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) + GlobalStatusRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalStatusRequestProto.newBuilder() to construct. + private GlobalStatusRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalStatusRequestProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalStatusRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalStatusRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractGlobalEndRequestProto.Builder subBuilder = null; + if (abstractGlobalEndRequest_ != null) { + subBuilder = abstractGlobalEndRequest_.toBuilder(); + } + abstractGlobalEndRequest_ = input.readMessage(AbstractGlobalEndRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractGlobalEndRequest_); + abstractGlobalEndRequest_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalStatusRequestProto.class, Builder.class); + } + + public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; + private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + @Override + public boolean hasAbstractGlobalEndRequest() { + return abstractGlobalEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + @Override + public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { + return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + @Override + public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { + return getAbstractGlobalEndRequest(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractGlobalEndRequest_ != null) { + output.writeMessage(1, getAbstractGlobalEndRequest()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractGlobalEndRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractGlobalEndRequest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalStatusRequestProto)) { + return super.equals(obj); + } + GlobalStatusRequestProto other = (GlobalStatusRequestProto) obj; + + if (hasAbstractGlobalEndRequest() != other.hasAbstractGlobalEndRequest()) return false; + if (hasAbstractGlobalEndRequest()) { + if (!getAbstractGlobalEndRequest() + .equals(other.getAbstractGlobalEndRequest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractGlobalEndRequest()) { + hash = (37 * hash) + ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractGlobalEndRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalStatusRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalStatusRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalStatusRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalStatusRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalStatusRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalStatusRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalStatusRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalStatusRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalStatusRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalStatusRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalStatusRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalStatusRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalStatusRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalStatusRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) + GlobalStatusRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalStatusRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalStatusRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = null; + } else { + abstractGlobalEndRequest_ = null; + abstractGlobalEndRequestBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; + } + + @Override + public GlobalStatusRequestProto getDefaultInstanceForType() { + return GlobalStatusRequestProto.getDefaultInstance(); + } + + @Override + public GlobalStatusRequestProto build() { + GlobalStatusRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalStatusRequestProto buildPartial() { + GlobalStatusRequestProto result = new GlobalStatusRequestProto(this); + if (abstractGlobalEndRequestBuilder_ == null) { + result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; + } else { + result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalStatusRequestProto) { + return mergeFrom((GlobalStatusRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalStatusRequestProto other) { + if (other == GlobalStatusRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractGlobalEndRequest()) { + mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalStatusRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalStatusRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + public boolean hasAbstractGlobalEndRequest() { + return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { + if (abstractGlobalEndRequestBuilder_ == null) { + return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } else { + return abstractGlobalEndRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder setAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { + if (abstractGlobalEndRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractGlobalEndRequest_ = value; + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder setAbstractGlobalEndRequest( + AbstractGlobalEndRequestProto.Builder builderForValue) { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder mergeAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { + if (abstractGlobalEndRequestBuilder_ == null) { + if (abstractGlobalEndRequest_ != null) { + abstractGlobalEndRequest_ = + AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); + } else { + abstractGlobalEndRequest_ = value; + } + onChanged(); + } else { + abstractGlobalEndRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public Builder clearAbstractGlobalEndRequest() { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequest_ = null; + onChanged(); + } else { + abstractGlobalEndRequest_ = null; + abstractGlobalEndRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { + + onChanged(); + return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { + if (abstractGlobalEndRequestBuilder_ != null) { + return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractGlobalEndRequest_ == null ? + AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> + getAbstractGlobalEndRequestFieldBuilder() { + if (abstractGlobalEndRequestBuilder_ == null) { + abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder>( + getAbstractGlobalEndRequest(), + getParentForChildren(), + isClean()); + abstractGlobalEndRequest_ = null; + } + return abstractGlobalEndRequestBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) + private static final GlobalStatusRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalStatusRequestProto(); + } + + public static GlobalStatusRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalStatusRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalStatusRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalStatusRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java new file mode 100644 index 00000000000..f014d6e6739 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalStatusRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalStatusRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return Whether the abstractGlobalEndRequest field is set. + */ + boolean hasAbstractGlobalEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + * @return The abstractGlobalEndRequest. + */ + AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + */ + AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponse.java new file mode 100644 index 00000000000..fc5b88e93b8 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponse.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalStatusResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class GlobalStatusResponse { + private GlobalStatusResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\032globalStatusResponse.proto\022\"org.apache" + + ".seata.protocol.protobuf\032\037abstractGlobal" + + "EndResponse.proto\"\202\001\n\031GlobalStatusRespon" + + "seProto\022e\n\031abstractGlobalEndResponse\030\001 \001" + + "(\0132B.org.apache.seata.protocol.protobuf." + + "AbstractGlobalEndResponseProtoBM\n3org.ap" + + "ache.seata.core.serializer.protobuf.gene" + + "ratedB\024GlobalStatusResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractGlobalEndResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor, + new String[] { "AbstractGlobalEndResponse", }); + AbstractGlobalEndResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProto.java new file mode 100644 index 00000000000..ec72179b4f2 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProto.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalStatusResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalStatusResponseProto} + */ +public final class GlobalStatusResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) + GlobalStatusResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GlobalStatusResponseProto.newBuilder() to construct. + private GlobalStatusResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GlobalStatusResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GlobalStatusResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GlobalStatusResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractGlobalEndResponseProto.Builder subBuilder = null; + if (abstractGlobalEndResponse_ != null) { + subBuilder = abstractGlobalEndResponse_.toBuilder(); + } + abstractGlobalEndResponse_ = input.readMessage(AbstractGlobalEndResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractGlobalEndResponse_); + abstractGlobalEndResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalStatusResponseProto.class, Builder.class); + } + + public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; + private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + @Override + public boolean hasAbstractGlobalEndResponse() { + return abstractGlobalEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + @Override + public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { + return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + @Override + public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { + return getAbstractGlobalEndResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractGlobalEndResponse_ != null) { + output.writeMessage(1, getAbstractGlobalEndResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractGlobalEndResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractGlobalEndResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GlobalStatusResponseProto)) { + return super.equals(obj); + } + GlobalStatusResponseProto other = (GlobalStatusResponseProto) obj; + + if (hasAbstractGlobalEndResponse() != other.hasAbstractGlobalEndResponse()) return false; + if (hasAbstractGlobalEndResponse()) { + if (!getAbstractGlobalEndResponse() + .equals(other.getAbstractGlobalEndResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractGlobalEndResponse()) { + hash = (37 * hash) + ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractGlobalEndResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GlobalStatusResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalStatusResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalStatusResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalStatusResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalStatusResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GlobalStatusResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GlobalStatusResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalStatusResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalStatusResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GlobalStatusResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GlobalStatusResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GlobalStatusResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GlobalStatusResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalStatusResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) + GlobalStatusResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GlobalStatusResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalStatusResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = null; + } else { + abstractGlobalEndResponse_ = null; + abstractGlobalEndResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; + } + + @Override + public GlobalStatusResponseProto getDefaultInstanceForType() { + return GlobalStatusResponseProto.getDefaultInstance(); + } + + @Override + public GlobalStatusResponseProto build() { + GlobalStatusResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GlobalStatusResponseProto buildPartial() { + GlobalStatusResponseProto result = new GlobalStatusResponseProto(this); + if (abstractGlobalEndResponseBuilder_ == null) { + result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; + } else { + result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GlobalStatusResponseProto) { + return mergeFrom((GlobalStatusResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GlobalStatusResponseProto other) { + if (other == GlobalStatusResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractGlobalEndResponse()) { + mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GlobalStatusResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GlobalStatusResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + public boolean hasAbstractGlobalEndResponse() { + return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { + if (abstractGlobalEndResponseBuilder_ == null) { + return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } else { + return abstractGlobalEndResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder setAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { + if (abstractGlobalEndResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractGlobalEndResponse_ = value; + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder setAbstractGlobalEndResponse( + AbstractGlobalEndResponseProto.Builder builderForValue) { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder mergeAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { + if (abstractGlobalEndResponseBuilder_ == null) { + if (abstractGlobalEndResponse_ != null) { + abstractGlobalEndResponse_ = + AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); + } else { + abstractGlobalEndResponse_ = value; + } + onChanged(); + } else { + abstractGlobalEndResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public Builder clearAbstractGlobalEndResponse() { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponse_ = null; + onChanged(); + } else { + abstractGlobalEndResponse_ = null; + abstractGlobalEndResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { + + onChanged(); + return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { + if (abstractGlobalEndResponseBuilder_ != null) { + return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractGlobalEndResponse_ == null ? + AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> + getAbstractGlobalEndResponseFieldBuilder() { + if (abstractGlobalEndResponseBuilder_ == null) { + abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder>( + getAbstractGlobalEndResponse(), + getParentForChildren(), + isClean()); + abstractGlobalEndResponse_ = null; + } + return abstractGlobalEndResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) + private static final GlobalStatusResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GlobalStatusResponseProto(); + } + + public static GlobalStatusResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GlobalStatusResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GlobalStatusResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GlobalStatusResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java new file mode 100644 index 00000000000..6f464e64c0f --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: globalStatusResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface GlobalStatusResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return Whether the abstractGlobalEndResponse field is set. + */ + boolean hasAbstractGlobalEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + * @return The abstractGlobalEndResponse. + */ + AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; + */ + AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessage.java new file mode 100644 index 00000000000..cf810c2d588 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessage.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: heartbeatMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class HeartbeatMessage { + private HeartbeatMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\026heartbeatMessage.proto\022\"org.apache.sea" + + "ta.protocol.protobuf\"%\n\025HeartbeatMessage" + + "Proto\022\014\n\004ping\030\001 \001(\010BI\n3org.apache.seata." + + "core.serializer.protobuf.generatedB\020Hear" + + "tbeatMessageP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor, + new String[] { "Ping", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProto.java new file mode 100644 index 00000000000..4e574f4dfbf --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProto.java @@ -0,0 +1,494 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: heartbeatMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.HeartbeatMessageProto} + */ +public final class HeartbeatMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) + HeartbeatMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use HeartbeatMessageProto.newBuilder() to construct. + private HeartbeatMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HeartbeatMessageProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new HeartbeatMessageProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HeartbeatMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + ping_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + HeartbeatMessageProto.class, Builder.class); + } + + public static final int PING_FIELD_NUMBER = 1; + private boolean ping_; + /** + * bool ping = 1; + * @return The ping. + */ + @Override + public boolean getPing() { + return ping_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (ping_ != false) { + output.writeBool(1, ping_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ping_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, ping_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof HeartbeatMessageProto)) { + return super.equals(obj); + } + HeartbeatMessageProto other = (HeartbeatMessageProto) obj; + + if (getPing() + != other.getPing()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPing()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static HeartbeatMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static HeartbeatMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static HeartbeatMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static HeartbeatMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static HeartbeatMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static HeartbeatMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static HeartbeatMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static HeartbeatMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static HeartbeatMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static HeartbeatMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static HeartbeatMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static HeartbeatMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(HeartbeatMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.HeartbeatMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) + HeartbeatMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + HeartbeatMessageProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.HeartbeatMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + ping_ = false; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; + } + + @Override + public HeartbeatMessageProto getDefaultInstanceForType() { + return HeartbeatMessageProto.getDefaultInstance(); + } + + @Override + public HeartbeatMessageProto build() { + HeartbeatMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public HeartbeatMessageProto buildPartial() { + HeartbeatMessageProto result = new HeartbeatMessageProto(this); + result.ping_ = ping_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof HeartbeatMessageProto) { + return mergeFrom((HeartbeatMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(HeartbeatMessageProto other) { + if (other == HeartbeatMessageProto.getDefaultInstance()) return this; + if (other.getPing() != false) { + setPing(other.getPing()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + HeartbeatMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (HeartbeatMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean ping_ ; + /** + * bool ping = 1; + * @return The ping. + */ + @Override + public boolean getPing() { + return ping_; + } + /** + * bool ping = 1; + * @param value The ping to set. + * @return This builder for chaining. + */ + public Builder setPing(boolean value) { + + ping_ = value; + onChanged(); + return this; + } + /** + * bool ping = 1; + * @return This builder for chaining. + */ + public Builder clearPing() { + + ping_ = false; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) + private static final HeartbeatMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new HeartbeatMessageProto(); + } + + public static HeartbeatMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public HeartbeatMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HeartbeatMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public HeartbeatMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProtoOrBuilder.java new file mode 100644 index 00000000000..6536b326835 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProtoOrBuilder.java @@ -0,0 +1,15 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: heartbeatMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface HeartbeatMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * bool ping = 1; + * @return The ping. + */ + boolean getPing(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessage.java new file mode 100644 index 00000000000..8704a26d9c7 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessage.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: mergedResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class MergedResultMessage { + private MergedResultMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\031mergedResultMessage.proto\022\"org.apache." + + "seata.protocol.protobuf\032\025abstractMessage" + + ".proto\032\031google/protobuf/any.proto\"\221\001\n\030Me" + + "rgedResultMessageProto\022Q\n\017abstractMessag" + + "e\030\001 \001(\01328.org.apache.seata.protocol.prot" + + "obuf.AbstractMessageProto\022\"\n\004msgs\030\002 \003(\0132" + + "\024.google.protobuf.AnyBL\n3org.apache.seat" + + "a.core.serializer.protobuf.generatedB\023Me" + + "rgedResultMessageP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractMessage.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor, + new String[] { "AbstractMessage", "Msgs", }); + AbstractMessage.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProto.java new file mode 100644 index 00000000000..b9c0a0b3c8c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProto.java @@ -0,0 +1,968 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: mergedResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.MergedResultMessageProto} + */ +public final class MergedResultMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.MergedResultMessageProto) + MergedResultMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use MergedResultMessageProto.newBuilder() to construct. + private MergedResultMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MergedResultMessageProto() { + msgs_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new MergedResultMessageProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MergedResultMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractMessageProto.Builder subBuilder = null; + if (abstractMessage_ != null) { + subBuilder = abstractMessage_.toBuilder(); + } + abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractMessage_); + abstractMessage_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + msgs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + msgs_.add( + input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + msgs_ = java.util.Collections.unmodifiableList(msgs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + MergedResultMessageProto.class, Builder.class); + } + + public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; + private AbstractMessageProto abstractMessage_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + @Override + public boolean hasAbstractMessage() { + return abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + @Override + public AbstractMessageProto getAbstractMessage() { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + @Override + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + return getAbstractMessage(); + } + + public static final int MSGS_FIELD_NUMBER = 2; + private java.util.List msgs_; + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public java.util.List getMsgsList() { + return msgs_; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public java.util.List + getMsgsOrBuilderList() { + return msgs_; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public int getMsgsCount() { + return msgs_.size(); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public com.google.protobuf.Any getMsgs(int index) { + return msgs_.get(index); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( + int index) { + return msgs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractMessage_ != null) { + output.writeMessage(1, getAbstractMessage()); + } + for (int i = 0; i < msgs_.size(); i++) { + output.writeMessage(2, msgs_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractMessage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractMessage()); + } + for (int i = 0; i < msgs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, msgs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof MergedResultMessageProto)) { + return super.equals(obj); + } + MergedResultMessageProto other = (MergedResultMessageProto) obj; + + if (hasAbstractMessage() != other.hasAbstractMessage()) return false; + if (hasAbstractMessage()) { + if (!getAbstractMessage() + .equals(other.getAbstractMessage())) return false; + } + if (!getMsgsList() + .equals(other.getMsgsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractMessage()) { + hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractMessage().hashCode(); + } + if (getMsgsCount() > 0) { + hash = (37 * hash) + MSGS_FIELD_NUMBER; + hash = (53 * hash) + getMsgsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static MergedResultMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static MergedResultMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static MergedResultMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static MergedResultMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static MergedResultMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static MergedResultMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static MergedResultMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static MergedResultMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static MergedResultMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static MergedResultMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static MergedResultMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static MergedResultMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(MergedResultMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.MergedResultMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.MergedResultMessageProto) + MergedResultMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + MergedResultMessageProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.MergedResultMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMsgsFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + if (msgsBuilder_ == null) { + msgs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + msgsBuilder_.clear(); + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor; + } + + @Override + public MergedResultMessageProto getDefaultInstanceForType() { + return MergedResultMessageProto.getDefaultInstance(); + } + + @Override + public MergedResultMessageProto build() { + MergedResultMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public MergedResultMessageProto buildPartial() { + MergedResultMessageProto result = new MergedResultMessageProto(this); + int from_bitField0_ = bitField0_; + if (abstractMessageBuilder_ == null) { + result.abstractMessage_ = abstractMessage_; + } else { + result.abstractMessage_ = abstractMessageBuilder_.build(); + } + if (msgsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + msgs_ = java.util.Collections.unmodifiableList(msgs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.msgs_ = msgs_; + } else { + result.msgs_ = msgsBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof MergedResultMessageProto) { + return mergeFrom((MergedResultMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(MergedResultMessageProto other) { + if (other == MergedResultMessageProto.getDefaultInstance()) return this; + if (other.hasAbstractMessage()) { + mergeAbstractMessage(other.getAbstractMessage()); + } + if (msgsBuilder_ == null) { + if (!other.msgs_.isEmpty()) { + if (msgs_.isEmpty()) { + msgs_ = other.msgs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMsgsIsMutable(); + msgs_.addAll(other.msgs_); + } + onChanged(); + } + } else { + if (!other.msgs_.isEmpty()) { + if (msgsBuilder_.isEmpty()) { + msgsBuilder_.dispose(); + msgsBuilder_ = null; + msgs_ = other.msgs_; + bitField0_ = (bitField0_ & ~0x00000001); + msgsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMsgsFieldBuilder() : null; + } else { + msgsBuilder_.addAllMessages(other.msgs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + MergedResultMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (MergedResultMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private AbstractMessageProto abstractMessage_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + public boolean hasAbstractMessage() { + return abstractMessageBuilder_ != null || abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + public AbstractMessageProto getAbstractMessage() { + if (abstractMessageBuilder_ == null) { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } else { + return abstractMessageBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractMessage_ = value; + onChanged(); + } else { + abstractMessageBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage( + AbstractMessageProto.Builder builderForValue) { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = builderForValue.build(); + onChanged(); + } else { + abstractMessageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder mergeAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (abstractMessage_ != null) { + abstractMessage_ = + AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); + } else { + abstractMessage_ = value; + } + onChanged(); + } else { + abstractMessageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder clearAbstractMessage() { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + onChanged(); + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProto.Builder getAbstractMessageBuilder() { + + onChanged(); + return getAbstractMessageFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + if (abstractMessageBuilder_ != null) { + return abstractMessageBuilder_.getMessageOrBuilder(); + } else { + return abstractMessage_ == null ? + AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> + getAbstractMessageFieldBuilder() { + if (abstractMessageBuilder_ == null) { + abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( + getAbstractMessage(), + getParentForChildren(), + isClean()); + abstractMessage_ = null; + } + return abstractMessageBuilder_; + } + + private java.util.List msgs_ = + java.util.Collections.emptyList(); + private void ensureMsgsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + msgs_ = new java.util.ArrayList(msgs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> msgsBuilder_; + + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public java.util.List getMsgsList() { + if (msgsBuilder_ == null) { + return java.util.Collections.unmodifiableList(msgs_); + } else { + return msgsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public int getMsgsCount() { + if (msgsBuilder_ == null) { + return msgs_.size(); + } else { + return msgsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.Any getMsgs(int index) { + if (msgsBuilder_ == null) { + return msgs_.get(index); + } else { + return msgsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder setMsgs( + int index, com.google.protobuf.Any value) { + if (msgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMsgsIsMutable(); + msgs_.set(index, value); + onChanged(); + } else { + msgsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder setMsgs( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + msgs_.set(index, builderForValue.build()); + onChanged(); + } else { + msgsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addMsgs(com.google.protobuf.Any value) { + if (msgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMsgsIsMutable(); + msgs_.add(value); + onChanged(); + } else { + msgsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addMsgs( + int index, com.google.protobuf.Any value) { + if (msgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMsgsIsMutable(); + msgs_.add(index, value); + onChanged(); + } else { + msgsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addMsgs( + com.google.protobuf.Any.Builder builderForValue) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + msgs_.add(builderForValue.build()); + onChanged(); + } else { + msgsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addMsgs( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + msgs_.add(index, builderForValue.build()); + onChanged(); + } else { + msgsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addAllMsgs( + Iterable values) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, msgs_); + onChanged(); + } else { + msgsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder clearMsgs() { + if (msgsBuilder_ == null) { + msgs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + msgsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder removeMsgs(int index) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + msgs_.remove(index); + onChanged(); + } else { + msgsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.Any.Builder getMsgsBuilder( + int index) { + return getMsgsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( + int index) { + if (msgsBuilder_ == null) { + return msgs_.get(index); } else { + return msgsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public java.util.List + getMsgsOrBuilderList() { + if (msgsBuilder_ != null) { + return msgsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(msgs_); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.Any.Builder addMsgsBuilder() { + return getMsgsFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.Any.Builder addMsgsBuilder( + int index) { + return getMsgsFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public java.util.List + getMsgsBuilderList() { + return getMsgsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getMsgsFieldBuilder() { + if (msgsBuilder_ == null) { + msgsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + msgs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + msgs_ = null; + } + return msgsBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.MergedResultMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.MergedResultMessageProto) + private static final MergedResultMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new MergedResultMessageProto(); + } + + public static MergedResultMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public MergedResultMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MergedResultMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public MergedResultMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProtoOrBuilder.java new file mode 100644 index 00000000000..a804c2cf48c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProtoOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: mergedResultMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface MergedResultMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.MergedResultMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + boolean hasAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + AbstractMessageProto getAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); + + /** + * repeated .google.protobuf.Any msgs = 2; + */ + java.util.List + getMsgsList(); + /** + * repeated .google.protobuf.Any msgs = 2; + */ + com.google.protobuf.Any getMsgs(int index); + /** + * repeated .google.protobuf.Any msgs = 2; + */ + int getMsgsCount(); + /** + * repeated .google.protobuf.Any msgs = 2; + */ + java.util.List + getMsgsOrBuilderList(); + /** + * repeated .google.protobuf.Any msgs = 2; + */ + com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( + int index); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessage.java new file mode 100644 index 00000000000..2d5758832dd --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessage.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: mergedWarpMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class MergedWarpMessage { + private MergedWarpMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\027mergedWarpMessage.proto\022\"org.apache.se" + + "ata.protocol.protobuf\032\025abstractMessage.p" + + "roto\032\031google/protobuf/any.proto\"\237\001\n\026Merg" + + "edWarpMessageProto\022Q\n\017abstractMessage\030\001 " + + "\001(\01328.org.apache.seata.protocol.protobuf" + + ".AbstractMessageProto\022\"\n\004msgs\030\002 \003(\0132\024.go" + + "ogle.protobuf.Any\022\016\n\006msgIds\030\003 \003(\005BJ\n3org" + + ".apache.seata.core.serializer.protobuf.g" + + "eneratedB\021MergedWarpMessageP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractMessage.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor, + new String[] { "AbstractMessage", "Msgs", "MsgIds", }); + AbstractMessage.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProto.java new file mode 100644 index 00000000000..bafcfcd1c92 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProto.java @@ -0,0 +1,1145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: mergedWarpMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.MergedWarpMessageProto} + */ +public final class MergedWarpMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) + MergedWarpMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use MergedWarpMessageProto.newBuilder() to construct. + private MergedWarpMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MergedWarpMessageProto() { + msgs_ = java.util.Collections.emptyList(); + msgIds_ = emptyIntList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new MergedWarpMessageProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MergedWarpMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractMessageProto.Builder subBuilder = null; + if (abstractMessage_ != null) { + subBuilder = abstractMessage_.toBuilder(); + } + abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractMessage_); + abstractMessage_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + msgs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + msgs_.add( + input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + msgIds_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + msgIds_.addInt(input.readInt32()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + msgIds_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + msgIds_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + msgs_ = java.util.Collections.unmodifiableList(msgs_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + msgIds_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + MergedWarpMessageProto.class, Builder.class); + } + + public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; + private AbstractMessageProto abstractMessage_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + @Override + public boolean hasAbstractMessage() { + return abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + @Override + public AbstractMessageProto getAbstractMessage() { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + @Override + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + return getAbstractMessage(); + } + + public static final int MSGS_FIELD_NUMBER = 2; + private java.util.List msgs_; + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public java.util.List getMsgsList() { + return msgs_; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public java.util.List + getMsgsOrBuilderList() { + return msgs_; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public int getMsgsCount() { + return msgs_.size(); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public com.google.protobuf.Any getMsgs(int index) { + return msgs_.get(index); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + @Override + public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( + int index) { + return msgs_.get(index); + } + + public static final int MSGIDS_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.IntList msgIds_; + /** + * repeated int32 msgIds = 3; + * @return A list containing the msgIds. + */ + @Override + public java.util.List + getMsgIdsList() { + return msgIds_; + } + /** + * repeated int32 msgIds = 3; + * @return The count of msgIds. + */ + public int getMsgIdsCount() { + return msgIds_.size(); + } + /** + * repeated int32 msgIds = 3; + * @param index The index of the element to return. + * @return The msgIds at the given index. + */ + public int getMsgIds(int index) { + return msgIds_.getInt(index); + } + private int msgIdsMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (abstractMessage_ != null) { + output.writeMessage(1, getAbstractMessage()); + } + for (int i = 0; i < msgs_.size(); i++) { + output.writeMessage(2, msgs_.get(i)); + } + if (getMsgIdsList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(msgIdsMemoizedSerializedSize); + } + for (int i = 0; i < msgIds_.size(); i++) { + output.writeInt32NoTag(msgIds_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractMessage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractMessage()); + } + for (int i = 0; i < msgs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, msgs_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < msgIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(msgIds_.getInt(i)); + } + size += dataSize; + if (!getMsgIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + msgIdsMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof MergedWarpMessageProto)) { + return super.equals(obj); + } + MergedWarpMessageProto other = (MergedWarpMessageProto) obj; + + if (hasAbstractMessage() != other.hasAbstractMessage()) return false; + if (hasAbstractMessage()) { + if (!getAbstractMessage() + .equals(other.getAbstractMessage())) return false; + } + if (!getMsgsList() + .equals(other.getMsgsList())) return false; + if (!getMsgIdsList() + .equals(other.getMsgIdsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractMessage()) { + hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractMessage().hashCode(); + } + if (getMsgsCount() > 0) { + hash = (37 * hash) + MSGS_FIELD_NUMBER; + hash = (53 * hash) + getMsgsList().hashCode(); + } + if (getMsgIdsCount() > 0) { + hash = (37 * hash) + MSGIDS_FIELD_NUMBER; + hash = (53 * hash) + getMsgIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static MergedWarpMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static MergedWarpMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static MergedWarpMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static MergedWarpMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static MergedWarpMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static MergedWarpMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static MergedWarpMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static MergedWarpMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static MergedWarpMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static MergedWarpMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static MergedWarpMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static MergedWarpMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(MergedWarpMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.MergedWarpMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) + MergedWarpMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + MergedWarpMessageProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.MergedWarpMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMsgsFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + if (msgsBuilder_ == null) { + msgs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + msgsBuilder_.clear(); + } + msgIds_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; + } + + @Override + public MergedWarpMessageProto getDefaultInstanceForType() { + return MergedWarpMessageProto.getDefaultInstance(); + } + + @Override + public MergedWarpMessageProto build() { + MergedWarpMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public MergedWarpMessageProto buildPartial() { + MergedWarpMessageProto result = new MergedWarpMessageProto(this); + int from_bitField0_ = bitField0_; + if (abstractMessageBuilder_ == null) { + result.abstractMessage_ = abstractMessage_; + } else { + result.abstractMessage_ = abstractMessageBuilder_.build(); + } + if (msgsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + msgs_ = java.util.Collections.unmodifiableList(msgs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.msgs_ = msgs_; + } else { + result.msgs_ = msgsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + msgIds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.msgIds_ = msgIds_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof MergedWarpMessageProto) { + return mergeFrom((MergedWarpMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(MergedWarpMessageProto other) { + if (other == MergedWarpMessageProto.getDefaultInstance()) return this; + if (other.hasAbstractMessage()) { + mergeAbstractMessage(other.getAbstractMessage()); + } + if (msgsBuilder_ == null) { + if (!other.msgs_.isEmpty()) { + if (msgs_.isEmpty()) { + msgs_ = other.msgs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMsgsIsMutable(); + msgs_.addAll(other.msgs_); + } + onChanged(); + } + } else { + if (!other.msgs_.isEmpty()) { + if (msgsBuilder_.isEmpty()) { + msgsBuilder_.dispose(); + msgsBuilder_ = null; + msgs_ = other.msgs_; + bitField0_ = (bitField0_ & ~0x00000001); + msgsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMsgsFieldBuilder() : null; + } else { + msgsBuilder_.addAllMessages(other.msgs_); + } + } + } + if (!other.msgIds_.isEmpty()) { + if (msgIds_.isEmpty()) { + msgIds_ = other.msgIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMsgIdsIsMutable(); + msgIds_.addAll(other.msgIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + MergedWarpMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (MergedWarpMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private AbstractMessageProto abstractMessage_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + public boolean hasAbstractMessage() { + return abstractMessageBuilder_ != null || abstractMessage_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + public AbstractMessageProto getAbstractMessage() { + if (abstractMessageBuilder_ == null) { + return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } else { + return abstractMessageBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractMessage_ = value; + onChanged(); + } else { + abstractMessageBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder setAbstractMessage( + AbstractMessageProto.Builder builderForValue) { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = builderForValue.build(); + onChanged(); + } else { + abstractMessageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder mergeAbstractMessage(AbstractMessageProto value) { + if (abstractMessageBuilder_ == null) { + if (abstractMessage_ != null) { + abstractMessage_ = + AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); + } else { + abstractMessage_ = value; + } + onChanged(); + } else { + abstractMessageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public Builder clearAbstractMessage() { + if (abstractMessageBuilder_ == null) { + abstractMessage_ = null; + onChanged(); + } else { + abstractMessage_ = null; + abstractMessageBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProto.Builder getAbstractMessageBuilder() { + + onChanged(); + return getAbstractMessageFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { + if (abstractMessageBuilder_ != null) { + return abstractMessageBuilder_.getMessageOrBuilder(); + } else { + return abstractMessage_ == null ? + AbstractMessageProto.getDefaultInstance() : abstractMessage_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> + getAbstractMessageFieldBuilder() { + if (abstractMessageBuilder_ == null) { + abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( + getAbstractMessage(), + getParentForChildren(), + isClean()); + abstractMessage_ = null; + } + return abstractMessageBuilder_; + } + + private java.util.List msgs_ = + java.util.Collections.emptyList(); + private void ensureMsgsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + msgs_ = new java.util.ArrayList(msgs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> msgsBuilder_; + + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public java.util.List getMsgsList() { + if (msgsBuilder_ == null) { + return java.util.Collections.unmodifiableList(msgs_); + } else { + return msgsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public int getMsgsCount() { + if (msgsBuilder_ == null) { + return msgs_.size(); + } else { + return msgsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.Any getMsgs(int index) { + if (msgsBuilder_ == null) { + return msgs_.get(index); + } else { + return msgsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder setMsgs( + int index, com.google.protobuf.Any value) { + if (msgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMsgsIsMutable(); + msgs_.set(index, value); + onChanged(); + } else { + msgsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder setMsgs( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + msgs_.set(index, builderForValue.build()); + onChanged(); + } else { + msgsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addMsgs(com.google.protobuf.Any value) { + if (msgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMsgsIsMutable(); + msgs_.add(value); + onChanged(); + } else { + msgsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addMsgs( + int index, com.google.protobuf.Any value) { + if (msgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMsgsIsMutable(); + msgs_.add(index, value); + onChanged(); + } else { + msgsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addMsgs( + com.google.protobuf.Any.Builder builderForValue) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + msgs_.add(builderForValue.build()); + onChanged(); + } else { + msgsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addMsgs( + int index, com.google.protobuf.Any.Builder builderForValue) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + msgs_.add(index, builderForValue.build()); + onChanged(); + } else { + msgsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder addAllMsgs( + Iterable values) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, msgs_); + onChanged(); + } else { + msgsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder clearMsgs() { + if (msgsBuilder_ == null) { + msgs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + msgsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public Builder removeMsgs(int index) { + if (msgsBuilder_ == null) { + ensureMsgsIsMutable(); + msgs_.remove(index); + onChanged(); + } else { + msgsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.Any.Builder getMsgsBuilder( + int index) { + return getMsgsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( + int index) { + if (msgsBuilder_ == null) { + return msgs_.get(index); } else { + return msgsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public java.util.List + getMsgsOrBuilderList() { + if (msgsBuilder_ != null) { + return msgsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(msgs_); + } + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.Any.Builder addMsgsBuilder() { + return getMsgsFieldBuilder().addBuilder( + com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public com.google.protobuf.Any.Builder addMsgsBuilder( + int index) { + return getMsgsFieldBuilder().addBuilder( + index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Any msgs = 2; + */ + public java.util.List + getMsgsBuilderList() { + return getMsgsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getMsgsFieldBuilder() { + if (msgsBuilder_ == null) { + msgsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + msgs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + msgs_ = null; + } + return msgsBuilder_; + } + + private com.google.protobuf.Internal.IntList msgIds_ = emptyIntList(); + private void ensureMsgIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + msgIds_ = mutableCopy(msgIds_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated int32 msgIds = 3; + * @return A list containing the msgIds. + */ + public java.util.List + getMsgIdsList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(msgIds_) : msgIds_; + } + /** + * repeated int32 msgIds = 3; + * @return The count of msgIds. + */ + public int getMsgIdsCount() { + return msgIds_.size(); + } + /** + * repeated int32 msgIds = 3; + * @param index The index of the element to return. + * @return The msgIds at the given index. + */ + public int getMsgIds(int index) { + return msgIds_.getInt(index); + } + /** + * repeated int32 msgIds = 3; + * @param index The index to set the value at. + * @param value The msgIds to set. + * @return This builder for chaining. + */ + public Builder setMsgIds( + int index, int value) { + ensureMsgIdsIsMutable(); + msgIds_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated int32 msgIds = 3; + * @param value The msgIds to add. + * @return This builder for chaining. + */ + public Builder addMsgIds(int value) { + ensureMsgIdsIsMutable(); + msgIds_.addInt(value); + onChanged(); + return this; + } + /** + * repeated int32 msgIds = 3; + * @param values The msgIds to add. + * @return This builder for chaining. + */ + public Builder addAllMsgIds( + Iterable values) { + ensureMsgIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, msgIds_); + onChanged(); + return this; + } + /** + * repeated int32 msgIds = 3; + * @return This builder for chaining. + */ + public Builder clearMsgIds() { + msgIds_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) + private static final MergedWarpMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new MergedWarpMessageProto(); + } + + public static MergedWarpMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public MergedWarpMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MergedWarpMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public MergedWarpMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProtoOrBuilder.java new file mode 100644 index 00000000000..fd78b4e996c --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProtoOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: mergedWarpMessage.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface MergedWarpMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return Whether the abstractMessage field is set. + */ + boolean hasAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + * @return The abstractMessage. + */ + AbstractMessageProto getAbstractMessage(); + /** + * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; + */ + AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); + + /** + * repeated .google.protobuf.Any msgs = 2; + */ + java.util.List + getMsgsList(); + /** + * repeated .google.protobuf.Any msgs = 2; + */ + com.google.protobuf.Any getMsgs(int index); + /** + * repeated .google.protobuf.Any msgs = 2; + */ + int getMsgsCount(); + /** + * repeated .google.protobuf.Any msgs = 2; + */ + java.util.List + getMsgsOrBuilderList(); + /** + * repeated .google.protobuf.Any msgs = 2; + */ + com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( + int index); + + /** + * repeated int32 msgIds = 3; + * @return A list containing the msgIds. + */ + java.util.List getMsgIdsList(); + /** + * repeated int32 msgIds = 3; + * @return The count of msgIds. + */ + int getMsgIdsCount(); + /** + * repeated int32 msgIds = 3; + * @param index The index of the element to return. + * @return The msgIds at the given index. + */ + int getMsgIds(int index); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageType.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageType.java new file mode 100644 index 00000000000..6ea1ae6cb5d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageType.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: messageType.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class MessageType { + private MessageType() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\021messageType.proto\022\"org.apache.seata.pr" + + "otocol.protobuf*\257\006\n\020MessageTypeProto\022\031\n\025" + + "TYPE_GLOBAL_PRESERVED\020\000\022\025\n\021TYPE_GLOBAL_B" + + "EGIN\020\001\022\034\n\030TYPE_GLOBAL_BEGIN_RESULT\020\002\022\026\n\022" + + "TYPE_GLOBAL_COMMIT\020\007\022\035\n\031TYPE_GLOBAL_COMM" + + "IT_RESULT\020\010\022\030\n\024TYPE_GLOBAL_ROLLBACK\020\t\022\037\n" + + "\033TYPE_GLOBAL_ROLLBACK_RESULT\020\n\022\026\n\022TYPE_G" + + "LOBAL_STATUS\020\017\022\035\n\031TYPE_GLOBAL_STATUS_RES" + + "ULT\020\020\022\026\n\022TYPE_GLOBAL_REPORT\020\021\022\035\n\031TYPE_GL" + + "OBAL_REPORT_RESULT\020\022\022\032\n\026TYPE_GLOBAL_LOCK" + + "_QUERY\020\025\022!\n\035TYPE_GLOBAL_LOCK_QUERY_RESUL" + + "T\020\026\022\026\n\022TYPE_BRANCH_COMMIT\020\003\022\035\n\031TYPE_BRAN" + + "CH_COMMIT_RESULT\020\004\022\030\n\024TYPE_BRANCH_ROLLBA" + + "CK\020\005\022\037\n\033TYPE_BRANCH_ROLLBACK_RESULT\020\006\022\030\n" + + "\024TYPE_BRANCH_REGISTER\020\013\022\037\n\033TYPE_BRANCH_R" + + "EGISTER_RESULT\020\014\022\035\n\031TYPE_BRANCH_STATUS_R" + + "EPORT\020\r\022$\n TYPE_BRANCH_STATUS_REPORT_RES" + + "ULT\020\016\022\024\n\020TYPE_SEATA_MERGE\020;\022\033\n\027TYPE_SEAT" + + "A_MERGE_RESULT\020<\022\020\n\014TYPE_REG_CLT\020e\022\027\n\023TY" + + "PE_REG_CLT_RESULT\020f\022\017\n\013TYPE_REG_RM\020g\022\026\n\022" + + "TYPE_REG_RM_RESULT\020h\022\030\n\024TYPE_UNDO_LOG_DE" + + "LETE\020o\022\031\n\025TYPE_BATCH_RESULT_MSG\020yBD\n3org" + + ".apache.seata.core.serializer.protobuf.g" + + "eneratedB\013MessageTypeP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageTypeProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageTypeProto.java new file mode 100644 index 00000000000..3a4617142eb --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageTypeProto.java @@ -0,0 +1,620 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: messageType.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf enum {@code org.apache.seata.protocol.protobuf.MessageTypeProto} + */ +public enum MessageTypeProto + implements com.google.protobuf.ProtocolMessageEnum { + /** + * TYPE_GLOBAL_PRESERVED = 0; + */ + TYPE_GLOBAL_PRESERVED(0), + /** + * TYPE_GLOBAL_BEGIN = 1; + */ + TYPE_GLOBAL_BEGIN(1), + /** + * TYPE_GLOBAL_BEGIN_RESULT = 2; + */ + TYPE_GLOBAL_BEGIN_RESULT(2), + /** + *
+   **
+   * The constant TYPE_GLOBAL_COMMIT.
+   * 
+ * + * TYPE_GLOBAL_COMMIT = 7; + */ + TYPE_GLOBAL_COMMIT(7), + /** + *
+   **
+   * The constant TYPE_GLOBAL_COMMIT_RESULT.
+   * 
+ * + * TYPE_GLOBAL_COMMIT_RESULT = 8; + */ + TYPE_GLOBAL_COMMIT_RESULT(8), + /** + *
+   **
+   * The constant TYPE_GLOBAL_ROLLBACK.
+   * 
+ * + * TYPE_GLOBAL_ROLLBACK = 9; + */ + TYPE_GLOBAL_ROLLBACK(9), + /** + *
+   **
+   * The constant TYPE_GLOBAL_ROLLBACK_RESULT.
+   * 
+ * + * TYPE_GLOBAL_ROLLBACK_RESULT = 10; + */ + TYPE_GLOBAL_ROLLBACK_RESULT(10), + /** + *
+   **
+   * The constant TYPE_GLOBAL_STATUS.
+   * 
+ * + * TYPE_GLOBAL_STATUS = 15; + */ + TYPE_GLOBAL_STATUS(15), + /** + *
+   **
+   * The constant TYPE_GLOBAL_STATUS_RESULT.
+   * 
+ * + * TYPE_GLOBAL_STATUS_RESULT = 16; + */ + TYPE_GLOBAL_STATUS_RESULT(16), + /** + *
+   **
+   * The constant TYPE_GLOBAL_REPORT.
+   * 
+ * + * TYPE_GLOBAL_REPORT = 17; + */ + TYPE_GLOBAL_REPORT(17), + /** + *
+   **
+   * The constant TYPE_GLOBAL_REPORT_RESULT.
+   * 
+ * + * TYPE_GLOBAL_REPORT_RESULT = 18; + */ + TYPE_GLOBAL_REPORT_RESULT(18), + /** + *
+   **
+   * The constant TYPE_GLOBAL_LOCK_QUERY.
+   * 
+ * + * TYPE_GLOBAL_LOCK_QUERY = 21; + */ + TYPE_GLOBAL_LOCK_QUERY(21), + /** + *
+   **
+   * The constant TYPE_GLOBAL_LOCK_QUERY_RESULT.
+   * 
+ * + * TYPE_GLOBAL_LOCK_QUERY_RESULT = 22; + */ + TYPE_GLOBAL_LOCK_QUERY_RESULT(22), + /** + *
+   **
+   * The constant TYPE_BRANCH_COMMIT.
+   * 
+ * + * TYPE_BRANCH_COMMIT = 3; + */ + TYPE_BRANCH_COMMIT(3), + /** + *
+   **
+   * The constant TYPE_BRANCH_COMMIT_RESULT.
+   * 
+ * + * TYPE_BRANCH_COMMIT_RESULT = 4; + */ + TYPE_BRANCH_COMMIT_RESULT(4), + /** + *
+   **
+   * The constant TYPE_BRANCH_ROLLBACK.
+   * 
+ * + * TYPE_BRANCH_ROLLBACK = 5; + */ + TYPE_BRANCH_ROLLBACK(5), + /** + *
+   **
+   * The constant TYPE_BRANCH_ROLLBACK_RESULT.
+   * 
+ * + * TYPE_BRANCH_ROLLBACK_RESULT = 6; + */ + TYPE_BRANCH_ROLLBACK_RESULT(6), + /** + *
+   **
+   * The constant TYPE_BRANCH_REGISTER.
+   * 
+ * + * TYPE_BRANCH_REGISTER = 11; + */ + TYPE_BRANCH_REGISTER(11), + /** + *
+   **
+   * The constant TYPE_BRANCH_REGISTER_RESULT.
+   * 
+ * + * TYPE_BRANCH_REGISTER_RESULT = 12; + */ + TYPE_BRANCH_REGISTER_RESULT(12), + /** + *
+   **
+   * The constant TYPE_BRANCH_STATUS_REPORT.
+   * 
+ * + * TYPE_BRANCH_STATUS_REPORT = 13; + */ + TYPE_BRANCH_STATUS_REPORT(13), + /** + *
+   **
+   * The constant TYPE_BRANCH_STATUS_REPORT_RESULT.
+   * 
+ * + * TYPE_BRANCH_STATUS_REPORT_RESULT = 14; + */ + TYPE_BRANCH_STATUS_REPORT_RESULT(14), + /** + *
+   **
+   * The constant TYPE_SEATA_MERGE.
+   * 
+ * + * TYPE_SEATA_MERGE = 59; + */ + TYPE_SEATA_MERGE(59), + /** + *
+   **
+   * The constant TYPE_SEATA_MERGE_RESULT.
+   * 
+ * + * TYPE_SEATA_MERGE_RESULT = 60; + */ + TYPE_SEATA_MERGE_RESULT(60), + /** + *
+   **
+   * The constant TYPE_REG_CLT.
+   * 
+ * + * TYPE_REG_CLT = 101; + */ + TYPE_REG_CLT(101), + /** + *
+   **
+   * The constant TYPE_REG_CLT_RESULT.
+   * 
+ * + * TYPE_REG_CLT_RESULT = 102; + */ + TYPE_REG_CLT_RESULT(102), + /** + *
+   **
+   * The constant TYPE_REG_RM.
+   * 
+ * + * TYPE_REG_RM = 103; + */ + TYPE_REG_RM(103), + /** + *
+   **
+   * The constant TYPE_REG_RM_RESULT.
+   * 
+ * + * TYPE_REG_RM_RESULT = 104; + */ + TYPE_REG_RM_RESULT(104), + /** + *
+   **
+   * The constant TYPE_UNDO_LOG_DELETE.
+   * 
+ * + * TYPE_UNDO_LOG_DELETE = 111; + */ + TYPE_UNDO_LOG_DELETE(111), + /** + *
+   **
+   * the constant TYPE_BATCH_RESULT_MSG
+   * 
+ * + * TYPE_BATCH_RESULT_MSG = 121; + */ + TYPE_BATCH_RESULT_MSG(121), + UNRECOGNIZED(-1), + ; + + /** + * TYPE_GLOBAL_PRESERVED = 0; + */ + public static final int TYPE_GLOBAL_PRESERVED_VALUE = 0; + /** + * TYPE_GLOBAL_BEGIN = 1; + */ + public static final int TYPE_GLOBAL_BEGIN_VALUE = 1; + /** + * TYPE_GLOBAL_BEGIN_RESULT = 2; + */ + public static final int TYPE_GLOBAL_BEGIN_RESULT_VALUE = 2; + /** + *
+   **
+   * The constant TYPE_GLOBAL_COMMIT.
+   * 
+ * + * TYPE_GLOBAL_COMMIT = 7; + */ + public static final int TYPE_GLOBAL_COMMIT_VALUE = 7; + /** + *
+   **
+   * The constant TYPE_GLOBAL_COMMIT_RESULT.
+   * 
+ * + * TYPE_GLOBAL_COMMIT_RESULT = 8; + */ + public static final int TYPE_GLOBAL_COMMIT_RESULT_VALUE = 8; + /** + *
+   **
+   * The constant TYPE_GLOBAL_ROLLBACK.
+   * 
+ * + * TYPE_GLOBAL_ROLLBACK = 9; + */ + public static final int TYPE_GLOBAL_ROLLBACK_VALUE = 9; + /** + *
+   **
+   * The constant TYPE_GLOBAL_ROLLBACK_RESULT.
+   * 
+ * + * TYPE_GLOBAL_ROLLBACK_RESULT = 10; + */ + public static final int TYPE_GLOBAL_ROLLBACK_RESULT_VALUE = 10; + /** + *
+   **
+   * The constant TYPE_GLOBAL_STATUS.
+   * 
+ * + * TYPE_GLOBAL_STATUS = 15; + */ + public static final int TYPE_GLOBAL_STATUS_VALUE = 15; + /** + *
+   **
+   * The constant TYPE_GLOBAL_STATUS_RESULT.
+   * 
+ * + * TYPE_GLOBAL_STATUS_RESULT = 16; + */ + public static final int TYPE_GLOBAL_STATUS_RESULT_VALUE = 16; + /** + *
+   **
+   * The constant TYPE_GLOBAL_REPORT.
+   * 
+ * + * TYPE_GLOBAL_REPORT = 17; + */ + public static final int TYPE_GLOBAL_REPORT_VALUE = 17; + /** + *
+   **
+   * The constant TYPE_GLOBAL_REPORT_RESULT.
+   * 
+ * + * TYPE_GLOBAL_REPORT_RESULT = 18; + */ + public static final int TYPE_GLOBAL_REPORT_RESULT_VALUE = 18; + /** + *
+   **
+   * The constant TYPE_GLOBAL_LOCK_QUERY.
+   * 
+ * + * TYPE_GLOBAL_LOCK_QUERY = 21; + */ + public static final int TYPE_GLOBAL_LOCK_QUERY_VALUE = 21; + /** + *
+   **
+   * The constant TYPE_GLOBAL_LOCK_QUERY_RESULT.
+   * 
+ * + * TYPE_GLOBAL_LOCK_QUERY_RESULT = 22; + */ + public static final int TYPE_GLOBAL_LOCK_QUERY_RESULT_VALUE = 22; + /** + *
+   **
+   * The constant TYPE_BRANCH_COMMIT.
+   * 
+ * + * TYPE_BRANCH_COMMIT = 3; + */ + public static final int TYPE_BRANCH_COMMIT_VALUE = 3; + /** + *
+   **
+   * The constant TYPE_BRANCH_COMMIT_RESULT.
+   * 
+ * + * TYPE_BRANCH_COMMIT_RESULT = 4; + */ + public static final int TYPE_BRANCH_COMMIT_RESULT_VALUE = 4; + /** + *
+   **
+   * The constant TYPE_BRANCH_ROLLBACK.
+   * 
+ * + * TYPE_BRANCH_ROLLBACK = 5; + */ + public static final int TYPE_BRANCH_ROLLBACK_VALUE = 5; + /** + *
+   **
+   * The constant TYPE_BRANCH_ROLLBACK_RESULT.
+   * 
+ * + * TYPE_BRANCH_ROLLBACK_RESULT = 6; + */ + public static final int TYPE_BRANCH_ROLLBACK_RESULT_VALUE = 6; + /** + *
+   **
+   * The constant TYPE_BRANCH_REGISTER.
+   * 
+ * + * TYPE_BRANCH_REGISTER = 11; + */ + public static final int TYPE_BRANCH_REGISTER_VALUE = 11; + /** + *
+   **
+   * The constant TYPE_BRANCH_REGISTER_RESULT.
+   * 
+ * + * TYPE_BRANCH_REGISTER_RESULT = 12; + */ + public static final int TYPE_BRANCH_REGISTER_RESULT_VALUE = 12; + /** + *
+   **
+   * The constant TYPE_BRANCH_STATUS_REPORT.
+   * 
+ * + * TYPE_BRANCH_STATUS_REPORT = 13; + */ + public static final int TYPE_BRANCH_STATUS_REPORT_VALUE = 13; + /** + *
+   **
+   * The constant TYPE_BRANCH_STATUS_REPORT_RESULT.
+   * 
+ * + * TYPE_BRANCH_STATUS_REPORT_RESULT = 14; + */ + public static final int TYPE_BRANCH_STATUS_REPORT_RESULT_VALUE = 14; + /** + *
+   **
+   * The constant TYPE_SEATA_MERGE.
+   * 
+ * + * TYPE_SEATA_MERGE = 59; + */ + public static final int TYPE_SEATA_MERGE_VALUE = 59; + /** + *
+   **
+   * The constant TYPE_SEATA_MERGE_RESULT.
+   * 
+ * + * TYPE_SEATA_MERGE_RESULT = 60; + */ + public static final int TYPE_SEATA_MERGE_RESULT_VALUE = 60; + /** + *
+   **
+   * The constant TYPE_REG_CLT.
+   * 
+ * + * TYPE_REG_CLT = 101; + */ + public static final int TYPE_REG_CLT_VALUE = 101; + /** + *
+   **
+   * The constant TYPE_REG_CLT_RESULT.
+   * 
+ * + * TYPE_REG_CLT_RESULT = 102; + */ + public static final int TYPE_REG_CLT_RESULT_VALUE = 102; + /** + *
+   **
+   * The constant TYPE_REG_RM.
+   * 
+ * + * TYPE_REG_RM = 103; + */ + public static final int TYPE_REG_RM_VALUE = 103; + /** + *
+   **
+   * The constant TYPE_REG_RM_RESULT.
+   * 
+ * + * TYPE_REG_RM_RESULT = 104; + */ + public static final int TYPE_REG_RM_RESULT_VALUE = 104; + /** + *
+   **
+   * The constant TYPE_UNDO_LOG_DELETE.
+   * 
+ * + * TYPE_UNDO_LOG_DELETE = 111; + */ + public static final int TYPE_UNDO_LOG_DELETE_VALUE = 111; + /** + *
+   **
+   * the constant TYPE_BATCH_RESULT_MSG
+   * 
+ * + * TYPE_BATCH_RESULT_MSG = 121; + */ + public static final int TYPE_BATCH_RESULT_MSG_VALUE = 121; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static MessageTypeProto valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MessageTypeProto forNumber(int value) { + switch (value) { + case 0: return TYPE_GLOBAL_PRESERVED; + case 1: return TYPE_GLOBAL_BEGIN; + case 2: return TYPE_GLOBAL_BEGIN_RESULT; + case 7: return TYPE_GLOBAL_COMMIT; + case 8: return TYPE_GLOBAL_COMMIT_RESULT; + case 9: return TYPE_GLOBAL_ROLLBACK; + case 10: return TYPE_GLOBAL_ROLLBACK_RESULT; + case 15: return TYPE_GLOBAL_STATUS; + case 16: return TYPE_GLOBAL_STATUS_RESULT; + case 17: return TYPE_GLOBAL_REPORT; + case 18: return TYPE_GLOBAL_REPORT_RESULT; + case 21: return TYPE_GLOBAL_LOCK_QUERY; + case 22: return TYPE_GLOBAL_LOCK_QUERY_RESULT; + case 3: return TYPE_BRANCH_COMMIT; + case 4: return TYPE_BRANCH_COMMIT_RESULT; + case 5: return TYPE_BRANCH_ROLLBACK; + case 6: return TYPE_BRANCH_ROLLBACK_RESULT; + case 11: return TYPE_BRANCH_REGISTER; + case 12: return TYPE_BRANCH_REGISTER_RESULT; + case 13: return TYPE_BRANCH_STATUS_REPORT; + case 14: return TYPE_BRANCH_STATUS_REPORT_RESULT; + case 59: return TYPE_SEATA_MERGE; + case 60: return TYPE_SEATA_MERGE_RESULT; + case 101: return TYPE_REG_CLT; + case 102: return TYPE_REG_CLT_RESULT; + case 103: return TYPE_REG_RM; + case 104: return TYPE_REG_RM_RESULT; + case 111: return TYPE_UNDO_LOG_DELETE; + case 121: return TYPE_BATCH_RESULT_MSG; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MessageTypeProto> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MessageTypeProto findValueByNumber(int number) { + return MessageTypeProto.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return MessageType.getDescriptor().getEnumTypes().get(0); + } + + private static final MessageTypeProto[] VALUES = values(); + + public static MessageTypeProto valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MessageTypeProto(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.MessageTypeProto) +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequest.java new file mode 100644 index 00000000000..cf3c8ebcaa2 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequest.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerRMRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class RegisterRMRequest { + private RegisterRMRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\027registerRMRequest.proto\022\"org.apache.se" + + "ata.protocol.protobuf\032\035abstractIdentifyR" + + "equest.proto\"\220\001\n\026RegisterRMRequestProto\022" + + "a\n\027abstractIdentifyRequest\030\001 \001(\0132@.org.a" + + "pache.seata.protocol.protobuf.AbstractId" + + "entifyRequestProto\022\023\n\013resourceIds\030\002 \001(\tB" + + "J\n3org.apache.seata.core.serializer.prot" + + "obuf.generatedB\021RegisterRMRequestP\001b\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractIdentifyRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor, + new String[] { "AbstractIdentifyRequest", "ResourceIds", }); + AbstractIdentifyRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProto.java new file mode 100644 index 00000000000..178cc220691 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProto.java @@ -0,0 +1,755 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerRMRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterRMRequestProto} + */ +public final class RegisterRMRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) + RegisterRMRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use RegisterRMRequestProto.newBuilder() to construct. + private RegisterRMRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RegisterRMRequestProto() { + resourceIds_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new RegisterRMRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RegisterRMRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractIdentifyRequestProto.Builder subBuilder = null; + if (abstractIdentifyRequest_ != null) { + subBuilder = abstractIdentifyRequest_.toBuilder(); + } + abstractIdentifyRequest_ = input.readMessage(AbstractIdentifyRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractIdentifyRequest_); + abstractIdentifyRequest_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + resourceIds_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + RegisterRMRequestProto.class, Builder.class); + } + + public static final int ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER = 1; + private AbstractIdentifyRequestProto abstractIdentifyRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return Whether the abstractIdentifyRequest field is set. + */ + @Override + public boolean hasAbstractIdentifyRequest() { + return abstractIdentifyRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return The abstractIdentifyRequest. + */ + @Override + public AbstractIdentifyRequestProto getAbstractIdentifyRequest() { + return abstractIdentifyRequest_ == null ? AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + @Override + public AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { + return getAbstractIdentifyRequest(); + } + + public static final int RESOURCEIDS_FIELD_NUMBER = 2; + private volatile Object resourceIds_; + /** + * string resourceIds = 2; + * @return The resourceIds. + */ + @Override + public String getResourceIds() { + Object ref = resourceIds_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceIds_ = s; + return s; + } + } + /** + * string resourceIds = 2; + * @return The bytes for resourceIds. + */ + @Override + public com.google.protobuf.ByteString + getResourceIdsBytes() { + Object ref = resourceIds_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceIds_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractIdentifyRequest_ != null) { + output.writeMessage(1, getAbstractIdentifyRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceIds_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceIds_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractIdentifyRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractIdentifyRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceIds_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceIds_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof RegisterRMRequestProto)) { + return super.equals(obj); + } + RegisterRMRequestProto other = (RegisterRMRequestProto) obj; + + if (hasAbstractIdentifyRequest() != other.hasAbstractIdentifyRequest()) return false; + if (hasAbstractIdentifyRequest()) { + if (!getAbstractIdentifyRequest() + .equals(other.getAbstractIdentifyRequest())) return false; + } + if (!getResourceIds() + .equals(other.getResourceIds())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractIdentifyRequest()) { + hash = (37 * hash) + ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractIdentifyRequest().hashCode(); + } + hash = (37 * hash) + RESOURCEIDS_FIELD_NUMBER; + hash = (53 * hash) + getResourceIds().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static RegisterRMRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterRMRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterRMRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterRMRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterRMRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterRMRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterRMRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static RegisterRMRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static RegisterRMRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static RegisterRMRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static RegisterRMRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static RegisterRMRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(RegisterRMRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterRMRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) + RegisterRMRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + RegisterRMRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.RegisterRMRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractIdentifyRequestBuilder_ == null) { + abstractIdentifyRequest_ = null; + } else { + abstractIdentifyRequest_ = null; + abstractIdentifyRequestBuilder_ = null; + } + resourceIds_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; + } + + @Override + public RegisterRMRequestProto getDefaultInstanceForType() { + return RegisterRMRequestProto.getDefaultInstance(); + } + + @Override + public RegisterRMRequestProto build() { + RegisterRMRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public RegisterRMRequestProto buildPartial() { + RegisterRMRequestProto result = new RegisterRMRequestProto(this); + if (abstractIdentifyRequestBuilder_ == null) { + result.abstractIdentifyRequest_ = abstractIdentifyRequest_; + } else { + result.abstractIdentifyRequest_ = abstractIdentifyRequestBuilder_.build(); + } + result.resourceIds_ = resourceIds_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof RegisterRMRequestProto) { + return mergeFrom((RegisterRMRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(RegisterRMRequestProto other) { + if (other == RegisterRMRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractIdentifyRequest()) { + mergeAbstractIdentifyRequest(other.getAbstractIdentifyRequest()); + } + if (!other.getResourceIds().isEmpty()) { + resourceIds_ = other.resourceIds_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + RegisterRMRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (RegisterRMRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractIdentifyRequestProto abstractIdentifyRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder> abstractIdentifyRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return Whether the abstractIdentifyRequest field is set. + */ + public boolean hasAbstractIdentifyRequest() { + return abstractIdentifyRequestBuilder_ != null || abstractIdentifyRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return The abstractIdentifyRequest. + */ + public AbstractIdentifyRequestProto getAbstractIdentifyRequest() { + if (abstractIdentifyRequestBuilder_ == null) { + return abstractIdentifyRequest_ == null ? AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; + } else { + return abstractIdentifyRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public Builder setAbstractIdentifyRequest(AbstractIdentifyRequestProto value) { + if (abstractIdentifyRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractIdentifyRequest_ = value; + onChanged(); + } else { + abstractIdentifyRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public Builder setAbstractIdentifyRequest( + AbstractIdentifyRequestProto.Builder builderForValue) { + if (abstractIdentifyRequestBuilder_ == null) { + abstractIdentifyRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractIdentifyRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public Builder mergeAbstractIdentifyRequest(AbstractIdentifyRequestProto value) { + if (abstractIdentifyRequestBuilder_ == null) { + if (abstractIdentifyRequest_ != null) { + abstractIdentifyRequest_ = + AbstractIdentifyRequestProto.newBuilder(abstractIdentifyRequest_).mergeFrom(value).buildPartial(); + } else { + abstractIdentifyRequest_ = value; + } + onChanged(); + } else { + abstractIdentifyRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public Builder clearAbstractIdentifyRequest() { + if (abstractIdentifyRequestBuilder_ == null) { + abstractIdentifyRequest_ = null; + onChanged(); + } else { + abstractIdentifyRequest_ = null; + abstractIdentifyRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public AbstractIdentifyRequestProto.Builder getAbstractIdentifyRequestBuilder() { + + onChanged(); + return getAbstractIdentifyRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { + if (abstractIdentifyRequestBuilder_ != null) { + return abstractIdentifyRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractIdentifyRequest_ == null ? + AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder> + getAbstractIdentifyRequestFieldBuilder() { + if (abstractIdentifyRequestBuilder_ == null) { + abstractIdentifyRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder>( + getAbstractIdentifyRequest(), + getParentForChildren(), + isClean()); + abstractIdentifyRequest_ = null; + } + return abstractIdentifyRequestBuilder_; + } + + private Object resourceIds_ = ""; + /** + * string resourceIds = 2; + * @return The resourceIds. + */ + public String getResourceIds() { + Object ref = resourceIds_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceIds_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * string resourceIds = 2; + * @return The bytes for resourceIds. + */ + public com.google.protobuf.ByteString + getResourceIdsBytes() { + Object ref = resourceIds_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceIds_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string resourceIds = 2; + * @param value The resourceIds to set. + * @return This builder for chaining. + */ + public Builder setResourceIds( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceIds_ = value; + onChanged(); + return this; + } + /** + * string resourceIds = 2; + * @return This builder for chaining. + */ + public Builder clearResourceIds() { + + resourceIds_ = getDefaultInstance().getResourceIds(); + onChanged(); + return this; + } + /** + * string resourceIds = 2; + * @param value The bytes for resourceIds to set. + * @return This builder for chaining. + */ + public Builder setResourceIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceIds_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) + private static final RegisterRMRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new RegisterRMRequestProto(); + } + + public static RegisterRMRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public RegisterRMRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RegisterRMRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public RegisterRMRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProtoOrBuilder.java new file mode 100644 index 00000000000..087969c347a --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProtoOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerRMRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface RegisterRMRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return Whether the abstractIdentifyRequest field is set. + */ + boolean hasAbstractIdentifyRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return The abstractIdentifyRequest. + */ + AbstractIdentifyRequestProto getAbstractIdentifyRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder(); + + /** + * string resourceIds = 2; + * @return The resourceIds. + */ + String getResourceIds(); + /** + * string resourceIds = 2; + * @return The bytes for resourceIds. + */ + com.google.protobuf.ByteString + getResourceIdsBytes(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponse.java new file mode 100644 index 00000000000..f05fef75ab9 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponse.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerRMResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class RegisterRMResponse { + private RegisterRMResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\030registerRMResponse.proto\022\"org.apache.s" + + "eata.protocol.protobuf\032\036abstractIdentify" + + "Response.proto\"~\n\027RegisterRMResponseProt" + + "o\022c\n\030abstractIdentifyResponse\030\001 \001(\0132A.or" + + "g.apache.seata.protocol.protobuf.Abstrac" + + "tIdentifyResponseProtoBK\n3org.apache.sea" + + "ta.core.serializer.protobuf.generatedB\022R" + + "egisterRMResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractIdentifyResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor, + new String[] { "AbstractIdentifyResponse", }); + AbstractIdentifyResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProto.java new file mode 100644 index 00000000000..1d1be68a69d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerRMResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterRMResponseProto} + */ +public final class RegisterRMResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) + RegisterRMResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use RegisterRMResponseProto.newBuilder() to construct. + private RegisterRMResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RegisterRMResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new RegisterRMResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RegisterRMResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractIdentifyResponseProto.Builder subBuilder = null; + if (abstractIdentifyResponse_ != null) { + subBuilder = abstractIdentifyResponse_.toBuilder(); + } + abstractIdentifyResponse_ = input.readMessage(AbstractIdentifyResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractIdentifyResponse_); + abstractIdentifyResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + RegisterRMResponseProto.class, Builder.class); + } + + public static final int ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER = 1; + private AbstractIdentifyResponseProto abstractIdentifyResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return Whether the abstractIdentifyResponse field is set. + */ + @Override + public boolean hasAbstractIdentifyResponse() { + return abstractIdentifyResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return The abstractIdentifyResponse. + */ + @Override + public AbstractIdentifyResponseProto getAbstractIdentifyResponse() { + return abstractIdentifyResponse_ == null ? AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + @Override + public AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { + return getAbstractIdentifyResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractIdentifyResponse_ != null) { + output.writeMessage(1, getAbstractIdentifyResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractIdentifyResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractIdentifyResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof RegisterRMResponseProto)) { + return super.equals(obj); + } + RegisterRMResponseProto other = (RegisterRMResponseProto) obj; + + if (hasAbstractIdentifyResponse() != other.hasAbstractIdentifyResponse()) return false; + if (hasAbstractIdentifyResponse()) { + if (!getAbstractIdentifyResponse() + .equals(other.getAbstractIdentifyResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractIdentifyResponse()) { + hash = (37 * hash) + ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractIdentifyResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static RegisterRMResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterRMResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterRMResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterRMResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterRMResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterRMResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterRMResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static RegisterRMResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static RegisterRMResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static RegisterRMResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static RegisterRMResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static RegisterRMResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(RegisterRMResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterRMResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) + RegisterRMResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + RegisterRMResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.RegisterRMResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractIdentifyResponseBuilder_ == null) { + abstractIdentifyResponse_ = null; + } else { + abstractIdentifyResponse_ = null; + abstractIdentifyResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; + } + + @Override + public RegisterRMResponseProto getDefaultInstanceForType() { + return RegisterRMResponseProto.getDefaultInstance(); + } + + @Override + public RegisterRMResponseProto build() { + RegisterRMResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public RegisterRMResponseProto buildPartial() { + RegisterRMResponseProto result = new RegisterRMResponseProto(this); + if (abstractIdentifyResponseBuilder_ == null) { + result.abstractIdentifyResponse_ = abstractIdentifyResponse_; + } else { + result.abstractIdentifyResponse_ = abstractIdentifyResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof RegisterRMResponseProto) { + return mergeFrom((RegisterRMResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(RegisterRMResponseProto other) { + if (other == RegisterRMResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractIdentifyResponse()) { + mergeAbstractIdentifyResponse(other.getAbstractIdentifyResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + RegisterRMResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (RegisterRMResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractIdentifyResponseProto abstractIdentifyResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder> abstractIdentifyResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return Whether the abstractIdentifyResponse field is set. + */ + public boolean hasAbstractIdentifyResponse() { + return abstractIdentifyResponseBuilder_ != null || abstractIdentifyResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return The abstractIdentifyResponse. + */ + public AbstractIdentifyResponseProto getAbstractIdentifyResponse() { + if (abstractIdentifyResponseBuilder_ == null) { + return abstractIdentifyResponse_ == null ? AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; + } else { + return abstractIdentifyResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public Builder setAbstractIdentifyResponse(AbstractIdentifyResponseProto value) { + if (abstractIdentifyResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractIdentifyResponse_ = value; + onChanged(); + } else { + abstractIdentifyResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public Builder setAbstractIdentifyResponse( + AbstractIdentifyResponseProto.Builder builderForValue) { + if (abstractIdentifyResponseBuilder_ == null) { + abstractIdentifyResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractIdentifyResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public Builder mergeAbstractIdentifyResponse(AbstractIdentifyResponseProto value) { + if (abstractIdentifyResponseBuilder_ == null) { + if (abstractIdentifyResponse_ != null) { + abstractIdentifyResponse_ = + AbstractIdentifyResponseProto.newBuilder(abstractIdentifyResponse_).mergeFrom(value).buildPartial(); + } else { + abstractIdentifyResponse_ = value; + } + onChanged(); + } else { + abstractIdentifyResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public Builder clearAbstractIdentifyResponse() { + if (abstractIdentifyResponseBuilder_ == null) { + abstractIdentifyResponse_ = null; + onChanged(); + } else { + abstractIdentifyResponse_ = null; + abstractIdentifyResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public AbstractIdentifyResponseProto.Builder getAbstractIdentifyResponseBuilder() { + + onChanged(); + return getAbstractIdentifyResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { + if (abstractIdentifyResponseBuilder_ != null) { + return abstractIdentifyResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractIdentifyResponse_ == null ? + AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder> + getAbstractIdentifyResponseFieldBuilder() { + if (abstractIdentifyResponseBuilder_ == null) { + abstractIdentifyResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder>( + getAbstractIdentifyResponse(), + getParentForChildren(), + isClean()); + abstractIdentifyResponse_ = null; + } + return abstractIdentifyResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) + private static final RegisterRMResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new RegisterRMResponseProto(); + } + + public static RegisterRMResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public RegisterRMResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RegisterRMResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public RegisterRMResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProtoOrBuilder.java new file mode 100644 index 00000000000..a1c45cc5375 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerRMResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface RegisterRMResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return Whether the abstractIdentifyResponse field is set. + */ + boolean hasAbstractIdentifyResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return The abstractIdentifyResponse. + */ + AbstractIdentifyResponseProto getAbstractIdentifyResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequest.java new file mode 100644 index 00000000000..c7eb423de4b --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequest.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerTMRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class RegisterTMRequest { + private RegisterTMRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\027registerTMRequest.proto\022\"org.apache.se" + + "ata.protocol.protobuf\032\035abstractIdentifyR" + + "equest.proto\"{\n\026RegisterTMRequestProto\022a" + + "\n\027abstractIdentifyRequest\030\001 \001(\0132@.org.ap" + + "ache.seata.protocol.protobuf.AbstractIde" + + "ntifyRequestProtoBJ\n3org.apache.seata.co" + + "re.serializer.protobuf.generatedB\021Regist" + + "erTMRequestP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractIdentifyRequest.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor, + new String[] { "AbstractIdentifyRequest", }); + AbstractIdentifyRequest.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProto.java new file mode 100644 index 00000000000..a70a66f1e54 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerTMRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterTMRequestProto} + */ +public final class RegisterTMRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) + RegisterTMRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use RegisterTMRequestProto.newBuilder() to construct. + private RegisterTMRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RegisterTMRequestProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new RegisterTMRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RegisterTMRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractIdentifyRequestProto.Builder subBuilder = null; + if (abstractIdentifyRequest_ != null) { + subBuilder = abstractIdentifyRequest_.toBuilder(); + } + abstractIdentifyRequest_ = input.readMessage(AbstractIdentifyRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractIdentifyRequest_); + abstractIdentifyRequest_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + RegisterTMRequestProto.class, Builder.class); + } + + public static final int ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER = 1; + private AbstractIdentifyRequestProto abstractIdentifyRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return Whether the abstractIdentifyRequest field is set. + */ + @Override + public boolean hasAbstractIdentifyRequest() { + return abstractIdentifyRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return The abstractIdentifyRequest. + */ + @Override + public AbstractIdentifyRequestProto getAbstractIdentifyRequest() { + return abstractIdentifyRequest_ == null ? AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + @Override + public AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { + return getAbstractIdentifyRequest(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractIdentifyRequest_ != null) { + output.writeMessage(1, getAbstractIdentifyRequest()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractIdentifyRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractIdentifyRequest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof RegisterTMRequestProto)) { + return super.equals(obj); + } + RegisterTMRequestProto other = (RegisterTMRequestProto) obj; + + if (hasAbstractIdentifyRequest() != other.hasAbstractIdentifyRequest()) return false; + if (hasAbstractIdentifyRequest()) { + if (!getAbstractIdentifyRequest() + .equals(other.getAbstractIdentifyRequest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractIdentifyRequest()) { + hash = (37 * hash) + ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractIdentifyRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static RegisterTMRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterTMRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterTMRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterTMRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterTMRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterTMRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterTMRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static RegisterTMRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static RegisterTMRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static RegisterTMRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static RegisterTMRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static RegisterTMRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(RegisterTMRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterTMRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) + RegisterTMRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + RegisterTMRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractIdentifyRequestBuilder_ == null) { + abstractIdentifyRequest_ = null; + } else { + abstractIdentifyRequest_ = null; + abstractIdentifyRequestBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; + } + + @Override + public RegisterTMRequestProto getDefaultInstanceForType() { + return RegisterTMRequestProto.getDefaultInstance(); + } + + @Override + public RegisterTMRequestProto build() { + RegisterTMRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public RegisterTMRequestProto buildPartial() { + RegisterTMRequestProto result = new RegisterTMRequestProto(this); + if (abstractIdentifyRequestBuilder_ == null) { + result.abstractIdentifyRequest_ = abstractIdentifyRequest_; + } else { + result.abstractIdentifyRequest_ = abstractIdentifyRequestBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof RegisterTMRequestProto) { + return mergeFrom((RegisterTMRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(RegisterTMRequestProto other) { + if (other == RegisterTMRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractIdentifyRequest()) { + mergeAbstractIdentifyRequest(other.getAbstractIdentifyRequest()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + RegisterTMRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (RegisterTMRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractIdentifyRequestProto abstractIdentifyRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder> abstractIdentifyRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return Whether the abstractIdentifyRequest field is set. + */ + public boolean hasAbstractIdentifyRequest() { + return abstractIdentifyRequestBuilder_ != null || abstractIdentifyRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return The abstractIdentifyRequest. + */ + public AbstractIdentifyRequestProto getAbstractIdentifyRequest() { + if (abstractIdentifyRequestBuilder_ == null) { + return abstractIdentifyRequest_ == null ? AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; + } else { + return abstractIdentifyRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public Builder setAbstractIdentifyRequest(AbstractIdentifyRequestProto value) { + if (abstractIdentifyRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractIdentifyRequest_ = value; + onChanged(); + } else { + abstractIdentifyRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public Builder setAbstractIdentifyRequest( + AbstractIdentifyRequestProto.Builder builderForValue) { + if (abstractIdentifyRequestBuilder_ == null) { + abstractIdentifyRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractIdentifyRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public Builder mergeAbstractIdentifyRequest(AbstractIdentifyRequestProto value) { + if (abstractIdentifyRequestBuilder_ == null) { + if (abstractIdentifyRequest_ != null) { + abstractIdentifyRequest_ = + AbstractIdentifyRequestProto.newBuilder(abstractIdentifyRequest_).mergeFrom(value).buildPartial(); + } else { + abstractIdentifyRequest_ = value; + } + onChanged(); + } else { + abstractIdentifyRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public Builder clearAbstractIdentifyRequest() { + if (abstractIdentifyRequestBuilder_ == null) { + abstractIdentifyRequest_ = null; + onChanged(); + } else { + abstractIdentifyRequest_ = null; + abstractIdentifyRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public AbstractIdentifyRequestProto.Builder getAbstractIdentifyRequestBuilder() { + + onChanged(); + return getAbstractIdentifyRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + public AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { + if (abstractIdentifyRequestBuilder_ != null) { + return abstractIdentifyRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractIdentifyRequest_ == null ? + AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder> + getAbstractIdentifyRequestFieldBuilder() { + if (abstractIdentifyRequestBuilder_ == null) { + abstractIdentifyRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder>( + getAbstractIdentifyRequest(), + getParentForChildren(), + isClean()); + abstractIdentifyRequest_ = null; + } + return abstractIdentifyRequestBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) + private static final RegisterTMRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new RegisterTMRequestProto(); + } + + public static RegisterTMRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public RegisterTMRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RegisterTMRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public RegisterTMRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProtoOrBuilder.java new file mode 100644 index 00000000000..0c2284ad14d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerTMRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface RegisterTMRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return Whether the abstractIdentifyRequest field is set. + */ + boolean hasAbstractIdentifyRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + * @return The abstractIdentifyRequest. + */ + AbstractIdentifyRequestProto getAbstractIdentifyRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + */ + AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponse.java new file mode 100644 index 00000000000..08d8871964a --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponse.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerTMResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class RegisterTMResponse { + private RegisterTMResponse() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\030registerTMResponse.proto\022\"org.apache.s" + + "eata.protocol.protobuf\032\036abstractIdentify" + + "Response.proto\"~\n\027RegisterTMResponseProt" + + "o\022c\n\030abstractIdentifyResponse\030\001 \001(\0132A.or" + + "g.apache.seata.protocol.protobuf.Abstrac" + + "tIdentifyResponseProtoBK\n3org.apache.sea" + + "ta.core.serializer.protobuf.generatedB\022R" + + "egisterTMResponseP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractIdentifyResponse.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor, + new String[] { "AbstractIdentifyResponse", }); + AbstractIdentifyResponse.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProto.java new file mode 100644 index 00000000000..341f8cdb824 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProto.java @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerTMResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterTMResponseProto} + */ +public final class RegisterTMResponseProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) + RegisterTMResponseProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use RegisterTMResponseProto.newBuilder() to construct. + private RegisterTMResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RegisterTMResponseProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new RegisterTMResponseProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RegisterTMResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractIdentifyResponseProto.Builder subBuilder = null; + if (abstractIdentifyResponse_ != null) { + subBuilder = abstractIdentifyResponse_.toBuilder(); + } + abstractIdentifyResponse_ = input.readMessage(AbstractIdentifyResponseProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractIdentifyResponse_); + abstractIdentifyResponse_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + RegisterTMResponseProto.class, Builder.class); + } + + public static final int ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER = 1; + private AbstractIdentifyResponseProto abstractIdentifyResponse_; + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return Whether the abstractIdentifyResponse field is set. + */ + @Override + public boolean hasAbstractIdentifyResponse() { + return abstractIdentifyResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return The abstractIdentifyResponse. + */ + @Override + public AbstractIdentifyResponseProto getAbstractIdentifyResponse() { + return abstractIdentifyResponse_ == null ? AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + @Override + public AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { + return getAbstractIdentifyResponse(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractIdentifyResponse_ != null) { + output.writeMessage(1, getAbstractIdentifyResponse()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractIdentifyResponse_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractIdentifyResponse()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof RegisterTMResponseProto)) { + return super.equals(obj); + } + RegisterTMResponseProto other = (RegisterTMResponseProto) obj; + + if (hasAbstractIdentifyResponse() != other.hasAbstractIdentifyResponse()) return false; + if (hasAbstractIdentifyResponse()) { + if (!getAbstractIdentifyResponse() + .equals(other.getAbstractIdentifyResponse())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractIdentifyResponse()) { + hash = (37 * hash) + ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getAbstractIdentifyResponse().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static RegisterTMResponseProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterTMResponseProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterTMResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterTMResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterTMResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static RegisterTMResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static RegisterTMResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static RegisterTMResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static RegisterTMResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static RegisterTMResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static RegisterTMResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static RegisterTMResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(RegisterTMResponseProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterTMResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) + RegisterTMResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + RegisterTMResponseProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.RegisterTMResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractIdentifyResponseBuilder_ == null) { + abstractIdentifyResponse_ = null; + } else { + abstractIdentifyResponse_ = null; + abstractIdentifyResponseBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; + } + + @Override + public RegisterTMResponseProto getDefaultInstanceForType() { + return RegisterTMResponseProto.getDefaultInstance(); + } + + @Override + public RegisterTMResponseProto build() { + RegisterTMResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public RegisterTMResponseProto buildPartial() { + RegisterTMResponseProto result = new RegisterTMResponseProto(this); + if (abstractIdentifyResponseBuilder_ == null) { + result.abstractIdentifyResponse_ = abstractIdentifyResponse_; + } else { + result.abstractIdentifyResponse_ = abstractIdentifyResponseBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof RegisterTMResponseProto) { + return mergeFrom((RegisterTMResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(RegisterTMResponseProto other) { + if (other == RegisterTMResponseProto.getDefaultInstance()) return this; + if (other.hasAbstractIdentifyResponse()) { + mergeAbstractIdentifyResponse(other.getAbstractIdentifyResponse()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + RegisterTMResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (RegisterTMResponseProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractIdentifyResponseProto abstractIdentifyResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder> abstractIdentifyResponseBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return Whether the abstractIdentifyResponse field is set. + */ + public boolean hasAbstractIdentifyResponse() { + return abstractIdentifyResponseBuilder_ != null || abstractIdentifyResponse_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return The abstractIdentifyResponse. + */ + public AbstractIdentifyResponseProto getAbstractIdentifyResponse() { + if (abstractIdentifyResponseBuilder_ == null) { + return abstractIdentifyResponse_ == null ? AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; + } else { + return abstractIdentifyResponseBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public Builder setAbstractIdentifyResponse(AbstractIdentifyResponseProto value) { + if (abstractIdentifyResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractIdentifyResponse_ = value; + onChanged(); + } else { + abstractIdentifyResponseBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public Builder setAbstractIdentifyResponse( + AbstractIdentifyResponseProto.Builder builderForValue) { + if (abstractIdentifyResponseBuilder_ == null) { + abstractIdentifyResponse_ = builderForValue.build(); + onChanged(); + } else { + abstractIdentifyResponseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public Builder mergeAbstractIdentifyResponse(AbstractIdentifyResponseProto value) { + if (abstractIdentifyResponseBuilder_ == null) { + if (abstractIdentifyResponse_ != null) { + abstractIdentifyResponse_ = + AbstractIdentifyResponseProto.newBuilder(abstractIdentifyResponse_).mergeFrom(value).buildPartial(); + } else { + abstractIdentifyResponse_ = value; + } + onChanged(); + } else { + abstractIdentifyResponseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public Builder clearAbstractIdentifyResponse() { + if (abstractIdentifyResponseBuilder_ == null) { + abstractIdentifyResponse_ = null; + onChanged(); + } else { + abstractIdentifyResponse_ = null; + abstractIdentifyResponseBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public AbstractIdentifyResponseProto.Builder getAbstractIdentifyResponseBuilder() { + + onChanged(); + return getAbstractIdentifyResponseFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + public AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { + if (abstractIdentifyResponseBuilder_ != null) { + return abstractIdentifyResponseBuilder_.getMessageOrBuilder(); + } else { + return abstractIdentifyResponse_ == null ? + AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder> + getAbstractIdentifyResponseFieldBuilder() { + if (abstractIdentifyResponseBuilder_ == null) { + abstractIdentifyResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder>( + getAbstractIdentifyResponse(), + getParentForChildren(), + isClean()); + abstractIdentifyResponse_ = null; + } + return abstractIdentifyResponseBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) + private static final RegisterTMResponseProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new RegisterTMResponseProto(); + } + + public static RegisterTMResponseProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public RegisterTMResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RegisterTMResponseProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public RegisterTMResponseProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProtoOrBuilder.java new file mode 100644 index 00000000000..0681423a25d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProtoOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: registerTMResponse.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface RegisterTMResponseProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return Whether the abstractIdentifyResponse field is set. + */ + boolean hasAbstractIdentifyResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + * @return The abstractIdentifyResponse. + */ + AbstractIdentifyResponseProto getAbstractIdentifyResponse(); + /** + * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; + */ + AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder(); +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCode.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCode.java new file mode 100644 index 00000000000..e0e672a4c1e --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCode.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: resultCode.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class ResultCode { + private ResultCode() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\020resultCode.proto\022\"org.apache.seata.pro" + + "tocol.protobuf**\n\017ResultCodeProto\022\n\n\006Fai" + + "led\020\000\022\013\n\007Success\020\001BC\n3org.apache.seata.c" + + "ore.serializer.protobuf.generatedB\nResul" + + "tCodeP\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCodeProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCodeProto.java new file mode 100644 index 00000000000..e2a8ba7e049 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCodeProto.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: resultCode.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf enum {@code org.apache.seata.protocol.protobuf.ResultCodeProto} + */ +public enum ResultCodeProto + implements com.google.protobuf.ProtocolMessageEnum { + /** + * Failed = 0; + */ + Failed(0), + /** + * Success = 1; + */ + Success(1), + UNRECOGNIZED(-1), + ; + + /** + * Failed = 0; + */ + public static final int Failed_VALUE = 0; + /** + * Success = 1; + */ + public static final int Success_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static ResultCodeProto valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ResultCodeProto forNumber(int value) { + switch (value) { + case 0: return Failed; + case 1: return Success; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ResultCodeProto> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ResultCodeProto findValueByNumber(int number) { + return ResultCodeProto.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return ResultCode.getDescriptor().getEnumTypes().get(0); + } + + private static final ResultCodeProto[] VALUES = values(); + + public static ResultCodeProto valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ResultCodeProto(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.ResultCodeProto) +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCode.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCode.java new file mode 100644 index 00000000000..6e97b12dead --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCode.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: transactionExceptionCode.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class TransactionExceptionCode { + private TransactionExceptionCode() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\036transactionExceptionCode.proto\022\"org.ap" + + "ache.seata.protocol.protobuf*\215\004\n\035Transac" + + "tionExceptionCodeProto\022\013\n\007Unknown\020\000\022\023\n\017L" + + "ockKeyConflict\020\001\022\006\n\002IO\020\002\022\"\n\036BranchRollba" + + "ckFailed_Retriable\020\003\022$\n BranchRollbackFa" + + "iled_Unretriable\020\004\022\030\n\024BranchRegisterFail" + + "ed\020\005\022\026\n\022BranchReportFailed\020\006\022\027\n\023Lockable" + + "CheckFailed\020\007\022\035\n\031BranchTransactionNotExi" + + "st\020\010\022\035\n\031GlobalTransactionNotExist\020\t\022\036\n\032G" + + "lobalTransactionNotActive\020\n\022\"\n\036GlobalTra" + + "nsactionStatusInvalid\020\013\022#\n\037FailedToSendB" + + "ranchCommitRequest\020\014\022%\n!FailedToSendBran" + + "chRollbackRequest\020\r\022\025\n\021FailedToAddBranch" + + "\020\016\022\037\n\033FailedLockGlobalTranscation\020\017\022\026\n\022F" + + "ailedWriteSession\020\020\022\017\n\013FailedStore\020\021BQ\n3" + + "org.apache.seata.core.serializer.protobu" + + "f.generatedB\030TransactionExceptionCodeP\001b" + + "\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCodeProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCodeProto.java new file mode 100644 index 00000000000..cd663ba4c4e --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCodeProto.java @@ -0,0 +1,381 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: transactionExceptionCode.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf enum {@code org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto} + */ +public enum TransactionExceptionCodeProto + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * 
+ * + * Unknown = 0; + */ + Unknown(0), + /** + *
+   * 
+ * + * LockKeyConflict = 1; + */ + LockKeyConflict(1), + /** + *
+   * 
+ * + * IO = 2; + */ + IO(2), + /** + *
+   * 
+ * + * BranchRollbackFailed_Retriable = 3; + */ + BranchRollbackFailed_Retriable(3), + /** + *
+   * 
+ * + * BranchRollbackFailed_Unretriable = 4; + */ + BranchRollbackFailed_Unretriable(4), + /** + *
+   * 
+ * + * BranchRegisterFailed = 5; + */ + BranchRegisterFailed(5), + /** + *
+   * 
+ * + * BranchReportFailed = 6; + */ + BranchReportFailed(6), + /** + *
+   * 
+ * + * LockableCheckFailed = 7; + */ + LockableCheckFailed(7), + /** + *
+   * 
+ * + * BranchTransactionNotExist = 8; + */ + BranchTransactionNotExist(8), + /** + *
+   * 
+ * + * GlobalTransactionNotExist = 9; + */ + GlobalTransactionNotExist(9), + /** + *
+   * 
+ * + * GlobalTransactionNotActive = 10; + */ + GlobalTransactionNotActive(10), + /** + *
+   * 
+ * + * GlobalTransactionStatusInvalid = 11; + */ + GlobalTransactionStatusInvalid(11), + /** + *
+   * 
+ * + * FailedToSendBranchCommitRequest = 12; + */ + FailedToSendBranchCommitRequest(12), + /** + *
+   * 
+ * + * FailedToSendBranchRollbackRequest = 13; + */ + FailedToSendBranchRollbackRequest(13), + /** + *
+   * 
+ * + * FailedToAddBranch = 14; + */ + FailedToAddBranch(14), + /** + *
+   **
+   *  Failed to lock global transaction exception code.
+   * 
+ * + * FailedLockGlobalTranscation = 15; + */ + FailedLockGlobalTranscation(15), + /** + *
+   **
+   * FailedWriteSession
+   * 
+ * + * FailedWriteSession = 16; + */ + FailedWriteSession(16), + /** + *
+   **
+   * FailedStore
+   * 
+ * + * FailedStore = 17; + */ + FailedStore(17), + UNRECOGNIZED(-1), + ; + + /** + *
+   * 
+ * + * Unknown = 0; + */ + public static final int Unknown_VALUE = 0; + /** + *
+   * 
+ * + * LockKeyConflict = 1; + */ + public static final int LockKeyConflict_VALUE = 1; + /** + *
+   * 
+ * + * IO = 2; + */ + public static final int IO_VALUE = 2; + /** + *
+   * 
+ * + * BranchRollbackFailed_Retriable = 3; + */ + public static final int BranchRollbackFailed_Retriable_VALUE = 3; + /** + *
+   * 
+ * + * BranchRollbackFailed_Unretriable = 4; + */ + public static final int BranchRollbackFailed_Unretriable_VALUE = 4; + /** + *
+   * 
+ * + * BranchRegisterFailed = 5; + */ + public static final int BranchRegisterFailed_VALUE = 5; + /** + *
+   * 
+ * + * BranchReportFailed = 6; + */ + public static final int BranchReportFailed_VALUE = 6; + /** + *
+   * 
+ * + * LockableCheckFailed = 7; + */ + public static final int LockableCheckFailed_VALUE = 7; + /** + *
+   * 
+ * + * BranchTransactionNotExist = 8; + */ + public static final int BranchTransactionNotExist_VALUE = 8; + /** + *
+   * 
+ * + * GlobalTransactionNotExist = 9; + */ + public static final int GlobalTransactionNotExist_VALUE = 9; + /** + *
+   * 
+ * + * GlobalTransactionNotActive = 10; + */ + public static final int GlobalTransactionNotActive_VALUE = 10; + /** + *
+   * 
+ * + * GlobalTransactionStatusInvalid = 11; + */ + public static final int GlobalTransactionStatusInvalid_VALUE = 11; + /** + *
+   * 
+ * + * FailedToSendBranchCommitRequest = 12; + */ + public static final int FailedToSendBranchCommitRequest_VALUE = 12; + /** + *
+   * 
+ * + * FailedToSendBranchRollbackRequest = 13; + */ + public static final int FailedToSendBranchRollbackRequest_VALUE = 13; + /** + *
+   * 
+ * + * FailedToAddBranch = 14; + */ + public static final int FailedToAddBranch_VALUE = 14; + /** + *
+   **
+   *  Failed to lock global transaction exception code.
+   * 
+ * + * FailedLockGlobalTranscation = 15; + */ + public static final int FailedLockGlobalTranscation_VALUE = 15; + /** + *
+   **
+   * FailedWriteSession
+   * 
+ * + * FailedWriteSession = 16; + */ + public static final int FailedWriteSession_VALUE = 16; + /** + *
+   **
+   * FailedStore
+   * 
+ * + * FailedStore = 17; + */ + public static final int FailedStore_VALUE = 17; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static TransactionExceptionCodeProto valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransactionExceptionCodeProto forNumber(int value) { + switch (value) { + case 0: return Unknown; + case 1: return LockKeyConflict; + case 2: return IO; + case 3: return BranchRollbackFailed_Retriable; + case 4: return BranchRollbackFailed_Unretriable; + case 5: return BranchRegisterFailed; + case 6: return BranchReportFailed; + case 7: return LockableCheckFailed; + case 8: return BranchTransactionNotExist; + case 9: return GlobalTransactionNotExist; + case 10: return GlobalTransactionNotActive; + case 11: return GlobalTransactionStatusInvalid; + case 12: return FailedToSendBranchCommitRequest; + case 13: return FailedToSendBranchRollbackRequest; + case 14: return FailedToAddBranch; + case 15: return FailedLockGlobalTranscation; + case 16: return FailedWriteSession; + case 17: return FailedStore; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TransactionExceptionCodeProto> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransactionExceptionCodeProto findValueByNumber(int number) { + return TransactionExceptionCodeProto.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return TransactionExceptionCode.getDescriptor().getEnumTypes().get(0); + } + + private static final TransactionExceptionCodeProto[] VALUES = values(); + + public static TransactionExceptionCodeProto valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TransactionExceptionCodeProto(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto) +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequest.java new file mode 100644 index 00000000000..526493de53d --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequest.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: undoLogDeleteRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public final class UndoLogDeleteRequest { + private UndoLogDeleteRequest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\032undoLogDeleteRequest.proto\022\"org.apache" + + ".seata.protocol.protobuf\032 abstractTransa" + + "ctionRequest.proto\032\020branchType.proto\"\363\001\n" + + "\031UndoLogDeleteRequestProto\022g\n\032abstractTr" + + "ansactionRequest\030\001 \001(\0132C.org.apache.seat" + + "a.protocol.protobuf.AbstractTransactionR" + + "equestProto\022\022\n\nresourceId\030\002 \001(\t\022\020\n\010saveD" + + "ays\030\003 \001(\005\022G\n\nbranchType\030\004 \001(\01623.org.apac" + + "he.seata.protocol.protobuf.BranchTypePro" + + "toBM\n3org.apache.seata.core.serializer.p" + + "rotobuf.generatedB\024UndoLogDeleteRequestP" + + "\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + AbstractTransactionRequest.getDescriptor(), + BranchType.getDescriptor(), + }); + internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor, + new String[] { "AbstractTransactionRequest", "ResourceId", "SaveDays", "BranchType", }); + AbstractTransactionRequest.getDescriptor(); + BranchType.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProto.java new file mode 100644 index 00000000000..5caeda30a70 --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProto.java @@ -0,0 +1,1005 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: undoLogDeleteRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +/** + *
+ * PublishRequest is a publish request.
+ * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto} + */ +public final class UndoLogDeleteRequestProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) + UndoLogDeleteRequestProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use UndoLogDeleteRequestProto.newBuilder() to construct. + private UndoLogDeleteRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UndoLogDeleteRequestProto() { + resourceId_ = ""; + branchType_ = 0; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new UndoLogDeleteRequestProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UndoLogDeleteRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + AbstractTransactionRequestProto.Builder subBuilder = null; + if (abstractTransactionRequest_ != null) { + subBuilder = abstractTransactionRequest_.toBuilder(); + } + abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(abstractTransactionRequest_); + abstractTransactionRequest_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + String s = input.readStringRequireUtf8(); + + resourceId_ = s; + break; + } + case 24: { + + saveDays_ = input.readInt32(); + break; + } + case 32: { + int rawValue = input.readEnum(); + + branchType_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + UndoLogDeleteRequestProto.class, Builder.class); + } + + public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; + private AbstractTransactionRequestProto abstractTransactionRequest_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + @Override + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + @Override + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + @Override + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + return getAbstractTransactionRequest(); + } + + public static final int RESOURCEID_FIELD_NUMBER = 2; + private volatile Object resourceId_; + /** + *
+   **
+   * The Resource id.
+   * 
+ * + * string resourceId = 2; + * @return The resourceId. + */ + @Override + public String getResourceId() { + Object ref = resourceId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } + } + /** + *
+   **
+   * The Resource id.
+   * 
+ * + * string resourceId = 2; + * @return The bytes for resourceId. + */ + @Override + public com.google.protobuf.ByteString + getResourceIdBytes() { + Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SAVEDAYS_FIELD_NUMBER = 3; + private int saveDays_; + /** + *
+   **
+   * The SaveDays data.
+   * 
+ * + * int32 saveDays = 3; + * @return The saveDays. + */ + @Override + public int getSaveDays() { + return saveDays_; + } + + public static final int BRANCHTYPE_FIELD_NUMBER = 4; + private int branchType_; + /** + *
+   **
+   * The Branch type.
+   * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The enum numeric value on the wire for branchType. + */ + @Override public int getBranchTypeValue() { + return branchType_; + } + /** + *
+   **
+   * The Branch type.
+   * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The branchType. + */ + @Override public BranchTypeProto getBranchType() { + @SuppressWarnings("deprecation") + BranchTypeProto result = BranchTypeProto.valueOf(branchType_); + return result == null ? BranchTypeProto.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (abstractTransactionRequest_ != null) { + output.writeMessage(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceId_); + } + if (saveDays_ != 0) { + output.writeInt32(3, saveDays_); + } + if (branchType_ != BranchTypeProto.AT.getNumber()) { + output.writeEnum(4, branchType_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (abstractTransactionRequest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAbstractTransactionRequest()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceId_); + } + if (saveDays_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, saveDays_); + } + if (branchType_ != BranchTypeProto.AT.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, branchType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof UndoLogDeleteRequestProto)) { + return super.equals(obj); + } + UndoLogDeleteRequestProto other = (UndoLogDeleteRequestProto) obj; + + if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; + if (hasAbstractTransactionRequest()) { + if (!getAbstractTransactionRequest() + .equals(other.getAbstractTransactionRequest())) return false; + } + if (!getResourceId() + .equals(other.getResourceId())) return false; + if (getSaveDays() + != other.getSaveDays()) return false; + if (branchType_ != other.branchType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAbstractTransactionRequest()) { + hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); + } + hash = (37 * hash) + RESOURCEID_FIELD_NUMBER; + hash = (53 * hash) + getResourceId().hashCode(); + hash = (37 * hash) + SAVEDAYS_FIELD_NUMBER; + hash = (53 * hash) + getSaveDays(); + hash = (37 * hash) + BRANCHTYPE_FIELD_NUMBER; + hash = (53 * hash) + branchType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static UndoLogDeleteRequestProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static UndoLogDeleteRequestProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static UndoLogDeleteRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static UndoLogDeleteRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static UndoLogDeleteRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static UndoLogDeleteRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static UndoLogDeleteRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static UndoLogDeleteRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static UndoLogDeleteRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static UndoLogDeleteRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static UndoLogDeleteRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static UndoLogDeleteRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(UndoLogDeleteRequestProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * PublishRequest is a publish request.
+   * 
+ * + * Protobuf type {@code org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) + UndoLogDeleteRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + UndoLogDeleteRequestProto.class, Builder.class); + } + + // Construct using org.apache.seata.core.serializer.protobuf.generated.UndoLogDeleteRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + resourceId_ = ""; + + saveDays_ = 0; + + branchType_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; + } + + @Override + public UndoLogDeleteRequestProto getDefaultInstanceForType() { + return UndoLogDeleteRequestProto.getDefaultInstance(); + } + + @Override + public UndoLogDeleteRequestProto build() { + UndoLogDeleteRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public UndoLogDeleteRequestProto buildPartial() { + UndoLogDeleteRequestProto result = new UndoLogDeleteRequestProto(this); + if (abstractTransactionRequestBuilder_ == null) { + result.abstractTransactionRequest_ = abstractTransactionRequest_; + } else { + result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); + } + result.resourceId_ = resourceId_; + result.saveDays_ = saveDays_; + result.branchType_ = branchType_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof UndoLogDeleteRequestProto) { + return mergeFrom((UndoLogDeleteRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(UndoLogDeleteRequestProto other) { + if (other == UndoLogDeleteRequestProto.getDefaultInstance()) return this; + if (other.hasAbstractTransactionRequest()) { + mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); + } + if (!other.getResourceId().isEmpty()) { + resourceId_ = other.resourceId_; + onChanged(); + } + if (other.getSaveDays() != 0) { + setSaveDays(other.getSaveDays()); + } + if (other.branchType_ != 0) { + setBranchTypeValue(other.getBranchTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + UndoLogDeleteRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (UndoLogDeleteRequestProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private AbstractTransactionRequestProto abstractTransactionRequest_; + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + public boolean hasAbstractTransactionRequest() { + return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + public AbstractTransactionRequestProto getAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } else { + return abstractTransactionRequestBuilder_.getMessage(); + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + abstractTransactionRequest_ = value; + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder setAbstractTransactionRequest( + AbstractTransactionRequestProto.Builder builderForValue) { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = builderForValue.build(); + onChanged(); + } else { + abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { + if (abstractTransactionRequestBuilder_ == null) { + if (abstractTransactionRequest_ != null) { + abstractTransactionRequest_ = + AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); + } else { + abstractTransactionRequest_ = value; + } + onChanged(); + } else { + abstractTransactionRequestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public Builder clearAbstractTransactionRequest() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequest_ = null; + onChanged(); + } else { + abstractTransactionRequest_ = null; + abstractTransactionRequestBuilder_ = null; + } + + return this; + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { + + onChanged(); + return getAbstractTransactionRequestFieldBuilder().getBuilder(); + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { + if (abstractTransactionRequestBuilder_ != null) { + return abstractTransactionRequestBuilder_.getMessageOrBuilder(); + } else { + return abstractTransactionRequest_ == null ? + AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; + } + } + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> + getAbstractTransactionRequestFieldBuilder() { + if (abstractTransactionRequestBuilder_ == null) { + abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( + getAbstractTransactionRequest(), + getParentForChildren(), + isClean()); + abstractTransactionRequest_ = null; + } + return abstractTransactionRequestBuilder_; + } + + private Object resourceId_ = ""; + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 2; + * @return The resourceId. + */ + public String getResourceId() { + Object ref = resourceId_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + resourceId_ = s; + return s; + } else { + return (String) ref; + } + } + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 2; + * @return The bytes for resourceId. + */ + public com.google.protobuf.ByteString + getResourceIdBytes() { + Object ref = resourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + resourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 2; + * @param value The resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceId( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceId_ = value; + onChanged(); + return this; + } + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 2; + * @return This builder for chaining. + */ + public Builder clearResourceId() { + + resourceId_ = getDefaultInstance().getResourceId(); + onChanged(); + return this; + } + /** + *
+     **
+     * The Resource id.
+     * 
+ * + * string resourceId = 2; + * @param value The bytes for resourceId to set. + * @return This builder for chaining. + */ + public Builder setResourceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceId_ = value; + onChanged(); + return this; + } + + private int saveDays_ ; + /** + *
+     **
+     * The SaveDays data.
+     * 
+ * + * int32 saveDays = 3; + * @return The saveDays. + */ + @Override + public int getSaveDays() { + return saveDays_; + } + /** + *
+     **
+     * The SaveDays data.
+     * 
+ * + * int32 saveDays = 3; + * @param value The saveDays to set. + * @return This builder for chaining. + */ + public Builder setSaveDays(int value) { + + saveDays_ = value; + onChanged(); + return this; + } + /** + *
+     **
+     * The SaveDays data.
+     * 
+ * + * int32 saveDays = 3; + * @return This builder for chaining. + */ + public Builder clearSaveDays() { + + saveDays_ = 0; + onChanged(); + return this; + } + + private int branchType_ = 0; + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The enum numeric value on the wire for branchType. + */ + @Override public int getBranchTypeValue() { + return branchType_; + } + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @param value The enum numeric value on the wire for branchType to set. + * @return This builder for chaining. + */ + public Builder setBranchTypeValue(int value) { + + branchType_ = value; + onChanged(); + return this; + } + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The branchType. + */ + @Override + public BranchTypeProto getBranchType() { + @SuppressWarnings("deprecation") + BranchTypeProto result = BranchTypeProto.valueOf(branchType_); + return result == null ? BranchTypeProto.UNRECOGNIZED : result; + } + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @param value The branchType to set. + * @return This builder for chaining. + */ + public Builder setBranchType(BranchTypeProto value) { + if (value == null) { + throw new NullPointerException(); + } + + branchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     **
+     * The Branch type.
+     * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return This builder for chaining. + */ + public Builder clearBranchType() { + + branchType_ = 0; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) + private static final UndoLogDeleteRequestProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new UndoLogDeleteRequestProto(); + } + + public static UndoLogDeleteRequestProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public UndoLogDeleteRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndoLogDeleteRequestProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public UndoLogDeleteRequestProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java new file mode 100644 index 00000000000..9799076d6cc --- /dev/null +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: undoLogDeleteRequest.proto + +package org.apache.seata.core.serializer.protobuf.generated; + +public interface UndoLogDeleteRequestProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) + com.google.protobuf.MessageOrBuilder { + + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return Whether the abstractTransactionRequest field is set. + */ + boolean hasAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + * @return The abstractTransactionRequest. + */ + AbstractTransactionRequestProto getAbstractTransactionRequest(); + /** + * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; + */ + AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); + + /** + *
+   **
+   * The Resource id.
+   * 
+ * + * string resourceId = 2; + * @return The resourceId. + */ + String getResourceId(); + /** + *
+   **
+   * The Resource id.
+   * 
+ * + * string resourceId = 2; + * @return The bytes for resourceId. + */ + com.google.protobuf.ByteString + getResourceIdBytes(); + + /** + *
+   **
+   * The SaveDays data.
+   * 
+ * + * int32 saveDays = 3; + * @return The saveDays. + */ + int getSaveDays(); + + /** + *
+   **
+   * The Branch type.
+   * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The enum numeric value on the wire for branchType. + */ + int getBranchTypeValue(); + /** + *
+   **
+   * The Branch type.
+   * 
+ * + * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; + * @return The branchType. + */ + BranchTypeProto getBranchType(); +} diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/manager/ProtobufConvertManager.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/manager/ProtobufConvertManager.java similarity index 76% rename from serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/manager/ProtobufConvertManager.java rename to core/src/main/java/org/apache/seata/core/serializer/protobuf/manager/ProtobufConvertManager.java index 4ce861b155a..cfea2925e9a 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/manager/ProtobufConvertManager.java +++ b/core/src/main/java/org/apache/seata/core/serializer/protobuf/manager/ProtobufConvertManager.java @@ -14,41 +14,41 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.manager; +package org.apache.seata.core.serializer.protobuf.manager; import org.apache.seata.core.protocol.BatchResultMessage; -import org.apache.seata.serializer.protobuf.convertor.BatchResultMessageConvertor; -import org.apache.seata.serializer.protobuf.convertor.BranchCommitRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.BranchCommitResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.BranchRegisterRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.BranchRegisterResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.BranchReportRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.BranchReportResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.BranchRollbackRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.BranchRollbackResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalBeginRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalBeginResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalCommitRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalCommitResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalLockQueryRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalLockQueryResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalReportRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalReportResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalRollbackRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalRollbackResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalStatusRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.GlobalStatusResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.HeartbeatMessageConvertor; -import org.apache.seata.serializer.protobuf.convertor.MergeResultMessageConvertor; -import org.apache.seata.serializer.protobuf.convertor.MergedWarpMessageConvertor; -import org.apache.seata.serializer.protobuf.convertor.PbConvertor; -import org.apache.seata.serializer.protobuf.convertor.RegisterRMRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.RegisterRMResponseConvertor; -import org.apache.seata.serializer.protobuf.convertor.RegisterTMRequestConvertor; -import org.apache.seata.serializer.protobuf.convertor.RegisterTMResponseConvertor; -import org.apache.seata.serializer.protobuf.generated.BatchResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.GlobalReportRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalReportResponseProto; +import org.apache.seata.core.serializer.protobuf.convertor.BatchResultMessageConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.BranchCommitRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.BranchCommitResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.BranchRegisterRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.BranchRegisterResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.BranchReportRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.BranchReportResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.BranchRollbackRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.BranchRollbackResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalBeginRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalBeginResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalCommitRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalCommitResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalLockQueryRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalLockQueryResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalReportRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalReportResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalRollbackRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalRollbackResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalStatusRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.GlobalStatusResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.HeartbeatMessageConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.MergeResultMessageConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.MergedWarpMessageConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.PbConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.RegisterRMRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.RegisterRMResponseConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.RegisterTMRequestConvertor; +import org.apache.seata.core.serializer.protobuf.convertor.RegisterTMResponseConvertor; +import org.apache.seata.core.serializer.protobuf.generated.BatchResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalReportRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalReportResponseProto; import org.apache.seata.core.protocol.HeartbeatMessage; import org.apache.seata.core.protocol.MergeResultMessage; import org.apache.seata.core.protocol.MergedWarpMessage; @@ -56,33 +56,33 @@ import org.apache.seata.core.protocol.RegisterRMResponse; import org.apache.seata.core.protocol.RegisterTMRequest; import org.apache.seata.core.protocol.RegisterTMResponse; -import org.apache.seata.serializer.protobuf.convertor.UndoLogDeleteRequestConvertor; -import org.apache.seata.serializer.protobuf.generated.BranchCommitRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchCommitResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchRegisterRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchRegisterResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchReportRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchReportResponseProto; -import org.apache.seata.serializer.protobuf.generated.BranchRollbackRequestProto; -import org.apache.seata.serializer.protobuf.generated.BranchRollbackResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalBeginRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalBeginResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalCommitRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalCommitResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalRollbackRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalRollbackResponseProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusRequestProto; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusResponseProto; -import org.apache.seata.serializer.protobuf.generated.HeartbeatMessageProto; -import org.apache.seata.serializer.protobuf.generated.MergedResultMessageProto; -import org.apache.seata.serializer.protobuf.generated.MergedWarpMessageProto; -import org.apache.seata.serializer.protobuf.generated.RegisterRMRequestProto; -import org.apache.seata.serializer.protobuf.generated.RegisterRMResponseProto; -import org.apache.seata.serializer.protobuf.generated.RegisterTMRequestProto; -import org.apache.seata.serializer.protobuf.generated.RegisterTMResponseProto; -import org.apache.seata.serializer.protobuf.generated.UndoLogDeleteRequestProto; +import org.apache.seata.core.serializer.protobuf.convertor.UndoLogDeleteRequestConvertor; +import org.apache.seata.core.serializer.protobuf.generated.BranchCommitRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchCommitResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchReportRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchReportResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.HeartbeatMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MergedResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MergedWarpMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterRMRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterRMResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterTMResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.UndoLogDeleteRequestProto; import org.apache.seata.core.protocol.transaction.BranchCommitRequest; import org.apache.seata.core.protocol.transaction.BranchCommitResponse; import org.apache.seata.core.protocol.transaction.BranchRegisterRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto b/core/src/main/proto/abstractBranchEndRequest.proto similarity index 95% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto rename to core/src/main/proto/abstractBranchEndRequest.proto index b691f74e55c..bdd33937c49 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto +++ b/core/src/main/proto/abstractBranchEndRequest.proto @@ -23,7 +23,7 @@ import "branchType.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractBranchEndRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractBranchEndRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto b/core/src/main/proto/abstractBranchEndResponse.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto rename to core/src/main/proto/abstractBranchEndResponse.proto index 22b5f60b5b5..30edebede18 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto +++ b/core/src/main/proto/abstractBranchEndResponse.proto @@ -23,7 +23,7 @@ import "branchStatus.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractBranchEndResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractBranchEndResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto b/core/src/main/proto/abstractGlobalEndRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto rename to core/src/main/proto/abstractGlobalEndRequest.proto index 0523db0070e..16b560c1a20 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto +++ b/core/src/main/proto/abstractGlobalEndRequest.proto @@ -22,7 +22,7 @@ import "abstractTransactionRequest.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractGlobalEndRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractGlobalEndRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto b/core/src/main/proto/abstractGlobalEndResponse.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto rename to core/src/main/proto/abstractGlobalEndResponse.proto index 3d8107e8f35..57f319b0343 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto +++ b/core/src/main/proto/abstractGlobalEndResponse.proto @@ -23,7 +23,7 @@ import "globalStatus.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractGlobalEndResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractGlobalEndResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto b/core/src/main/proto/abstractIdentifyRequest.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto rename to core/src/main/proto/abstractIdentifyRequest.proto index bef0d19d8ed..f6bde34de64 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto +++ b/core/src/main/proto/abstractIdentifyRequest.proto @@ -22,7 +22,7 @@ import "abstractMessage.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractIdentifyRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractIdentifyRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto b/core/src/main/proto/abstractIdentifyResponse.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto rename to core/src/main/proto/abstractIdentifyResponse.proto index c2b80c900de..ad27d75289a 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto +++ b/core/src/main/proto/abstractIdentifyResponse.proto @@ -22,7 +22,7 @@ import "abstractResultMessage.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractIdentifyResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractIdentifyResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto b/core/src/main/proto/abstractMessage.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto rename to core/src/main/proto/abstractMessage.proto index 8ec011daf3f..68e217372c4 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto +++ b/core/src/main/proto/abstractMessage.proto @@ -22,7 +22,7 @@ import "messageType.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractMessageProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto b/core/src/main/proto/abstractResultMessage.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto rename to core/src/main/proto/abstractResultMessage.proto index a04f9b56dda..6882fe4136d 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto +++ b/core/src/main/proto/abstractResultMessage.proto @@ -22,7 +22,7 @@ import "resultCode.proto"; import "abstractMessage.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractResultMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractResultMessageProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto b/core/src/main/proto/abstractTransactionRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto rename to core/src/main/proto/abstractTransactionRequest.proto index a964917a20b..7651968cac1 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto +++ b/core/src/main/proto/abstractTransactionRequest.proto @@ -23,7 +23,7 @@ import "abstractMessage.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractTransactionRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractTransactionRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto b/core/src/main/proto/abstractTransactionResponse.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto rename to core/src/main/proto/abstractTransactionResponse.proto index a31caaa00bf..29b5f8e844c 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto +++ b/core/src/main/proto/abstractTransactionResponse.proto @@ -24,7 +24,7 @@ import "transactionExceptionCode.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractTransactionResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractTransactionResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto b/core/src/main/proto/batchResultMessage.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto rename to core/src/main/proto/batchResultMessage.proto index c36f75a7972..ceba6762973 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto +++ b/core/src/main/proto/batchResultMessage.proto @@ -23,7 +23,7 @@ import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "BatchResultMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message BatchResultMessageProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto b/core/src/main/proto/branchCommitRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto rename to core/src/main/proto/branchCommitRequest.proto index 1a2adbe630d..f1e92b41b73 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto +++ b/core/src/main/proto/branchCommitRequest.proto @@ -23,7 +23,7 @@ import "abstractBranchEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "BranchCommitRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchCommitRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto b/core/src/main/proto/branchCommitResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto rename to core/src/main/proto/branchCommitResponse.proto index 96070ab6a91..29c0027ec77 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto +++ b/core/src/main/proto/branchCommitResponse.proto @@ -23,7 +23,7 @@ import "abstractBranchEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "BranchCommitResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchCommitResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto b/core/src/main/proto/branchRegisterRequest.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto rename to core/src/main/proto/branchRegisterRequest.proto index d527d8b7843..803f9dac993 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto +++ b/core/src/main/proto/branchRegisterRequest.proto @@ -23,7 +23,7 @@ import "abstractTransactionRequest.proto"; option java_multiple_files = true; option java_outer_classname = "BranchRegisterRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchRegisterRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto b/core/src/main/proto/branchRegisterResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto rename to core/src/main/proto/branchRegisterResponse.proto index 7ce95f34d1f..23861306d2f 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto +++ b/core/src/main/proto/branchRegisterResponse.proto @@ -23,7 +23,7 @@ import "abstractTransactionResponse.proto"; option java_multiple_files = true; option java_outer_classname = "BranchRegisterResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchRegisterResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto b/core/src/main/proto/branchReportRequest.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto rename to core/src/main/proto/branchReportRequest.proto index 788454048ef..e83c36e63fb 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto +++ b/core/src/main/proto/branchReportRequest.proto @@ -25,7 +25,7 @@ import "abstractTransactionRequest.proto"; option java_multiple_files = true; option java_outer_classname = "BranchReportRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message BranchReportRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto b/core/src/main/proto/branchReportResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto rename to core/src/main/proto/branchReportResponse.proto index 42a29e47615..c51e555db2c 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto +++ b/core/src/main/proto/branchReportResponse.proto @@ -23,7 +23,7 @@ import "abstractTransactionResponse.proto"; option java_multiple_files = true; option java_outer_classname = "BranchReportResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message BranchReportResponseProto { AbstractTransactionResponseProto abstractTransactionResponse = 1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto b/core/src/main/proto/branchRollbackRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto rename to core/src/main/proto/branchRollbackRequest.proto index ca42def06d3..01ae58d428c 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto +++ b/core/src/main/proto/branchRollbackRequest.proto @@ -23,7 +23,7 @@ import "abstractBranchEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "BranchRollbackRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchRollbackRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto b/core/src/main/proto/branchRollbackResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto rename to core/src/main/proto/branchRollbackResponse.proto index 5c31966dda4..8eedcbe8aff 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto +++ b/core/src/main/proto/branchRollbackResponse.proto @@ -23,7 +23,7 @@ import "abstractBranchEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "BranchRollbackResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchRollbackResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto b/core/src/main/proto/branchStatus.proto similarity index 97% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto rename to core/src/main/proto/branchStatus.proto index 425b38d47fc..4f3ccd8feb1 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto +++ b/core/src/main/proto/branchStatus.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "BranchStatus"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. enum BranchStatusProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto b/core/src/main/proto/branchType.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto rename to core/src/main/proto/branchType.proto index dbe0a436199..acbde786e2a 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto +++ b/core/src/main/proto/branchType.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "BranchType"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. enum BranchTypeProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto b/core/src/main/proto/globalBeginRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto rename to core/src/main/proto/globalBeginRequest.proto index 828a1b3e24c..f08daed80dc 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto +++ b/core/src/main/proto/globalBeginRequest.proto @@ -23,7 +23,7 @@ import "abstractTransactionRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalBeginRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalBeginRequestProto { AbstractTransactionRequestProto abstractTransactionRequest=1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto b/core/src/main/proto/globalBeginResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto rename to core/src/main/proto/globalBeginResponse.proto index 5bdf87ecb83..e8b3c7db297 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto +++ b/core/src/main/proto/globalBeginResponse.proto @@ -23,7 +23,7 @@ import "abstractTransactionResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalBeginResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalBeginResponseProto { AbstractTransactionResponseProto abstractTransactionResponse =1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto b/core/src/main/proto/globalCommitRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto rename to core/src/main/proto/globalCommitRequest.proto index 0c1958156d6..9b9f15c4908 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto +++ b/core/src/main/proto/globalCommitRequest.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalCommitRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalCommitRequestProto { AbstractGlobalEndRequestProto abstractGlobalEndRequest =1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto b/core/src/main/proto/globalCommitResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto rename to core/src/main/proto/globalCommitResponse.proto index 650a2f3337d..473d010282b 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto +++ b/core/src/main/proto/globalCommitResponse.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalCommitResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalCommitResponseProto { AbstractGlobalEndResponseProto abstractGlobalEndResponse =1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto b/core/src/main/proto/globalLockQueryRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto rename to core/src/main/proto/globalLockQueryRequest.proto index 469147eca0f..f50d462c1b2 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto +++ b/core/src/main/proto/globalLockQueryRequest.proto @@ -22,7 +22,7 @@ import "branchRegisterRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalLockQueryRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalLockQueryRequestProto { BranchRegisterRequestProto branchRegisterRequest =1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto b/core/src/main/proto/globalLockQueryResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto rename to core/src/main/proto/globalLockQueryResponse.proto index e9b5fb5409a..9d2acc7b31a 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto +++ b/core/src/main/proto/globalLockQueryResponse.proto @@ -22,7 +22,7 @@ import "abstractTransactionResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalLockQueryResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalLockQueryResponseProto { AbstractTransactionResponseProto abstractTransactionResponse = 1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto b/core/src/main/proto/globalReportRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto rename to core/src/main/proto/globalReportRequest.proto index 64435f2049c..be1810e1fdc 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto +++ b/core/src/main/proto/globalReportRequest.proto @@ -23,7 +23,7 @@ import "globalStatus.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalReportRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalReportRequestProto { AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto b/core/src/main/proto/globalReportResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto rename to core/src/main/proto/globalReportResponse.proto index 3a5b5611aad..79ae2899602 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto +++ b/core/src/main/proto/globalReportResponse.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalReportResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalReportResponseProto { AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto b/core/src/main/proto/globalRollbackRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto rename to core/src/main/proto/globalRollbackRequest.proto index 2acdbdd99cf..2e1391d252e 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto +++ b/core/src/main/proto/globalRollbackRequest.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalRollbackRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalRollbackRequestProto { AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto b/core/src/main/proto/globalRollbackResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto rename to core/src/main/proto/globalRollbackResponse.proto index 78bb4d2b567..6d5591f63b5 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto +++ b/core/src/main/proto/globalRollbackResponse.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalRollbackResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalRollbackResponseProto { AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto b/core/src/main/proto/globalStatus.proto similarity index 97% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto rename to core/src/main/proto/globalStatus.proto index 9de4108f5b6..3a45f790511 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto +++ b/core/src/main/proto/globalStatus.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "GlobalStatus"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. enum GlobalStatusProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto b/core/src/main/proto/globalStatusRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto rename to core/src/main/proto/globalStatusRequest.proto index f267e6efeee..b538bcf020f 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto +++ b/core/src/main/proto/globalStatusRequest.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalStatusRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalStatusRequestProto { AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto b/core/src/main/proto/globalStatusResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto rename to core/src/main/proto/globalStatusResponse.proto index cf6def540fd..99e80844251 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto +++ b/core/src/main/proto/globalStatusResponse.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalStatusResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; message GlobalStatusResponseProto { AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; diff --git a/core/src/main/proto/grpcMessage.proto b/core/src/main/proto/grpcMessage.proto new file mode 100644 index 00000000000..3545853e359 --- /dev/null +++ b/core/src/main/proto/grpcMessage.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package org.apache.seata.core.protocol; +import "google/protobuf/any.proto"; +option java_multiple_files = true; +option java_outer_classname = "GrpcMessage"; +option java_package = "org.apache.seata.core.protocol.generated"; + +message GrpcMessageProto { + int32 id = 1; + int32 messageType = 2; + map headMap = 3; + google.protobuf.Any body = 4; +} + +service SeataService { + rpc sendRequest (stream GrpcMessageProto) returns (stream GrpcMessageProto); +} \ No newline at end of file diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto b/core/src/main/proto/heartbeatMessage.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto rename to core/src/main/proto/heartbeatMessage.proto index fec1e295213..a2690426897 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto +++ b/core/src/main/proto/heartbeatMessage.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "HeartbeatMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message HeartbeatMessageProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto b/core/src/main/proto/mergedResultMessage.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto rename to core/src/main/proto/mergedResultMessage.proto index 774fc69ce4a..1661fdc820f 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto +++ b/core/src/main/proto/mergedResultMessage.proto @@ -23,7 +23,7 @@ import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "MergedResultMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message MergedResultMessageProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto b/core/src/main/proto/mergedWarpMessage.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto rename to core/src/main/proto/mergedWarpMessage.proto index f84d5d31df8..9dd235633b6 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto +++ b/core/src/main/proto/mergedWarpMessage.proto @@ -23,7 +23,7 @@ import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "MergedWarpMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message MergedWarpMessageProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto b/core/src/main/proto/messageType.proto similarity index 97% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto rename to core/src/main/proto/messageType.proto index 754ce1173c0..4971b7acb52 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto +++ b/core/src/main/proto/messageType.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "MessageType"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. enum MessageTypeProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto b/core/src/main/proto/registerRMRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto rename to core/src/main/proto/registerRMRequest.proto index d4a3db78667..e3a95a8febb 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto +++ b/core/src/main/proto/registerRMRequest.proto @@ -22,7 +22,7 @@ import "abstractIdentifyRequest.proto"; option java_multiple_files = true; option java_outer_classname = "RegisterRMRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message RegisterRMRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto b/core/src/main/proto/registerRMResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto rename to core/src/main/proto/registerRMResponse.proto index 378f0a1ed2b..0eb63cc1188 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto +++ b/core/src/main/proto/registerRMResponse.proto @@ -22,7 +22,7 @@ import "abstractIdentifyResponse.proto"; option java_multiple_files = true; option java_outer_classname = "RegisterRMResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message RegisterRMResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto b/core/src/main/proto/registerTMRequest.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto rename to core/src/main/proto/registerTMRequest.proto index d18e1c41bce..56ffb30ee7b 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto +++ b/core/src/main/proto/registerTMRequest.proto @@ -22,7 +22,7 @@ import "abstractIdentifyRequest.proto"; option java_multiple_files = true; option java_outer_classname = "RegisterTMRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message RegisterTMRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto b/core/src/main/proto/registerTMResponse.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto rename to core/src/main/proto/registerTMResponse.proto index e8f354c20a0..ca8fc1a8cb4 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto +++ b/core/src/main/proto/registerTMResponse.proto @@ -22,7 +22,7 @@ import "abstractIdentifyResponse.proto"; option java_multiple_files = true; option java_outer_classname = "RegisterTMResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message RegisterTMResponseProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto b/core/src/main/proto/resultCode.proto similarity index 93% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto rename to core/src/main/proto/resultCode.proto index 4bd9ff3bd11..c0919e99478 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto +++ b/core/src/main/proto/resultCode.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "ResultCode"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. enum ResultCodeProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto b/core/src/main/proto/transactionExceptionCode.proto similarity index 97% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto rename to core/src/main/proto/transactionExceptionCode.proto index 6cb20b0905c..dbbbd441856 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto +++ b/core/src/main/proto/transactionExceptionCode.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "TransactionExceptionCode"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. enum TransactionExceptionCodeProto { diff --git a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto b/core/src/main/proto/undoLogDeleteRequest.proto similarity index 94% rename from serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto rename to core/src/main/proto/undoLogDeleteRequest.proto index 86624613096..2781348edfe 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto +++ b/core/src/main/proto/undoLogDeleteRequest.proto @@ -23,7 +23,7 @@ import "branchType.proto"; option java_multiple_files = true; option java_outer_classname = "UndoLogDeleteRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.serializer.protobuf.generated"; // PublishRequest is a publish request. message UndoLogDeleteRequestProto { diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 717ad14019c..61b23d61045 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -78,7 +78,7 @@ 4.0.3 1.6.7 - 3.16.3 + 3.21.12 1.27.1 5.4.0 0.45 diff --git a/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java b/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java deleted file mode 100644 index 20fdf4ee3c9..00000000000 --- a/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.integration.grpc.interceptor; - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Executor; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -import com.google.common.util.concurrent.ListenableFuture; -import io.grpc.ClientInterceptors; -import io.grpc.ManagedChannel; -import io.grpc.Metadata; -import io.grpc.ServerInterceptor; -import io.grpc.ServerInterceptors; -import io.grpc.inprocess.InProcessChannelBuilder; -import io.grpc.inprocess.InProcessServerBuilder; -import io.grpc.stub.StreamObserver; -import io.grpc.testing.GrpcCleanupRule; -import org.apache.seata.core.context.RootContext; -import org.apache.seata.core.model.BranchType; -import org.apache.seata.integration.grpc.interceptor.client.ClientTransactionInterceptor; -import org.apache.seata.integration.grpc.interceptor.proto.ContextRpcGrpc; -import org.apache.seata.integration.grpc.interceptor.proto.Request; -import org.apache.seata.integration.grpc.interceptor.proto.Response; -import org.apache.seata.integration.grpc.interceptor.server.ServerTransactionInterceptor; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.ArgumentMatchers; - -import static org.junit.Assert.assertEquals; -import static org.mockito.AdditionalAnswers.delegatesTo; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - - -public class GrpcTest { - - @Rule - public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule(); - private final ServerInterceptor mockServerInterceptor = mock(ServerInterceptor.class, delegatesTo(new ServerTransactionInterceptor())); - private final String XID="192.168.0.1:8091:10086"; - - - @Test - public void clientHeaderDeliveredToServer() throws Exception { - - String serverName = InProcessServerBuilder.generateName(); - CountDownLatch countDownLatch = new CountDownLatch(1); - String[] context = new String[]{null,null}; - - //executor - Executor executorService = new ThreadPoolExecutor(2, 2, 1, TimeUnit.HOURS, new LinkedBlockingQueue<>(), new ThreadFactory() { - @Override - public Thread newThread(Runnable r) { - return new Thread(r, "contextText-" + System.currentTimeMillis()); - } - }); - - //server - grpcCleanup.register(InProcessServerBuilder.forName(serverName).executor(executorService) - .addService(ServerInterceptors.intercept(new ContextRpcGrpc.ContextRpcImplBase() { - @Override - public void contextRpc(Request request, StreamObserver responseObserver) { - context[0] = RootContext.getXID(); - context[1] = RootContext.getBranchType().name(); - countDownLatch.countDown(); - responseObserver.onNext(Response.newBuilder().setGreet("hello! " + request.getName()).build()); - responseObserver.onCompleted(); - } - }, mockServerInterceptor)) - .build().start()); - - //client - ManagedChannel channel = grpcCleanup.register(InProcessChannelBuilder.forName(serverName).executor(executorService).build()); - ContextRpcGrpc.ContextRpcFutureStub stub = ContextRpcGrpc.newFutureStub( - ClientInterceptors.intercept(channel, new ClientTransactionInterceptor())); - RootContext.bind(XID); - RootContext.bindBranchType(BranchType.TCC); - ListenableFuture future = stub.contextRpc(Request.newBuilder().setName("seata").build()); - assertEquals("hello! seata", future.get().getGreet()); - - ArgumentCaptor metadataCaptor = ArgumentCaptor.forClass(Metadata.class); - verify(mockServerInterceptor).interceptCall(ArgumentMatchers.any(), metadataCaptor.capture(), ArgumentMatchers.any()); - assertEquals(XID, metadataCaptor.getValue().get(GrpcHeaderKey.XID_HEADER_KEY)); - assertEquals(BranchType.TCC.name(), metadataCaptor.getValue().get(GrpcHeaderKey.BRANCH_HEADER_KEY)); - - countDownLatch.await(); - assertEquals(XID, context[0]); - assertEquals(BranchType.TCC.name(), context[1]); - } -} diff --git a/pom.xml b/pom.xml index 0edf5b10600..1e5241c1ca2 100644 --- a/pom.xml +++ b/pom.xml @@ -75,6 +75,7 @@ ext/apm-seata-skywalking-plugin integration-tx-api namingserver + seata-test-grpc diff --git a/seata-test-grpc/org/apache/seata/grpc/generated/SeataServiceGrpc.java b/seata-test-grpc/org/apache/seata/grpc/generated/SeataServiceGrpc.java new file mode 100644 index 00000000000..e40d2a522a0 --- /dev/null +++ b/seata-test-grpc/org/apache/seata/grpc/generated/SeataServiceGrpc.java @@ -0,0 +1,272 @@ +package org.apache.seata.grpc.generated; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.27.1)", + comments = "Source: grpcMessage.proto") +public final class SeataServiceGrpc { + + private SeataServiceGrpc() {} + + public static final String SERVICE_NAME = "org.apache.seata.core.protocol.SeataService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getSendRequestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "sendRequest", + requestType = org.apache.seata.grpc.generated.GrpcMessageProto.class, + responseType = org.apache.seata.grpc.generated.GrpcMessageProto.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor getSendRequestMethod() { + io.grpc.MethodDescriptor getSendRequestMethod; + if ((getSendRequestMethod = SeataServiceGrpc.getSendRequestMethod) == null) { + synchronized (SeataServiceGrpc.class) { + if ((getSendRequestMethod = SeataServiceGrpc.getSendRequestMethod) == null) { + SeataServiceGrpc.getSendRequestMethod = getSendRequestMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "sendRequest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.apache.seata.grpc.generated.GrpcMessageProto.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.apache.seata.grpc.generated.GrpcMessageProto.getDefaultInstance())) + .setSchemaDescriptor(new SeataServiceMethodDescriptorSupplier("sendRequest")) + .build(); + } + } + } + return getSendRequestMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static SeataServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SeataServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceStub(channel, callOptions); + } + }; + return SeataServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SeataServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SeataServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceBlockingStub(channel, callOptions); + } + }; + return SeataServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static SeataServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SeataServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceFutureStub(channel, callOptions); + } + }; + return SeataServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public static abstract class SeataServiceImplBase implements io.grpc.BindableService { + + /** + */ + public io.grpc.stub.StreamObserver sendRequest( + io.grpc.stub.StreamObserver responseObserver) { + return asyncUnimplementedStreamingCall(getSendRequestMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSendRequestMethod(), + asyncBidiStreamingCall( + new MethodHandlers< + org.apache.seata.grpc.generated.GrpcMessageProto, + org.apache.seata.grpc.generated.GrpcMessageProto>( + this, METHODID_SEND_REQUEST))) + .build(); + } + } + + /** + */ + public static final class SeataServiceStub extends io.grpc.stub.AbstractAsyncStub { + private SeataServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SeataServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceStub(channel, callOptions); + } + + /** + */ + public io.grpc.stub.StreamObserver sendRequest( + io.grpc.stub.StreamObserver responseObserver) { + return asyncBidiStreamingCall( + getChannel().newCall(getSendRequestMethod(), getCallOptions()), responseObserver); + } + } + + /** + */ + public static final class SeataServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private SeataServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SeataServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceBlockingStub(channel, callOptions); + } + } + + /** + */ + public static final class SeataServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + private SeataServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SeataServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_SEND_REQUEST = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final SeataServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(SeataServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SEND_REQUEST: + return (io.grpc.stub.StreamObserver) serviceImpl.sendRequest( + (io.grpc.stub.StreamObserver) responseObserver); + default: + throw new AssertionError(); + } + } + } + + private static abstract class SeataServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SeataServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return org.apache.seata.grpc.generated.GrpcMessage.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SeataService"); + } + } + + private static final class SeataServiceFileDescriptorSupplier + extends SeataServiceBaseDescriptorSupplier { + SeataServiceFileDescriptorSupplier() {} + } + + private static final class SeataServiceMethodDescriptorSupplier + extends SeataServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + SeataServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SeataServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SeataServiceFileDescriptorSupplier()) + .addMethod(getSendRequestMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/seata-test-grpc/pom.xml b/seata-test-grpc/pom.xml new file mode 100644 index 00000000000..b849f8154d9 --- /dev/null +++ b/seata-test-grpc/pom.xml @@ -0,0 +1,127 @@ + + + + org.apache.seata + seata-parent + ${revision} + + 4.0.0 + seata-test-grpc + jar + seata-test-grpc ${project.version} + + UTF-8 + UTF-8 + 1.8 + 1.8 + + + + + + org.slf4j + slf4j-api + 1.7.32 + + + + ch.qos.logback + logback-classic + 1.2.13 + + + + ch.qos.logback + logback-core + 1.2.13 + + + + com.alibaba.spring + spring-context-support + 1.0.11 + + + + org.slf4j + jcl-over-slf4j + 1.7.32 + + + org.slf4j + log4j-over-slf4j + 1.7.32 + + + + + org.springframework + spring-jdbc + 5.3.20 + + + + org.apache.seata + seata-all + 2.1.0-SNAPSHOT + + + + com.fasterxml.jackson.core + jackson-databind + 2.13.5 + + + + mysql + mysql-connector-java + 8.0.28 + + + + org.apache.dubbo + dubbo + 3.1.11 + + + + org.apache.dubbo + dubbo-remoting-zookeeper-curator5 + 3.1.2 + + + org.apache.curator + curator-x-discovery + 5.1.0 + + + + com.alibaba.nacos + nacos-client + 2.3.0 + + + commons-lang + commons-lang + 2.6 + + + com.alibaba + druid + 1.2.7 + + + com.typesafe + config + 1.2.1 + + + commons-pool + commons-pool + 1.6 + + + + \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/DubboAccountServiceStarter.java b/seata-test-grpc/src/main/java/org/apache/seata/account/DubboAccountServiceStarter.java new file mode 100644 index 00000000000..698d12ed195 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/account/DubboAccountServiceStarter.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.account; + +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.apache.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; + + +@EnableAutoDataSourceProxy +@EnableDubbo(scanBasePackages = {"org.apache.seata.account"}) +@ComponentScan(basePackages = {"org.apache.seata.account"}) +public class DubboAccountServiceStarter { + + /** + * Enable PropertySource placeHolder + */ + @Bean + public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + public static void main(String[] args) throws InterruptedException { + new AnnotationConfigApplicationContext(DubboAccountServiceStarter.class); + + //keep run + Thread.currentThread().join(); + } + +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/config/DataSourceConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/account/config/DataSourceConfiguration.java new file mode 100644 index 00000000000..038ceee8211 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/account/config/DataSourceConfiguration.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.account.config; + +import com.alibaba.druid.pool.DruidDataSource; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.jdbc.core.JdbcTemplate; + +import javax.sql.DataSource; + +/** + * DataSource Configuration + */ +@Configuration +@PropertySource("classpath:application.properties") +public class DataSourceConfiguration { + + + @Value("${spring.datasource.account.driverClassName}") + private String driverClassName; + @Value("${spring.datasource.account.url}") + private String url; + @Value("${spring.datasource.account.username}") + private String userName; + @Value("${spring.datasource.account.password}") + private String password; + + @Bean + public DataSource accountDataSource() { + DruidDataSource druidDataSource = new DruidDataSource(); + druidDataSource.setUsername(userName); + druidDataSource.setPassword(password); + druidDataSource.setUrl(url); + druidDataSource.setDriverClassName(driverClassName); + return druidDataSource; + } + + @Bean + public JdbcTemplate jdbcTemplate(@Qualifier("accountDataSource") DataSource dataSource) { + return new JdbcTemplate(dataSource); + } +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/config/DubboConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/account/config/DubboConfiguration.java new file mode 100644 index 00000000000..9bfbf556e28 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/account/config/DubboConfiguration.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.account.config; + +import org.apache.dubbo.config.ApplicationConfig; +import org.apache.dubbo.config.ProtocolConfig; +import org.apache.dubbo.config.RegistryConfig; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * @author wangte + * Create At 2024/1/20 + */ +@Configuration +@PropertySource("classpath:application.properties") +public class DubboConfiguration { + + @Value("${spring.account.application.name}") + private String applicationName; + + @Bean + public ApplicationConfig applicationConfig() { + ApplicationConfig applicationConfig = new ApplicationConfig(applicationName); + applicationConfig.setQosEnable(false); + return applicationConfig; + } + + @Bean + public RegistryConfig registryConfig() { + RegistryConfig registryConfig = new RegistryConfig(); + registryConfig.setAddress("nacos://127.0.0.1:8848"); + return registryConfig; + } + + @Bean + public ProtocolConfig protocolConfig() { + ProtocolConfig protocolConfig = new ProtocolConfig(); + protocolConfig.setName("dubbo"); + protocolConfig.setPort(20881); + return protocolConfig; + } +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/config/SeataConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/account/config/SeataConfiguration.java new file mode 100644 index 00000000000..cd43c1d0a7b --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/account/config/SeataConfiguration.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.account.config; + +import org.apache.seata.spring.annotation.GlobalTransactionScanner; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * Seata Config + */ +@Configuration +@PropertySource("classpath:application.properties") +public class SeataConfiguration { + + @Value("${spring.account.application.name}") + private String applicationName; + + /** + * 注册一个StatViewServlet + * + * @return global transaction scanner + */ + @Bean + public GlobalTransactionScanner globalTransactionScanner() { + return new GlobalTransactionScanner(applicationName, "my_test_tx_group"); + } + +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/service/AccountService.java b/seata-test-grpc/src/main/java/org/apache/seata/account/service/AccountService.java new file mode 100644 index 00000000000..3c297f44edb --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/account/service/AccountService.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.account.service; + +public interface AccountService { + + /** + * 余额扣款 + * + * @param userId 用户ID + * @param money 扣款金额 + */ + void debit(String userId, int money); +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/service/impl/AccountServiceImpl.java b/seata-test-grpc/src/main/java/org/apache/seata/account/service/impl/AccountServiceImpl.java new file mode 100644 index 00000000000..12a9dfa8d61 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/account/service/impl/AccountServiceImpl.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.account.service.impl; + +import org.apache.dubbo.config.annotation.DubboService; +import org.apache.seata.account.service.AccountService; +import org.apache.seata.core.context.RootContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.jdbc.core.JdbcTemplate; + +import javax.annotation.Resource; + +@DubboService +public class AccountServiceImpl implements AccountService { + + private static final Logger LOGGER = LoggerFactory.getLogger(AccountService.class); + + @Resource + private JdbcTemplate jdbcTemplate; + + @Override + public void debit(String userId, int money) { + LOGGER.info("Account Service ... xid: " + RootContext.getXID()); + LOGGER.info("Deducting balance SQL: update account_tbl set money = money - {} where user_id = {}", money, + userId); + + jdbcTemplate.update("update account_tbl set money = money - ? where user_id = ?", new Object[]{money, userId}); + LOGGER.info("Account Service End ... "); + } + +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/DubboBusinessServiceTester.java b/seata-test-grpc/src/main/java/org/apache/seata/business/DubboBusinessServiceTester.java new file mode 100644 index 00000000000..71da0a06b0a --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/business/DubboBusinessServiceTester.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.business; + +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.apache.seata.business.service.BusinessService; +import org.apache.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; + +@EnableAutoDataSourceProxy +@EnableDubbo +@ComponentScan(basePackages = {"org.apache.seata.business"}) +public class DubboBusinessServiceTester { + + /** + * Enable PropertySource placeHolder + */ + @Bean + public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + public static void main(String[] args) throws InterruptedException { + AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(DubboBusinessServiceTester.class); + + BusinessService businessService = annotationConfigApplicationContext.getBean(BusinessService.class); + Thread thread = new Thread(() -> businessService.purchase("U100001", "C00321", 2)); + thread.start(); + + //keep run + Thread.currentThread().join(); + } + +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/config/DubboConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/business/config/DubboConfiguration.java new file mode 100644 index 00000000000..29070e95cf1 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/business/config/DubboConfiguration.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.business.config; + +import org.apache.dubbo.config.ApplicationConfig; +import org.apache.dubbo.config.RegistryConfig; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * @author wangte + * Create At 2024/1/20 + */ +@Configuration +@PropertySource("classpath:application.properties") +public class DubboConfiguration { + + @Value("${spring.business.application.name}") + private String applicationName; + + @Bean + public ApplicationConfig applicationConfig() { + ApplicationConfig applicationConfig = new ApplicationConfig(applicationName); + applicationConfig.setQosEnable(false); + return applicationConfig; + } + + @Bean + public RegistryConfig registryConfig() { + RegistryConfig registryConfig = new RegistryConfig(); + registryConfig.setAddress("nacos://127.0.0.1:8848"); + return registryConfig; + } +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/config/SeataConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/business/config/SeataConfiguration.java new file mode 100644 index 00000000000..ca0229b14cf --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/business/config/SeataConfiguration.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.business.config; + +import org.apache.seata.spring.annotation.GlobalTransactionScanner; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * Seata Config + */ +@Configuration +@PropertySource("classpath:application.properties") +public class SeataConfiguration { + + @Value("${spring.business.application.name}") + private String applicationName; + + /** + * 注册一个StatViewServlet + * + * @return global transaction scanner + */ + @Bean + public GlobalTransactionScanner globalTransactionScanner() { + return new GlobalTransactionScanner(applicationName, "my_test_tx_group"); + } + +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/service/BusinessService.java b/seata-test-grpc/src/main/java/org/apache/seata/business/service/BusinessService.java new file mode 100644 index 00000000000..e5e7e97348a --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/business/service/BusinessService.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.business.service; + +public interface BusinessService { + + /** + * 用户订购商品 + * + * @param userId 用户ID + * @param commodityCode 商品编号 + * @param orderCount 订购数量 + */ + void purchase(String userId, String commodityCode, int orderCount); +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/service/impl/BusinessServiceImpl.java b/seata-test-grpc/src/main/java/org/apache/seata/business/service/impl/BusinessServiceImpl.java new file mode 100644 index 00000000000..6560424ceff --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/business/service/impl/BusinessServiceImpl.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.business.service.impl; + +import org.apache.dubbo.config.annotation.DubboReference; +import org.apache.seata.business.service.BusinessService; +import org.apache.seata.core.context.RootContext; +import org.apache.seata.order.service.OrderService; +import org.apache.seata.spring.annotation.GlobalTransactional; +import org.apache.seata.storage.service.StorageService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +import java.util.Random; + +@Service +public class BusinessServiceImpl implements BusinessService { + + private static final Logger LOGGER = LoggerFactory.getLogger(BusinessService.class); + + @DubboReference + private StorageService storageService; + @DubboReference + private OrderService orderService; + private final Random random = new Random(); + + @Override + @GlobalTransactional(timeoutMills = 300000, name = "spring-dubbo-tx") + public void purchase(String userId, String commodityCode, int orderCount) { + LOGGER.info("purchase begin ... xid: " + RootContext.getXID()); + storageService.deduct(commodityCode, orderCount); + // just test batch update + //stockS ervice.batchDeduct(commodityCode, orderCount); + orderService.create(userId, commodityCode, orderCount); +// if (random.nextBoolean()) { +// throw new RuntimeException("random exception mock!"); +// } + } +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java new file mode 100644 index 00000000000..ae0077ef309 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java @@ -0,0 +1,77 @@ +package org.apache.seata.grpc; + +import com.google.protobuf.Any; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import io.grpc.stub.StreamObserver; +import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto; +import org.apache.seata.grpc.generated.GrpcMessageProto; +import org.apache.seata.grpc.generated.SeataServiceGrpc; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +public class GrpcClient { + + private final ManagedChannel channel; + private final SeataServiceGrpc.SeataServiceStub seataServiceStub; + + public GrpcClient(String localhost, int port) { + this(ManagedChannelBuilder.forAddress(localhost, port).usePlaintext().build()); + } + + public GrpcClient(ManagedChannel channel) { + this.channel = channel; + seataServiceStub = SeataServiceGrpc.newStub(channel); + } + + public static void main(String[] args) { + GrpcClient grpcClient = new GrpcClient("localhost", 8091); + grpcClient.doRequest(); + } + + private void doRequest() { + final CountDownLatch finish = new CountDownLatch(1); + + AbstractIdentifyRequestProto abstractIdentifyRequestProto = AbstractIdentifyRequestProto.newBuilder() + .setApplicationId("test-grpc") + .build(); + RegisterTMRequestProto registerTMRequestProto = RegisterTMRequestProto.newBuilder() + .setAbstractIdentifyRequest(abstractIdentifyRequestProto) + .build(); + + GrpcMessageProto request = GrpcMessageProto.newBuilder().setBody(Any.pack(registerTMRequestProto)).build(); + StreamObserver response; + + try { + + response = seataServiceStub.sendRequest(new StreamObserver() { + @Override + public void onNext(GrpcMessageProto grpcMessageProto) { + System.out.println("receive : " + grpcMessageProto.toString()); + } + + @Override + public void onError(Throwable throwable) { + + } + + @Override + public void onCompleted() { + + } + }); + + response.onNext(request); + } catch (Throwable e) { + e.printStackTrace(); + } + + try { + finish.await(1, TimeUnit.MINUTES); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java new file mode 100644 index 00000000000..e716100184e --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.grpc.generated; + +public final class GrpcMessage { + private GrpcMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\021grpcMessage.proto\022\036org.apache.seata.co" + + "re.protocol\032\031google/protobuf/any.proto\"\327" + + "\001\n\020GrpcMessageProto\022\n\n\002id\030\001 \001(\005\022\023\n\013messa" + + "geType\030\002 \001(\005\022N\n\007headMap\030\003 \003(\0132=.org.apac" + + "he.seata.core.protocol.GrpcMessageProto." + + "HeadMapEntry\022\"\n\004body\030\004 \001(\0132\024.google.prot" + + "obuf.Any\032.\n\014HeadMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\0012\205\001\n\014SeataService\022u\n\013sen" + + "dRequest\0220.org.apache.seata.core.protoco" + + "l.GrpcMessageProto\0320.org.apache.seata.co" + + "re.protocol.GrpcMessageProto(\0010\001B0\n\037org." + + "apache.seata.grpc.generatedB\013GrpcMessage" + + "P\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor, + new String[] { "Id", "MessageType", "HeadMap", "Body", }); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor = + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor.getNestedTypes().get(0); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, + new String[] { "Key", "Value", }); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java new file mode 100644 index 00000000000..381bc7af4ab --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java @@ -0,0 +1,1026 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.grpc.generated; + +/** + * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} + */ +public final class GrpcMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.core.protocol.GrpcMessageProto) + GrpcMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GrpcMessageProto.newBuilder() to construct. + private GrpcMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GrpcMessageProto() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GrpcMessageProto(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GrpcMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + id_ = input.readInt32(); + break; + } + case 16: { + + messageType_ = input.readInt32(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + headMap_ = com.google.protobuf.MapField.newMapField( + HeadMapDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + headMap__ = input.readMessage( + HeadMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + headMap_.getMutableMap().put( + headMap__.getKey(), headMap__.getValue()); + break; + } + case 34: { + com.google.protobuf.Any.Builder subBuilder = null; + if (body_ != null) { + subBuilder = body_.toBuilder(); + } + body_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(body_); + body_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GrpcMessageProto.class, Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private int id_; + /** + * int32 id = 1; + * @return The id. + */ + @Override + public int getId() { + return id_; + } + + public static final int MESSAGETYPE_FIELD_NUMBER = 2; + private int messageType_; + /** + * int32 messageType = 2; + * @return The messageType. + */ + @Override + public int getMessageType() { + return messageType_; + } + + public static final int HEADMAP_FIELD_NUMBER = 3; + private static final class HeadMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + String, String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + String, String> headMap_; + private com.google.protobuf.MapField + internalGetHeadMap() { + if (headMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + return headMap_; + } + + public int getHeadMapCount() { + return internalGetHeadMap().getMap().size(); + } + /** + * map<string, string> headMap = 3; + */ + + @Override + public boolean containsHeadMap( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadMap().getMap().containsKey(key); + } + /** + * Use {@link #getHeadMapMap()} instead. + */ + @Override + @Deprecated + public java.util.Map getHeadMap() { + return getHeadMapMap(); + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public java.util.Map getHeadMapMap() { + return internalGetHeadMap().getMap(); + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public String getHeadMapOrDefault( + String key, + String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public String getHeadMapOrThrow( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + if (!map.containsKey(key)) { + throw new IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BODY_FIELD_NUMBER = 4; + private com.google.protobuf.Any body_; + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + @Override + public boolean hasBody() { + return body_ != null; + } + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + @Override + public com.google.protobuf.Any getBody() { + return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; + } + /** + * .google.protobuf.Any body = 4; + */ + @Override + public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { + return getBody(); + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != 0) { + output.writeInt32(1, id_); + } + if (messageType_ != 0) { + output.writeInt32(2, messageType_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetHeadMap(), + HeadMapDefaultEntryHolder.defaultEntry, + 3); + if (body_ != null) { + output.writeMessage(4, getBody()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, id_); + } + if (messageType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, messageType_); + } + for (java.util.Map.Entry entry + : internalGetHeadMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + headMap__ = HeadMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, headMap__); + } + if (body_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getBody()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GrpcMessageProto)) { + return super.equals(obj); + } + GrpcMessageProto other = (GrpcMessageProto) obj; + + if (getId() + != other.getId()) return false; + if (getMessageType() + != other.getMessageType()) return false; + if (!internalGetHeadMap().equals( + other.internalGetHeadMap())) return false; + if (hasBody() != other.hasBody()) return false; + if (hasBody()) { + if (!getBody() + .equals(other.getBody())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER; + hash = (53 * hash) + getMessageType(); + if (!internalGetHeadMap().getMap().isEmpty()) { + hash = (37 * hash) + HEADMAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeadMap().hashCode(); + } + if (hasBody()) { + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GrpcMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GrpcMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GrpcMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GrpcMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GrpcMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GrpcMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GrpcMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GrpcMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GrpcMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GrpcMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GrpcMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GrpcMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GrpcMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.core.protocol.GrpcMessageProto) + GrpcMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GrpcMessageProto.class, Builder.class); + } + + // Construct using org.apache.seata.grpc.generated.GrpcMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + id_ = 0; + + messageType_ = 0; + + internalGetMutableHeadMap().clear(); + if (bodyBuilder_ == null) { + body_ = null; + } else { + body_ = null; + bodyBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @Override + public GrpcMessageProto getDefaultInstanceForType() { + return GrpcMessageProto.getDefaultInstance(); + } + + @Override + public GrpcMessageProto build() { + GrpcMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GrpcMessageProto buildPartial() { + GrpcMessageProto result = new GrpcMessageProto(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.messageType_ = messageType_; + result.headMap_ = internalGetHeadMap(); + result.headMap_.makeImmutable(); + if (bodyBuilder_ == null) { + result.body_ = body_; + } else { + result.body_ = bodyBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GrpcMessageProto) { + return mergeFrom((GrpcMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GrpcMessageProto other) { + if (other == GrpcMessageProto.getDefaultInstance()) return this; + if (other.getId() != 0) { + setId(other.getId()); + } + if (other.getMessageType() != 0) { + setMessageType(other.getMessageType()); + } + internalGetMutableHeadMap().mergeFrom( + other.internalGetHeadMap()); + if (other.hasBody()) { + mergeBody(other.getBody()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GrpcMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GrpcMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int id_ ; + /** + * int32 id = 1; + * @return The id. + */ + @Override + public int getId() { + return id_; + } + /** + * int32 id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(int value) { + + id_ = value; + onChanged(); + return this; + } + /** + * int32 id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + + private int messageType_ ; + /** + * int32 messageType = 2; + * @return The messageType. + */ + @Override + public int getMessageType() { + return messageType_; + } + /** + * int32 messageType = 2; + * @param value The messageType to set. + * @return This builder for chaining. + */ + public Builder setMessageType(int value) { + + messageType_ = value; + onChanged(); + return this; + } + /** + * int32 messageType = 2; + * @return This builder for chaining. + */ + public Builder clearMessageType() { + + messageType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + String, String> headMap_; + private com.google.protobuf.MapField + internalGetHeadMap() { + if (headMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + return headMap_; + } + private com.google.protobuf.MapField + internalGetMutableHeadMap() { + onChanged();; + if (headMap_ == null) { + headMap_ = com.google.protobuf.MapField.newMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + if (!headMap_.isMutable()) { + headMap_ = headMap_.copy(); + } + return headMap_; + } + + public int getHeadMapCount() { + return internalGetHeadMap().getMap().size(); + } + /** + * map<string, string> headMap = 3; + */ + + @Override + public boolean containsHeadMap( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadMap().getMap().containsKey(key); + } + /** + * Use {@link #getHeadMapMap()} instead. + */ + @Override + @Deprecated + public java.util.Map getHeadMap() { + return getHeadMapMap(); + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public java.util.Map getHeadMapMap() { + return internalGetHeadMap().getMap(); + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public String getHeadMapOrDefault( + String key, + String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> headMap = 3; + */ + @Override + + public String getHeadMapOrThrow( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + if (!map.containsKey(key)) { + throw new IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeadMap() { + internalGetMutableHeadMap().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> headMap = 3; + */ + + public Builder removeHeadMap( + String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableHeadMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @Deprecated + public java.util.Map + getMutableHeadMap() { + return internalGetMutableHeadMap().getMutableMap(); + } + /** + * map<string, string> headMap = 3; + */ + public Builder putHeadMap( + String key, + String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableHeadMap().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, string> headMap = 3; + */ + + public Builder putAllHeadMap( + java.util.Map values) { + internalGetMutableHeadMap().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.Any body_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> bodyBuilder_; + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + public boolean hasBody() { + return bodyBuilder_ != null || body_ != null; + } + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + public com.google.protobuf.Any getBody() { + if (bodyBuilder_ == null) { + return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; + } else { + return bodyBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder setBody(com.google.protobuf.Any value) { + if (bodyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + onChanged(); + } else { + bodyBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder setBody( + com.google.protobuf.Any.Builder builderForValue) { + if (bodyBuilder_ == null) { + body_ = builderForValue.build(); + onChanged(); + } else { + bodyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder mergeBody(com.google.protobuf.Any value) { + if (bodyBuilder_ == null) { + if (body_ != null) { + body_ = + com.google.protobuf.Any.newBuilder(body_).mergeFrom(value).buildPartial(); + } else { + body_ = value; + } + onChanged(); + } else { + bodyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder clearBody() { + if (bodyBuilder_ == null) { + body_ = null; + onChanged(); + } else { + body_ = null; + bodyBuilder_ = null; + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public com.google.protobuf.Any.Builder getBodyBuilder() { + + onChanged(); + return getBodyFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Any body = 4; + */ + public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { + if (bodyBuilder_ != null) { + return bodyBuilder_.getMessageOrBuilder(); + } else { + return body_ == null ? + com.google.protobuf.Any.getDefaultInstance() : body_; + } + } + /** + * .google.protobuf.Any body = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getBodyFieldBuilder() { + if (bodyBuilder_ == null) { + bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getBody(), + getParentForChildren(), + isClean()); + body_ = null; + } + return bodyBuilder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.core.protocol.GrpcMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.core.protocol.GrpcMessageProto) + private static final GrpcMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GrpcMessageProto(); + } + + public static GrpcMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GrpcMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GrpcMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GrpcMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java new file mode 100644 index 00000000000..f51b49c00d4 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.grpc.generated; + +public interface GrpcMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.core.protocol.GrpcMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 id = 1; + * @return The id. + */ + int getId(); + + /** + * int32 messageType = 2; + * @return The messageType. + */ + int getMessageType(); + + /** + * map<string, string> headMap = 3; + */ + int getHeadMapCount(); + /** + * map<string, string> headMap = 3; + */ + boolean containsHeadMap( + String key); + /** + * Use {@link #getHeadMapMap()} instead. + */ + @Deprecated + java.util.Map + getHeadMap(); + /** + * map<string, string> headMap = 3; + */ + java.util.Map + getHeadMapMap(); + /** + * map<string, string> headMap = 3; + */ + + /* nullable */ +String getHeadMapOrDefault( + String key, + /* nullable */ +String defaultValue); + /** + * map<string, string> headMap = 3; + */ + + String getHeadMapOrThrow( + String key); + + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + boolean hasBody(); + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + com.google.protobuf.Any getBody(); + /** + * .google.protobuf.Any body = 4; + */ + com.google.protobuf.AnyOrBuilder getBodyOrBuilder(); +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java new file mode 100644 index 00000000000..e780e30882f --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java @@ -0,0 +1,272 @@ +package org.apache.seata.grpc.generated; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.27.1)", + comments = "Source: grpcMessage.proto") +public final class SeataServiceGrpc { + + private SeataServiceGrpc() {} + + public static final String SERVICE_NAME = "org.apache.seata.core.protocol.SeataService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getSendRequestMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "sendRequest", + requestType = GrpcMessageProto.class, + responseType = GrpcMessageProto.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor getSendRequestMethod() { + io.grpc.MethodDescriptor getSendRequestMethod; + if ((getSendRequestMethod = SeataServiceGrpc.getSendRequestMethod) == null) { + synchronized (SeataServiceGrpc.class) { + if ((getSendRequestMethod = SeataServiceGrpc.getSendRequestMethod) == null) { + SeataServiceGrpc.getSendRequestMethod = getSendRequestMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "sendRequest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + GrpcMessageProto.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + GrpcMessageProto.getDefaultInstance())) + .setSchemaDescriptor(new SeataServiceMethodDescriptorSupplier("sendRequest")) + .build(); + } + } + } + return getSendRequestMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static SeataServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @Override + public SeataServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceStub(channel, callOptions); + } + }; + return SeataServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SeataServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @Override + public SeataServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceBlockingStub(channel, callOptions); + } + }; + return SeataServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static SeataServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @Override + public SeataServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceFutureStub(channel, callOptions); + } + }; + return SeataServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public static abstract class SeataServiceImplBase implements io.grpc.BindableService { + + /** + */ + public io.grpc.stub.StreamObserver sendRequest( + io.grpc.stub.StreamObserver responseObserver) { + return asyncUnimplementedStreamingCall(getSendRequestMethod(), responseObserver); + } + + @Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSendRequestMethod(), + asyncBidiStreamingCall( + new MethodHandlers< + GrpcMessageProto, + GrpcMessageProto>( + this, METHODID_SEND_REQUEST))) + .build(); + } + } + + /** + */ + public static final class SeataServiceStub extends io.grpc.stub.AbstractAsyncStub { + private SeataServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @Override + protected SeataServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceStub(channel, callOptions); + } + + /** + */ + public io.grpc.stub.StreamObserver sendRequest( + io.grpc.stub.StreamObserver responseObserver) { + return asyncBidiStreamingCall( + getChannel().newCall(getSendRequestMethod(), getCallOptions()), responseObserver); + } + } + + /** + */ + public static final class SeataServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private SeataServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @Override + protected SeataServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceBlockingStub(channel, callOptions); + } + } + + /** + */ + public static final class SeataServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + private SeataServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @Override + protected SeataServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SeataServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_SEND_REQUEST = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final SeataServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(SeataServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @Override + @SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + + @Override + @SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SEND_REQUEST: + return (io.grpc.stub.StreamObserver) serviceImpl.sendRequest( + (io.grpc.stub.StreamObserver) responseObserver); + default: + throw new AssertionError(); + } + } + } + + private static abstract class SeataServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SeataServiceBaseDescriptorSupplier() {} + + @Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return GrpcMessage.getDescriptor(); + } + + @Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SeataService"); + } + } + + private static final class SeataServiceFileDescriptorSupplier + extends SeataServiceBaseDescriptorSupplier { + SeataServiceFileDescriptorSupplier() {} + } + + private static final class SeataServiceMethodDescriptorSupplier + extends SeataServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + SeataServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SeataServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SeataServiceFileDescriptorSupplier()) + .addMethod(getSendRequestMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/DubboOrderServiceStarter.java b/seata-test-grpc/src/main/java/org/apache/seata/order/DubboOrderServiceStarter.java new file mode 100644 index 00000000000..f5b1a8797bb --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/order/DubboOrderServiceStarter.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.order; + +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.apache.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; + + +@EnableAutoDataSourceProxy +@EnableDubbo(scanBasePackages = {"org.apache.seata.order"}) +@ComponentScan(basePackages = {"org.apache.seata.order"}) +public class DubboOrderServiceStarter { + + /** + * Enable PropertySource placeHolder + */ + @Bean + public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + public static void main(String[] args) throws InterruptedException { + new AnnotationConfigApplicationContext(DubboOrderServiceStarter.class); + + //keep run + Thread.currentThread().join(); + } + +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/config/DataSourceConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/order/config/DataSourceConfiguration.java new file mode 100644 index 00000000000..712324cff6b --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/order/config/DataSourceConfiguration.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.order.config; + +import com.alibaba.druid.pool.DruidDataSource; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.jdbc.core.JdbcTemplate; + +import javax.sql.DataSource; + +/** + * DataSource Configuration + */ +@Configuration +@PropertySource("classpath:application.properties") +public class DataSourceConfiguration { + + + @Value("${spring.datasource.order.driverClassName}") + private String driverClassName; + @Value("${spring.datasource.order.url}") + private String url; + @Value("${spring.datasource.order.username}") + private String userName; + @Value("${spring.datasource.order.password}") + private String password; + + @Bean + public DataSource orderDataSource() { + DruidDataSource druidDataSource = new DruidDataSource(); + druidDataSource.setUsername(userName); + druidDataSource.setPassword(password); + druidDataSource.setUrl(url); + druidDataSource.setDriverClassName(driverClassName); + return druidDataSource; + } + + @Bean + public JdbcTemplate jdbcTemplate(@Qualifier("orderDataSource") DataSource dataSource) { + return new JdbcTemplate(dataSource); + } +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/config/DubboConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/order/config/DubboConfiguration.java new file mode 100644 index 00000000000..7277cb1d351 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/order/config/DubboConfiguration.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.order.config; + +import org.apache.dubbo.config.ApplicationConfig; +import org.apache.dubbo.config.ProtocolConfig; +import org.apache.dubbo.config.RegistryConfig; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * @author wangte + * Create At 2024/1/20 + */ +@Configuration +@PropertySource("classpath:application.properties") +public class DubboConfiguration { + + @Value("${spring.order.application.name}") + private String applicationName; + + + @Bean + public ApplicationConfig applicationConfig() { + ApplicationConfig applicationConfig = new ApplicationConfig(applicationName); + applicationConfig.setQosEnable(false); + return applicationConfig; + } + @Bean + public RegistryConfig registryConfig() { + RegistryConfig registryConfig = new RegistryConfig(); + registryConfig.setAddress("nacos://127.0.0.1:8848"); + return registryConfig; + } + + @Bean + public ProtocolConfig protocolConfig() { + ProtocolConfig protocolConfig = new ProtocolConfig(); + protocolConfig.setName("dubbo"); + protocolConfig.setPort(20883); + return protocolConfig; + } +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/config/SeataConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/order/config/SeataConfiguration.java new file mode 100644 index 00000000000..dc81ef86b26 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/order/config/SeataConfiguration.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.order.config; + +import org.apache.seata.spring.annotation.GlobalTransactionScanner; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * Seata Config + */ +@Configuration +@PropertySource("classpath:application.properties") +public class SeataConfiguration { + + @Value("${spring.order.application.name}") + private String applicationName; + + /** + * 注册一个StatViewServlet + * + * @return global transaction scanner + */ + @Bean + public GlobalTransactionScanner globalTransactionScanner() { + return new GlobalTransactionScanner(applicationName, "my_test_tx_group"); + } + +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/service/OrderService.java b/seata-test-grpc/src/main/java/org/apache/seata/order/service/OrderService.java new file mode 100644 index 00000000000..8afe45deb03 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/order/service/OrderService.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.order.service; + +public interface OrderService { + + /** + * 创建订单 + * + * @param userId 用户ID + * @param commodityCode 商品编号 + * @param orderCount 订购数量 + */ + void create(String userId, String commodityCode, int orderCount); +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/service/impl/OrderServiceImpl.java b/seata-test-grpc/src/main/java/org/apache/seata/order/service/impl/OrderServiceImpl.java new file mode 100644 index 00000000000..69499f988a1 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/order/service/impl/OrderServiceImpl.java @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.order.service.impl; + +import org.apache.dubbo.config.annotation.DubboReference; +import org.apache.dubbo.config.annotation.DubboService; +import org.apache.seata.account.service.AccountService; +import org.apache.seata.core.context.RootContext; +import org.apache.seata.order.service.OrderService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.support.GeneratedKeyHolder; +import org.springframework.jdbc.support.KeyHolder; + +import javax.annotation.Resource; +import java.sql.PreparedStatement; +import java.util.Objects; + +@DubboService +public class OrderServiceImpl implements OrderService { + + private static final Logger LOGGER = LoggerFactory.getLogger(OrderService.class); + + @Resource + private JdbcTemplate jdbcTemplate; + + @DubboReference + private AccountService accountService; + + @Override + public void create(String userId, String commodityCode, int orderCount) { + LOGGER.info("Order Service Begin ... xid: " + RootContext.getXID()); + + // 计算订单金额 + int orderMoney = calculate(commodityCode, orderCount); + + // 从账户余额扣款 + accountService.debit(userId, orderMoney); + + LOGGER.info( + "Order Service SQL: insert into order_tbl (user_id, commodity_code, count, money) values ({}, {}, {}, {})", + userId, commodityCode, orderCount, orderMoney); + + KeyHolder keyHolder = new GeneratedKeyHolder(); + jdbcTemplate.update(con -> { + PreparedStatement pst = con.prepareStatement( + "insert into order_tbl (user_id, commodity_code, count, money) values (?, ?, ?, ?)", + PreparedStatement.RETURN_GENERATED_KEYS); + pst.setObject(1, userId); + pst.setObject(2, commodityCode); + pst.setObject(3, orderCount); + pst.setObject(4, orderMoney); + return pst; + }, keyHolder); + + + LOGGER.info("Order Service End ... Created " + Objects.requireNonNull(keyHolder.getKey()).longValue()); + } + + private int calculate(String commodityId, int orderCount) { + return 200 * orderCount; + } + +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/DubboStorageServiceStarter.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/DubboStorageServiceStarter.java new file mode 100644 index 00000000000..a61feffe548 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/storage/DubboStorageServiceStarter.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.storage; + +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.apache.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; + + +@EnableAutoDataSourceProxy +@EnableDubbo +@ComponentScan(basePackages = {"org.apache.seata.storage"}) +public class DubboStorageServiceStarter { + + /** + * Enable PropertySource placeHolder + */ + @Bean + public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } + + public static void main(String[] args) throws InterruptedException { + new AnnotationConfigApplicationContext(DubboStorageServiceStarter.class); + + //keep run + Thread.currentThread().join(); + } + +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DataSourceConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DataSourceConfiguration.java new file mode 100644 index 00000000000..58a4a8a72cc --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DataSourceConfiguration.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.storage.config; + +import com.alibaba.druid.pool.DruidDataSource; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.jdbc.core.JdbcTemplate; + +import javax.sql.DataSource; + +/** + * DataSource Configuration + */ +@Configuration +@PropertySource("classpath:application.properties") +public class DataSourceConfiguration { + + + @Value("${spring.datasource.stock.driverClassName}") + private String driverClassName; + @Value("${spring.datasource.stock.url}") + private String url; + @Value("${spring.datasource.stock.username}") + private String userName; + @Value("${spring.datasource.stock.password}") + private String password; + + @Bean + public DataSource storageDataSource() { + DruidDataSource druidDataSource = new DruidDataSource(); + druidDataSource.setUsername(userName); + druidDataSource.setPassword(password); + druidDataSource.setUrl(url); + druidDataSource.setDriverClassName(driverClassName); + return druidDataSource; + } + + @Bean + public JdbcTemplate jdbcTemplate(@Qualifier("storageDataSource") DataSource dataSource) { + return new JdbcTemplate(dataSource); + } +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DubboConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DubboConfiguration.java new file mode 100644 index 00000000000..85514bbf470 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DubboConfiguration.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.storage.config; + +import org.apache.dubbo.config.ApplicationConfig; +import org.apache.dubbo.config.ProtocolConfig; +import org.apache.dubbo.config.RegistryConfig; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * @author wangte + * Create At 2024/1/20 + */ +@Configuration +@PropertySource("classpath:application.properties") +public class DubboConfiguration { + + @Value("${spring.storage.application.name}") + private String applicationName; + + @Bean + public ApplicationConfig applicationConfig() { + ApplicationConfig applicationConfig = new ApplicationConfig(applicationName); + applicationConfig.setQosEnable(false); + return applicationConfig; + } + + @Bean + public RegistryConfig registryConfig() { + RegistryConfig registryConfig = new RegistryConfig(); + registryConfig.setAddress("nacos://127.0.0.1:8848"); + return registryConfig; + } + + @Bean + public ProtocolConfig protocolConfig() { + ProtocolConfig protocolConfig = new ProtocolConfig(); + protocolConfig.setName("dubbo"); + protocolConfig.setPort(20882); + return protocolConfig; + } +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/SeataConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/SeataConfiguration.java new file mode 100644 index 00000000000..b5297677fc3 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/SeataConfiguration.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.storage.config; + +import org.apache.seata.spring.annotation.GlobalTransactionScanner; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; + +/** + * Seata Config + */ +@Configuration +@PropertySource("classpath:application.properties") +public class SeataConfiguration { + + @Value("${spring.storage.application.name}") + private String applicationName; + + /** + * 注册一个StatViewServlet + * + * @return global transaction scanner + */ + @Bean + public GlobalTransactionScanner globalTransactionScanner() { + return new GlobalTransactionScanner(applicationName, "my_test_tx_group"); + } + +} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/service/StorageService.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/service/StorageService.java new file mode 100644 index 00000000000..1358830e82a --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/storage/service/StorageService.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.storage.service; + +public interface StorageService { + + /** + * 扣减库存 + * + * @param commodityCode 商品编号 + * @param count 扣减数量 + */ + void deduct(String commodityCode, int count); + + /** + * 批量扣减 + * + * @param commodityCode + * @param count + */ + void batchDeduct(String commodityCode, int count); +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/service/impl/StorageServiceImpl.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/service/impl/StorageServiceImpl.java new file mode 100644 index 00000000000..a83503847a5 --- /dev/null +++ b/seata-test-grpc/src/main/java/org/apache/seata/storage/service/impl/StorageServiceImpl.java @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.storage.service.impl; + +import org.apache.dubbo.config.annotation.DubboService; +import org.apache.seata.core.context.RootContext; +import org.apache.seata.storage.service.StorageService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.jdbc.core.JdbcTemplate; + +import javax.annotation.Resource; + +@DubboService +public class StorageServiceImpl implements StorageService { + + private static final Logger LOGGER = LoggerFactory.getLogger(StorageService.class); + + @Resource + private JdbcTemplate jdbcTemplate; + + @Override + public void deduct(String commodityCode, int count) { + LOGGER.info("Stock Service Begin ... xid: " + RootContext.getXID()); + LOGGER.info("Deducting inventory SQL: update stock_tbl set count = count - {} where commodity_code = {}", count, + commodityCode); + + jdbcTemplate.update("update stock_tbl set count = count - ? where commodity_code = ?", + new Object[]{count, commodityCode}); + LOGGER.info("Stock Service End ... "); + + } + + @Override + public void batchDeduct(String commodityCode, int count) { + LOGGER.info("Stock Service Begin ... xid: " + RootContext.getXID()); + LOGGER.info("Deducting inventory SQL: update stock_tbl set count = count - {} where commodity_code = {}", count, + commodityCode); + + jdbcTemplate.batchUpdate( + "update stock_tbl set count = count - " + count + " where commodity_code = '" + commodityCode + "'", + "update stock_tbl set count = count - " + count + " where commodity_code = '" + commodityCode + "'"); + LOGGER.info("Stock Service End ... "); + + } + +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/proto/grpcMessage.proto b/seata-test-grpc/src/main/proto/grpcMessage.proto new file mode 100644 index 00000000000..bab353b4209 --- /dev/null +++ b/seata-test-grpc/src/main/proto/grpcMessage.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package org.apache.seata.core.protocol; +import "google/protobuf/any.proto"; +option java_multiple_files = true; +option java_outer_classname = "GrpcMessage"; +option java_package = "org.apache.seata.grpc.generated"; + +message GrpcMessageProto { + int32 id = 1; + int32 messageType = 2; + map headMap = 3; + google.protobuf.Any body = 4; +} + +service SeataService { + rpc sendRequest (stream GrpcMessageProto) returns (stream GrpcMessageProto); +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessage.java b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessage.java new file mode 100644 index 00000000000..19ea61d3137 --- /dev/null +++ b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessage.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.grpc.generated; + +public final class GrpcMessage { + private GrpcMessage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021grpcMessage.proto\022\036org.apache.seata.co" + + "re.protocol\032\031google/protobuf/any.proto\"\327" + + "\001\n\020GrpcMessageProto\022\n\n\002id\030\001 \001(\005\022\023\n\013messa" + + "geType\030\002 \001(\005\022N\n\007headMap\030\003 \003(\0132=.org.apac" + + "he.seata.core.protocol.GrpcMessageProto." + + "HeadMapEntry\022\"\n\004body\030\004 \001(\0132\024.google.prot" + + "obuf.Any\032.\n\014HeadMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\0012\205\001\n\014SeataService\022u\n\013sen" + + "dRequest\0220.org.apache.seata.core.protoco" + + "l.GrpcMessageProto\0320.org.apache.seata.co" + + "re.protocol.GrpcMessageProto(\0010\001B0\n\037org." + + "apache.seata.grpc.generatedB\013GrpcMessage" + + "P\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor, + new java.lang.String[] { "Id", "MessageType", "HeadMap", "Body", }); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor = + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor.getNestedTypes().get(0); + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProto.java b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProto.java new file mode 100644 index 00000000000..69241e9bd0f --- /dev/null +++ b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProto.java @@ -0,0 +1,1026 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.grpc.generated; + +/** + * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} + */ +public final class GrpcMessageProto extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:org.apache.seata.core.protocol.GrpcMessageProto) + GrpcMessageProtoOrBuilder { +private static final long serialVersionUID = 0L; + // Use GrpcMessageProto.newBuilder() to construct. + private GrpcMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GrpcMessageProto() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GrpcMessageProto(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GrpcMessageProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + id_ = input.readInt32(); + break; + } + case 16: { + + messageType_ = input.readInt32(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + headMap_ = com.google.protobuf.MapField.newMapField( + HeadMapDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + headMap__ = input.readMessage( + HeadMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + headMap_.getMutableMap().put( + headMap__.getKey(), headMap__.getValue()); + break; + } + case 34: { + com.google.protobuf.Any.Builder subBuilder = null; + if (body_ != null) { + subBuilder = body_.toBuilder(); + } + body_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(body_); + body_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.seata.grpc.generated.GrpcMessageProto.class, org.apache.seata.grpc.generated.GrpcMessageProto.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private int id_; + /** + * int32 id = 1; + * @return The id. + */ + @java.lang.Override + public int getId() { + return id_; + } + + public static final int MESSAGETYPE_FIELD_NUMBER = 2; + private int messageType_; + /** + * int32 messageType = 2; + * @return The messageType. + */ + @java.lang.Override + public int getMessageType() { + return messageType_; + } + + public static final int HEADMAP_FIELD_NUMBER = 3; + private static final class HeadMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headMap_; + private com.google.protobuf.MapField + internalGetHeadMap() { + if (headMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + return headMap_; + } + + public int getHeadMapCount() { + return internalGetHeadMap().getMap().size(); + } + /** + * map<string, string> headMap = 3; + */ + + @java.lang.Override + public boolean containsHeadMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadMap().getMap().containsKey(key); + } + /** + * Use {@link #getHeadMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeadMap() { + return getHeadMapMap(); + } + /** + * map<string, string> headMap = 3; + */ + @java.lang.Override + + public java.util.Map getHeadMapMap() { + return internalGetHeadMap().getMap(); + } + /** + * map<string, string> headMap = 3; + */ + @java.lang.Override + + public java.lang.String getHeadMapOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> headMap = 3; + */ + @java.lang.Override + + public java.lang.String getHeadMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BODY_FIELD_NUMBER = 4; + private com.google.protobuf.Any body_; + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + @java.lang.Override + public boolean hasBody() { + return body_ != null; + } + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + @java.lang.Override + public com.google.protobuf.Any getBody() { + return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; + } + /** + * .google.protobuf.Any body = 4; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { + return getBody(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != 0) { + output.writeInt32(1, id_); + } + if (messageType_ != 0) { + output.writeInt32(2, messageType_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetHeadMap(), + HeadMapDefaultEntryHolder.defaultEntry, + 3); + if (body_ != null) { + output.writeMessage(4, getBody()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, id_); + } + if (messageType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, messageType_); + } + for (java.util.Map.Entry entry + : internalGetHeadMap().getMap().entrySet()) { + com.google.protobuf.MapEntry + headMap__ = HeadMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, headMap__); + } + if (body_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getBody()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.seata.grpc.generated.GrpcMessageProto)) { + return super.equals(obj); + } + org.apache.seata.grpc.generated.GrpcMessageProto other = (org.apache.seata.grpc.generated.GrpcMessageProto) obj; + + if (getId() + != other.getId()) return false; + if (getMessageType() + != other.getMessageType()) return false; + if (!internalGetHeadMap().equals( + other.internalGetHeadMap())) return false; + if (hasBody() != other.hasBody()) return false; + if (hasBody()) { + if (!getBody() + .equals(other.getBody())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER; + hash = (53 * hash) + getMessageType(); + if (!internalGetHeadMap().getMap().isEmpty()) { + hash = (37 * hash) + HEADMAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeadMap().hashCode(); + } + if (hasBody()) { + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.apache.seata.grpc.generated.GrpcMessageProto prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:org.apache.seata.core.protocol.GrpcMessageProto) + org.apache.seata.grpc.generated.GrpcMessageProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableHeadMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.seata.grpc.generated.GrpcMessageProto.class, org.apache.seata.grpc.generated.GrpcMessageProto.Builder.class); + } + + // Construct using org.apache.seata.grpc.generated.GrpcMessageProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = 0; + + messageType_ = 0; + + internalGetMutableHeadMap().clear(); + if (bodyBuilder_ == null) { + body_ = null; + } else { + body_ = null; + bodyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; + } + + @java.lang.Override + public org.apache.seata.grpc.generated.GrpcMessageProto getDefaultInstanceForType() { + return org.apache.seata.grpc.generated.GrpcMessageProto.getDefaultInstance(); + } + + @java.lang.Override + public org.apache.seata.grpc.generated.GrpcMessageProto build() { + org.apache.seata.grpc.generated.GrpcMessageProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.apache.seata.grpc.generated.GrpcMessageProto buildPartial() { + org.apache.seata.grpc.generated.GrpcMessageProto result = new org.apache.seata.grpc.generated.GrpcMessageProto(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.messageType_ = messageType_; + result.headMap_ = internalGetHeadMap(); + result.headMap_.makeImmutable(); + if (bodyBuilder_ == null) { + result.body_ = body_; + } else { + result.body_ = bodyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.seata.grpc.generated.GrpcMessageProto) { + return mergeFrom((org.apache.seata.grpc.generated.GrpcMessageProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.seata.grpc.generated.GrpcMessageProto other) { + if (other == org.apache.seata.grpc.generated.GrpcMessageProto.getDefaultInstance()) return this; + if (other.getId() != 0) { + setId(other.getId()); + } + if (other.getMessageType() != 0) { + setMessageType(other.getMessageType()); + } + internalGetMutableHeadMap().mergeFrom( + other.internalGetHeadMap()); + if (other.hasBody()) { + mergeBody(other.getBody()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.seata.grpc.generated.GrpcMessageProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.seata.grpc.generated.GrpcMessageProto) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int id_ ; + /** + * int32 id = 1; + * @return The id. + */ + @java.lang.Override + public int getId() { + return id_; + } + /** + * int32 id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(int value) { + + id_ = value; + onChanged(); + return this; + } + /** + * int32 id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + + private int messageType_ ; + /** + * int32 messageType = 2; + * @return The messageType. + */ + @java.lang.Override + public int getMessageType() { + return messageType_; + } + /** + * int32 messageType = 2; + * @param value The messageType to set. + * @return This builder for chaining. + */ + public Builder setMessageType(int value) { + + messageType_ = value; + onChanged(); + return this; + } + /** + * int32 messageType = 2; + * @return This builder for chaining. + */ + public Builder clearMessageType() { + + messageType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headMap_; + private com.google.protobuf.MapField + internalGetHeadMap() { + if (headMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + return headMap_; + } + private com.google.protobuf.MapField + internalGetMutableHeadMap() { + onChanged();; + if (headMap_ == null) { + headMap_ = com.google.protobuf.MapField.newMapField( + HeadMapDefaultEntryHolder.defaultEntry); + } + if (!headMap_.isMutable()) { + headMap_ = headMap_.copy(); + } + return headMap_; + } + + public int getHeadMapCount() { + return internalGetHeadMap().getMap().size(); + } + /** + * map<string, string> headMap = 3; + */ + + @java.lang.Override + public boolean containsHeadMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadMap().getMap().containsKey(key); + } + /** + * Use {@link #getHeadMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeadMap() { + return getHeadMapMap(); + } + /** + * map<string, string> headMap = 3; + */ + @java.lang.Override + + public java.util.Map getHeadMapMap() { + return internalGetHeadMap().getMap(); + } + /** + * map<string, string> headMap = 3; + */ + @java.lang.Override + + public java.lang.String getHeadMapOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> headMap = 3; + */ + @java.lang.Override + + public java.lang.String getHeadMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetHeadMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeadMap() { + internalGetMutableHeadMap().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> headMap = 3; + */ + + public Builder removeHeadMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableHeadMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableHeadMap() { + return internalGetMutableHeadMap().getMutableMap(); + } + /** + * map<string, string> headMap = 3; + */ + public Builder putHeadMap( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableHeadMap().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, string> headMap = 3; + */ + + public Builder putAllHeadMap( + java.util.Map values) { + internalGetMutableHeadMap().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.Any body_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> bodyBuilder_; + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + public boolean hasBody() { + return bodyBuilder_ != null || body_ != null; + } + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + public com.google.protobuf.Any getBody() { + if (bodyBuilder_ == null) { + return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; + } else { + return bodyBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder setBody(com.google.protobuf.Any value) { + if (bodyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + onChanged(); + } else { + bodyBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder setBody( + com.google.protobuf.Any.Builder builderForValue) { + if (bodyBuilder_ == null) { + body_ = builderForValue.build(); + onChanged(); + } else { + bodyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder mergeBody(com.google.protobuf.Any value) { + if (bodyBuilder_ == null) { + if (body_ != null) { + body_ = + com.google.protobuf.Any.newBuilder(body_).mergeFrom(value).buildPartial(); + } else { + body_ = value; + } + onChanged(); + } else { + bodyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public Builder clearBody() { + if (bodyBuilder_ == null) { + body_ = null; + onChanged(); + } else { + body_ = null; + bodyBuilder_ = null; + } + + return this; + } + /** + * .google.protobuf.Any body = 4; + */ + public com.google.protobuf.Any.Builder getBodyBuilder() { + + onChanged(); + return getBodyFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Any body = 4; + */ + public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { + if (bodyBuilder_ != null) { + return bodyBuilder_.getMessageOrBuilder(); + } else { + return body_ == null ? + com.google.protobuf.Any.getDefaultInstance() : body_; + } + } + /** + * .google.protobuf.Any body = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getBodyFieldBuilder() { + if (bodyBuilder_ == null) { + bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getBody(), + getParentForChildren(), + isClean()); + body_ = null; + } + return bodyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:org.apache.seata.core.protocol.GrpcMessageProto) + } + + // @@protoc_insertion_point(class_scope:org.apache.seata.core.protocol.GrpcMessageProto) + private static final org.apache.seata.grpc.generated.GrpcMessageProto DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.seata.grpc.generated.GrpcMessageProto(); + } + + public static org.apache.seata.grpc.generated.GrpcMessageProto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GrpcMessageProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GrpcMessageProto(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.apache.seata.grpc.generated.GrpcMessageProto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java new file mode 100644 index 00000000000..0ac50008786 --- /dev/null +++ b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpcMessage.proto + +package org.apache.seata.grpc.generated; + +public interface GrpcMessageProtoOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.apache.seata.core.protocol.GrpcMessageProto) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 id = 1; + * @return The id. + */ + int getId(); + + /** + * int32 messageType = 2; + * @return The messageType. + */ + int getMessageType(); + + /** + * map<string, string> headMap = 3; + */ + int getHeadMapCount(); + /** + * map<string, string> headMap = 3; + */ + boolean containsHeadMap( + java.lang.String key); + /** + * Use {@link #getHeadMapMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getHeadMap(); + /** + * map<string, string> headMap = 3; + */ + java.util.Map + getHeadMapMap(); + /** + * map<string, string> headMap = 3; + */ + + /* nullable */ +java.lang.String getHeadMapOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> headMap = 3; + */ + + java.lang.String getHeadMapOrThrow( + java.lang.String key); + + /** + * .google.protobuf.Any body = 4; + * @return Whether the body field is set. + */ + boolean hasBody(); + /** + * .google.protobuf.Any body = 4; + * @return The body. + */ + com.google.protobuf.Any getBody(); + /** + * .google.protobuf.Any body = 4; + */ + com.google.protobuf.AnyOrBuilder getBodyOrBuilder(); +} diff --git a/seata-test-grpc/src/main/resources/all.sql b/seata-test-grpc/src/main/resources/all.sql new file mode 100644 index 00000000000..a6974d7f61f --- /dev/null +++ b/seata-test-grpc/src/main/resources/all.sql @@ -0,0 +1,56 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +CREATE TABLE `account_tbl` +( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` varchar(255) DEFAULT NULL, + `money` int(11) DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; + +CREATE TABLE `stock_tbl` +( + `id` int(11) NOT NULL AUTO_INCREMENT, + `commodity_code` varchar(255) DEFAULT NULL, + `count` int(11) DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `commodity_code` (`commodity_code`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; + +CREATE TABLE `order_tbl` +( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` varchar(255) DEFAULT NULL, + `commodity_code` varchar(255) DEFAULT NULL, + `count` int(11) DEFAULT '0', + `money` int(11) DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `undo_log` +( + `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', + `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', + `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', + `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', + `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', + `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', + `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', + UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) + ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; +ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); \ No newline at end of file diff --git a/seata-test-grpc/src/main/resources/application.properties b/seata-test-grpc/src/main/resources/application.properties new file mode 100644 index 00000000000..41d9149e049 --- /dev/null +++ b/seata-test-grpc/src/main/resources/application.properties @@ -0,0 +1,18 @@ +spring.account.application.name=account-service +spring.storage.application.name=storage-service +spring.order.application.name=order-service +spring.business.application.name=business-service +spring.datasource.account.url=jdbc:mysql://127.0.0.1:3305/seata?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true +spring.datasource.account.username=root +spring.datasource.account.password=root 1234 +spring.datasource.account.driverClassName=com.mysql.cj.jdbc.Driver +# stock db config +spring.datasource.stock.url=jdbc:mysql://127.0.0.1:3305/seata?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true +spring.datasource.stock.username=root +spring.datasource.stock.password=root 1234 +spring.datasource.stock.driverClassName=com.mysql.cj.jdbc.Driver +# order db config +spring.datasource.order.url=jdbc:mysql://127.0.0.1:3305/seata?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true +spring.datasource.order.username=root +spring.datasource.order.password=root 1234 +spring.datasource.order.driverClassName=com.mysql.cj.jdbc.Driver diff --git a/seata-test-grpc/src/main/resources/file.conf b/seata-test-grpc/src/main/resources/file.conf new file mode 100644 index 00000000000..2c718ea04a5 --- /dev/null +++ b/seata-test-grpc/src/main/resources/file.conf @@ -0,0 +1,127 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +transport { + + # tcp, unix-domain-socket + type = "TCP" + #NIO, NATIVE + server = "NIO" + #enable heartbeat + heartbeat = true + # the tm client batch send request enable + enableTmClientBatchSendRequest = false + # the rm client batch send request enable + enableRmClientBatchSendRequest = true + # the rm client rpc request timeout + rpcRmRequestTimeout = 2000 + # the tm client rpc request timeout + rpcTmRequestTimeout = 30000 + # the rm client rpc request timeout + rpcRmRequestTimeout = 15000 + #thread factory for netty + threadFactory { + bossThreadPrefix = "NettyBoss" + workerThreadPrefix = "NettyServerNIOWorker" + serverExecutorThread-prefix = "NettyServerBizHandler" + shareBossWorker = false + clientSelectorThreadPrefix = "NettyClientSelector" + clientSelectorThreadSize = 1 + clientWorkerThreadPrefix = "NettyClientWorkerThread" + # netty boss thread size + bossThreadSize = 1 + #auto default pin or 8 + workerThreadSize = "default" + } + shutdown { + # when destroy server, wait seconds + wait = 3 + } + serialization = "seata" + compressor = "none" +} +service { + #transaction service group mapping + vgroupMapping.my_test_tx_group = "default" + #only support when registry.type=file, please don't set multiple addresses + default.grouplist = "127.0.0.1:8091" + #degrade, current not support + enableDegrade = false + #disable seata + disableGlobalTransaction = false +} + +client { + rm { + asyncCommitBufferLimit = 10000 + lock { + retryInterval = 10 + retryTimes = 30 + retryPolicyBranchRollbackOnConflict = true + } + reportRetryCount = 5 + tableMetaCheckEnable = false + tableMetaCheckerInterval = 60000 + reportSuccessEnable = false + sagaBranchRegisterEnable = false + sagaJsonParser = "fastjson" + sagaRetryPersistModeUpdate = false + sagaCompensatePersistModeUpdate = false + tccActionInterceptorOrder = -2147482648 #Ordered.HIGHEST_PRECEDENCE + 1000 + sqlParserType = "druid" + branchExecutionTimeoutXA = 60000 + connectionTwoPhaseHoldTimeoutXA = 10000 + } + tm { + commitRetryCount = 5 + rollbackRetryCount = 5 + defaultGlobalTransactionTimeout = 60000 + degradeCheck = false + degradeCheckPeriod = 2000 + degradeCheckAllowTimes = 10 + interceptorOrder = -2147482648 #Ordered.HIGHEST_PRECEDENCE + 1000 + } + undo { + dataValidation = true + onlyCareUpdateColumns = true + logSerialization = "jackson" + logTable = "undo_log" + compress { + enable = true + # allow zip, gzip, deflater, lz4, bzip2, zstd default is zip + type = zip + # if rollback info size > threshold, then will be compress + # allow k m g t + threshold = 64k + } + } + loadBalance { + type = "XID" + virtualNodes = 10 + } +} +log { + exceptionRate = 100 +} +tcc { + fence { + # tcc fence log table name + logTableName = tcc_fence_log + # tcc fence log clean period + cleanPeriod = 1h + } +} diff --git a/seata-test-grpc/src/main/resources/logback.xml b/seata-test-grpc/src/main/resources/logback.xml new file mode 100644 index 00000000000..14ecfc13767 --- /dev/null +++ b/seata-test-grpc/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + diff --git a/seata-test-grpc/src/main/resources/registry.conf b/seata-test-grpc/src/main/resources/registry.conf new file mode 100644 index 00000000000..a105dc3e833 --- /dev/null +++ b/seata-test-grpc/src/main/resources/registry.conf @@ -0,0 +1,124 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa、custom + type = "file" + + nacos { + application = "seata-server" + serverAddr = "127.0.0.1:8848" + group = "SEATA_GROUP" + namespace = "" + username = "" + password = "" + contextPath = "" + ##if use MSE Nacos with auth, mutex with username/password attribute + #accessKey = "" + #secretKey = "" + ##if use Nacos naming meta-data for SLB service registry, specify nacos address pattern rules here + #slbPattern = "" + } + eureka { + serviceUrl = "http://localhost:8761/eureka" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + password = "" + timeout = "0" + } + zk { + serverAddr = "127.0.0.1:2181" + sessionTimeout = 6000 + connectTimeout = 2000 + username = "" + password = "" + } + consul { + serverAddr = "127.0.0.1:8500" + aclToken = "" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } + custom { + name = "" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig、custom + type = "file" + raft { + metadata-max-age-ms = 30000 + serverAddr = "127.0.0.1:8848" + } + nacos { + serverAddr = "127.0.0.1:8848" + namespace = "" + group = "SEATA_GROUP" + username = "" + password = "" + contextPath = "" + ##if use MSE Nacos with auth, mutex with username/password attribute + #accessKey = "" + #secretKey = "" + dataId = "seata.properties" + } + consul { + serverAddr = "127.0.0.1:8500" + key = "seata.properties" + aclToken = "" + } + apollo { + appId = "seata-server" + apolloMeta = "http://192.168.1.204:8801" + namespace = "application" + apolloAccesskeySecret = "" + cluster = "" + } + zk { + serverAddr = "127.0.0.1:2181" + sessionTimeout = 6000 + connectTimeout = 2000 + username = "" + password = "" + nodePath = "/seata/seata.properties" + } + etcd3 { + serverAddr = "http://localhost:2379" + key = "seata.properties" + } + file { + name = "file.conf" + } + custom { + name = "" + } +} diff --git a/serializer/seata-serializer-protobuf/pom.xml b/serializer/seata-serializer-protobuf/pom.xml index d3117161ef8..96c13b38873 100644 --- a/serializer/seata-serializer-protobuf/pom.xml +++ b/serializer/seata-serializer-protobuf/pom.xml @@ -55,7 +55,7 @@ org.xolstice.maven.plugins protobuf-maven-plugin - ${project.basedir}/src/main/resources/protobuf/org/apache/seata/protocol/transcation/ + ../../core/src/main/resources/protobuf/org/apache/seata/protocol/transcation/ com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertorTest.java index d85891663e2..2fb5b18f47b 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertorTest.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.BatchResultMessage; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.BranchCommitResponse; -import org.apache.seata.serializer.protobuf.generated.BatchResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.BatchResultMessageProto; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertorTest.java index a0f811248a6..40196667089 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.BranchCommitRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchCommitRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchCommitRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertorTest.java index 6a1dc52e251..7c4d040f06f 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.BranchCommitResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchCommitResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertorTest.java index e0de4e6675a..e161f747560 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.BranchRegisterRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchRegisterRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java index 2ef597237f2..520fb4fdec5 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.BranchRegisterResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.BranchRegisterResponse; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java index 4085a16e532..f3c3aa5d774 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.BranchReportRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchReportRequestProto; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchReportRequest; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertorTest.java index 5726329ab33..29c5ae2ebe2 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.BranchReportResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchReportResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.BranchReportResponse; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertorTest.java index b618d17f4d1..09b8e2cecd6 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.BranchRollbackRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchRollbackRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java index 6457ab173bb..9f93007a558 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.BranchRollbackResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java index c46abae4f38..30e47787012 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalBeginRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginRequestProto; import org.apache.seata.core.protocol.transaction.GlobalBeginRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertorTest.java index 95914c664ca..b715b218654 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalBeginResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.GlobalBeginResponse; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertorTest.java index 1da1e87b569..fcf1a760682 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalCommitRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitRequestProto; import org.apache.seata.core.protocol.transaction.GlobalCommitRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertorTest.java index 38c9297fa43..f0b95f7b216 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalCommitResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java index da632fac999..b1b69b2d790 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.GlobalLockQueryRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java index 44353889be2..92008c341e3 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.GlobalLockQueryResponse; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertorTest.java index d0c5a096e99..494455eded8 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalRollbackRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackRequestProto; import org.apache.seata.core.protocol.transaction.GlobalRollbackRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertorTest.java index e20a92acd72..0f0f7923718 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalRollbackResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertorTest.java index 50fd4ea1d46..65f5f0b4fc8 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusRequestProto; import org.apache.seata.core.protocol.transaction.GlobalStatusRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertorTest.java index 0d59b81172c..dc813c68323 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.GlobalStatusResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertorTest.java index bfacdcf2ca8..31eba4123bc 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.HeartbeatMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.HeartbeatMessageProto; import org.apache.seata.core.protocol.HeartbeatMessage; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeMessageConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeMessageConvertorTest.java index 5c2bf1dc6bd..1a7495c1e9c 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeMessageConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeMessageConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.MergedWarpMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MergedWarpMessageProto; import org.apache.seata.core.protocol.AbstractMessage; import org.apache.seata.core.protocol.MergedWarpMessage; import org.apache.seata.core.protocol.transaction.GlobalBeginRequest; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertorTest.java index c42efb3d5c5..c51de4bd48b 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.MergedResultMessageProto; +import org.apache.seata.core.serializer.protobuf.generated.MergedResultMessageProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.AbstractResultMessage; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java index 173e258a029..4a0ed55430d 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.RegisterRMRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterRMRequestProto; import org.apache.seata.core.protocol.RegisterRMRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertorTest.java index 3ce78b78261..d464e0149e7 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.RegisterRMResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterRMResponseProto; import org.apache.seata.core.protocol.RegisterRMResponse; import org.apache.seata.core.protocol.ResultCode; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertorTest.java index f7e22774f1f..3590e736b67 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.RegisterTMRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto; import org.apache.seata.core.protocol.RegisterTMRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertorTest.java index 73e073676d6..f3a8f04e94b 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.RegisterTMResponseProto; +import org.apache.seata.core.serializer.protobuf.generated.RegisterTMResponseProto; import org.apache.seata.core.protocol.RegisterTMResponse; import org.apache.seata.core.protocol.ResultCode; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertorTest.java index a4fb3f5c184..556f2c89bdb 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.serializer.protobuf.convertor; +package org.apache.seata.core.serializer.protobuf.convertor; -import org.apache.seata.serializer.protobuf.generated.UndoLogDeleteRequestProto; +import org.apache.seata.core.serializer.protobuf.generated.UndoLogDeleteRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.UndoLogDeleteRequest; import org.junit.jupiter.api.Test; diff --git a/server/pom.xml b/server/pom.xml index 341c90cc2a5..a504f807a6c 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -274,6 +274,11 @@ com.alipay.sofa bolt + + mysql + mysql-connector-java + 8.0.28 + org.codehaus.janino janino diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml index c70a2f842f4..120132ced1c 100644 --- a/server/src/main/resources/application.yml +++ b/server/src/main/resources/application.yml @@ -1,26 +1,23 @@ +# Copyright 1999-2019 Seata.io Group. # -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. server: port: 7091 spring: application: - name: seata-server + name: seata-server1 logging: config: classpath:logback-spring.xml @@ -33,24 +30,176 @@ logging: bootstrap-servers: 127.0.0.1:9092 topic: logback_to_logstash -console: - user: - username: seata - password: seata seata: + security: + secretKey: "xxx" + tokenValidityInMilliseconds: 1000000000 config: - # support: nacos, consul, apollo, zk, etcd3 - type: file + # support: nacos 、 consul 、 apollo 、 zk 、 etcd3 + type: nacos + nacos: + server-addr: 127.0.0.1:8848 + namespace: + group: SEATA_GROUP + username: nacos + password: nacos + context-path: + ##if use MSE Nacos with auth, mutex with username/password attribute + #access-key: + #secret-key: + data-id: seataServer.properties + consul: + server-addr: 127.0.0.1:8500 + acl-token: + key: seata.properties + apollo: + appId: seata-server + apollo-meta: http://192.168.1.204:8801 + apollo-config-service: http://192.168.1.204:8080 + namespace: application + apollo-access-key-secret: + cluster: seata + zk: + server-addr: 127.0.0.1:2181 + session-timeout: 6000 + connect-timeout: 2000 + username: + password: a + node-path: /seata/seata.properties + etcd3: + server-addr: http://localhost:2379 + key: seata.properties registry: - # support: nacos, eureka, redis, zk, consul, etcd3, sofa - type: file + # support: nacos 、 eureka 、 redis 、 zk 、 consul 、 etcd3 、 sofa + type: nacos + preferred-networks: 30.240.* + nacos: + application: seata-server1 + server-addr: 127.0.0.1:8848 + group: SEATA_GROUP + namespace: + cluster: default + username: nacos + password: nacos + context-path: + ##if use MSE Nacos with auth, mutex with username/password attribute + #access-key: + #secret-key: + eureka: + service-url: http://localhost:8761/eureka + application: default + weight: 1 + redis: + server-addr: localhost:6379 + db: 0 + password: + cluster: default + timeout: 0 + zk: + cluster: default + server-addr: 127.0.0.1:2181 + session-timeout: 6000 + connect-timeout: 2000 + username: + password: + consul: + cluster: default + server-addr: 127.0.0.1:8500 + acl-token: + etcd3: + cluster: default + server-addr: http://localhost:2379 + sofa: + server-addr: 127.0.0.1:9603 + application: default + region: DEFAULT_ZONE + datacenter: DefaultDataCenter + cluster: default + group: SEATA_GROUP + address-wait-time: 3000 + + server: + service-port: 8091 #If not configured, the default is '${server.port} + 1000' + max-commit-retry-timeout: -1 + max-rollback-retry-timeout: -1 + rollback-retry-timeout-unlock-enable: false + enable-check-auth: true + enable-parallel-request-handle: true + retry-dead-threshold: 130000 + xaer-nota-retry-timeout: 60000 + enableParallelRequestHandle: true + recovery: + committing-retry-period: 1000 + async-committing-retry-period: 1000 + rollbacking-retry-period: 1000 + timeout-retry-period: 1000 + undo: + log-save-days: 7 + log-delete-period: 86400000 + session: + branch-async-queue-size: 5000 #branch async remove queue size + enable-branch-async-remove: false #enable to asynchronous remove branchSession store: - # support: file 、 db 、 redis 、 raft - mode: file - # server: - # service-port: 8091 #If not configured, the default is '${server.port} + 1000' - security: - secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017 - tokenValidityInMilliseconds: 1800000 - ignore: - urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/version.json,/health,/error \ No newline at end of file + # support: file 、 db 、 redis + mode: db + session: + mode: db + lock: + mode: db + file: + dir: sessionStore + max-branch-session-size: 16384 + max-global-session-size: 512 + file-write-buffer-cache-size: 16384 + session-reload-read-size: 100 + flush-disk-mode: async + db: + datasource: druid + db-type: mysql + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://127.0.0.1:3305/seata?rewriteBatchedStatements=true&useSSL=false + user: root + password: root 1234 + min-conn: 10 + max-conn: 100 + global-table: global_table + branch-table: branch_table + lock-table: lock_table + distributed-lock-table: distributed_lock + query-limit: 1000 + max-wait: 5000 + redis: + mode: single + database: 0 + min-conn: 10 + max-conn: 100 + password: + max-total: 100 + query-limit: 1000 + single: + host: 127.0.0.1 + port: 6379 + sentinel: + master-name: + sentinel-hosts: + sentinel-password: + metrics: + enabled: false + registry-type: compact + exporter-list: prometheus + exporter-prometheus-port: 9898 + transport: + rpc-tc-request-timeout: 15000 + enable-tc-server-batch-send-response: false + shutdown: + wait: 3 + thread-factory: + boss-thread-prefix: NettyBoss + worker-thread-prefix: NettyServerNIOWorker + boss-thread-size: 1 +console: + user: + username: nidemingzi + password: nidemima + + From 2e9d2329e29fbed8c18f9f567a9445ac8104d06d Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Fri, 16 Aug 2024 22:29:16 +0800 Subject: [PATCH 02/42] grpc protocol --- .../core/protocol/ProtocolConstants.java | 4 +- .../core/rpc/netty/grpc/GrpcDecoder.java | 40 +- .../core/rpc/netty/grpc/GrpcEncoder.java | 12 +- .../core/rpc/netty/v0/ProtocolDecoderV0.java | 6 +- .../core/rpc/netty/v0/ProtocolEncoderV0.java | 6 +- .../rpc/netty/v0/ProtocolRpcMessageV0.java | 2 +- .../core/rpc/netty/v1/ProtocolDecoderV1.java | 6 +- .../core/rpc/netty/v1/ProtocolEncoderV1.java | 6 +- .../serializer/SerializerServiceLoader.java | 27 + .../seata/core/serializer/SerializerType.java | 7 + .../generated/AbstractBranchEndRequest.java | 62 - .../AbstractBranchEndRequestProto.java | 1317 ----------------- ...bstractBranchEndRequestProtoOrBuilder.java | 112 -- .../generated/AbstractBranchEndResponse.java | 61 - .../AbstractBranchEndResponseProto.java | 916 ------------ ...stractBranchEndResponseProtoOrBuilder.java | 53 - .../generated/AbstractGlobalEndRequest.java | 57 - .../AbstractGlobalEndRequestProto.java | 893 ----------- ...bstractGlobalEndRequestProtoOrBuilder.java | 48 - .../generated/AbstractGlobalEndResponse.java | 60 - .../AbstractGlobalEndResponseProto.java | 713 --------- ...stractGlobalEndResponseProtoOrBuilder.java | 35 - .../generated/AbstractIdentifyRequest.java | 57 - .../AbstractIdentifyRequestProto.java | 1169 --------------- ...AbstractIdentifyRequestProtoOrBuilder.java | 72 - .../generated/AbstractIdentifyResponse.java | 57 - .../AbstractIdentifyResponseProto.java | 958 ------------ ...bstractIdentifyResponseProtoOrBuilder.java | 54 - .../protobuf/generated/AbstractMessage.java | 54 - .../generated/AbstractMessageProto.java | 525 ------- .../AbstractMessageProtoOrBuilder.java | 20 - .../generated/AbstractResultMessage.java | 59 - .../generated/AbstractResultMessageProto.java | 851 ----------- .../AbstractResultMessageProtoOrBuilder.java | 47 - .../generated/AbstractTransactionRequest.java | 55 - .../AbstractTransactionRequestProto.java | 617 -------- ...tractTransactionRequestProtoOrBuilder.java | 24 - .../AbstractTransactionResponse.java | 61 - .../AbstractTransactionResponseProto.java | 713 --------- ...ractTransactionResponseProtoOrBuilder.java | 35 - .../generated/BatchResultMessage.java | 59 - .../generated/BatchResultMessageProto.java | 1145 -------------- .../BatchResultMessageProtoOrBuilder.java | 65 - .../generated/BranchCommitRequest.java | 55 - .../generated/BranchCommitRequestProto.java | 617 -------- .../BranchCommitRequestProtoOrBuilder.java | 24 - .../generated/BranchCommitResponse.java | 55 - .../generated/BranchCommitResponseProto.java | 617 -------- .../BranchCommitResponseProtoOrBuilder.java | 24 - .../generated/BranchRegisterRequest.java | 62 - .../generated/BranchRegisterRequestProto.java | 1265 ---------------- .../BranchRegisterRequestProtoOrBuilder.java | 83 -- .../generated/BranchRegisterResponse.java | 56 - .../BranchRegisterResponseProto.java | 682 --------- .../BranchRegisterResponseProtoOrBuilder.java | 30 - .../generated/BranchReportRequest.java | 66 - .../generated/BranchReportRequestProto.java | 1280 ---------------- .../BranchReportRequestProtoOrBuilder.java | 88 -- .../generated/BranchReportResponse.java | 56 - .../generated/BranchReportResponseProto.java | 609 -------- .../BranchReportResponseProtoOrBuilder.java | 24 - .../generated/BranchRollbackRequest.java | 55 - .../generated/BranchRollbackRequestProto.java | 617 -------- .../BranchRollbackRequestProtoOrBuilder.java | 24 - .../generated/BranchRollbackResponse.java | 56 - .../BranchRollbackResponseProto.java | 617 -------- .../BranchRollbackResponseProtoOrBuilder.java | 24 - .../protobuf/generated/BranchStatus.java | 46 - .../protobuf/generated/BranchStatusProto.java | 303 ---- .../protobuf/generated/BranchType.java | 39 - .../protobuf/generated/BranchTypeProto.java | 126 -- .../generated/GlobalBeginRequest.java | 56 - .../generated/GlobalBeginRequestProto.java | 811 ---------- .../GlobalBeginRequestProtoOrBuilder.java | 42 - .../generated/GlobalBeginResponse.java | 56 - .../generated/GlobalBeginResponseProto.java | 885 ----------- .../GlobalBeginResponseProtoOrBuilder.java | 48 - .../generated/GlobalCommitRequest.java | 55 - .../generated/GlobalCommitRequestProto.java | 609 -------- .../GlobalCommitRequestProtoOrBuilder.java | 24 - .../generated/GlobalCommitResponse.java | 55 - .../generated/GlobalCommitResponseProto.java | 609 -------- .../GlobalCommitResponseProtoOrBuilder.java | 24 - .../generated/GlobalLockQueryRequest.java | 55 - .../GlobalLockQueryRequestProto.java | 609 -------- .../GlobalLockQueryRequestProtoOrBuilder.java | 24 - .../generated/GlobalLockQueryResponse.java | 56 - .../GlobalLockQueryResponseProto.java | 674 --------- ...GlobalLockQueryResponseProtoOrBuilder.java | 30 - .../generated/GlobalReportRequest.java | 60 - .../generated/GlobalReportRequestProto.java | 705 --------- .../GlobalReportRequestProtoOrBuilder.java | 35 - .../generated/GlobalReportResponse.java | 55 - .../generated/GlobalReportResponseProto.java | 609 -------- .../GlobalReportResponseProtoOrBuilder.java | 24 - .../generated/GlobalRollbackRequest.java | 55 - .../generated/GlobalRollbackRequestProto.java | 609 -------- .../GlobalRollbackRequestProtoOrBuilder.java | 24 - .../generated/GlobalRollbackResponse.java | 56 - .../GlobalRollbackResponseProto.java | 609 -------- .../GlobalRollbackResponseProtoOrBuilder.java | 24 - .../protobuf/generated/GlobalStatus.java | 46 - .../protobuf/generated/GlobalStatusProto.java | 375 ----- .../generated/GlobalStatusRequest.java | 55 - .../generated/GlobalStatusRequestProto.java | 609 -------- .../GlobalStatusRequestProtoOrBuilder.java | 24 - .../generated/GlobalStatusResponse.java | 55 - .../generated/GlobalStatusResponseProto.java | 609 -------- .../GlobalStatusResponseProtoOrBuilder.java | 24 - .../protobuf/generated/HeartbeatMessage.java | 50 - .../generated/HeartbeatMessageProto.java | 494 ------- .../HeartbeatMessageProtoOrBuilder.java | 15 - .../generated/MergedResultMessage.java | 58 - .../generated/MergedResultMessageProto.java | 968 ------------ .../MergedResultMessageProtoOrBuilder.java | 48 - .../protobuf/generated/MergedWarpMessage.java | 58 - .../generated/MergedWarpMessageProto.java | 1145 -------------- .../MergedWarpMessageProtoOrBuilder.java | 65 - .../protobuf/generated/MessageType.java | 58 - .../protobuf/generated/MessageTypeProto.java | 620 -------- .../protobuf/generated/RegisterRMRequest.java | 56 - .../generated/RegisterRMRequestProto.java | 755 ---------- .../RegisterRMRequestProtoOrBuilder.java | 36 - .../generated/RegisterRMResponse.java | 55 - .../generated/RegisterRMResponseProto.java | 617 -------- .../RegisterRMResponseProtoOrBuilder.java | 24 - .../protobuf/generated/RegisterTMRequest.java | 55 - .../generated/RegisterTMRequestProto.java | 617 -------- .../RegisterTMRequestProtoOrBuilder.java | 24 - .../generated/RegisterTMResponse.java | 55 - .../generated/RegisterTMResponseProto.java | 617 -------- .../RegisterTMResponseProtoOrBuilder.java | 24 - .../protobuf/generated/ResultCode.java | 39 - .../protobuf/generated/ResultCodeProto.java | 117 -- .../generated/TransactionExceptionCode.java | 52 - .../TransactionExceptionCodeProto.java | 381 ----- .../generated/UndoLogDeleteRequest.java | 61 - .../generated/UndoLogDeleteRequestProto.java | 1005 ------------- .../UndoLogDeleteRequestProtoOrBuilder.java | 78 - .../SerializerSecurityRegistryTest.java | 58 - ...itional-spring-configuration-metadata.json | 2 +- .../org/apache/seata/grpc/GrpcClient.java | 4 +- serializer/seata-serializer-protobuf/pom.xml | 2 +- .../serializer/protobuf/GrpcSerializer.java | 44 + .../serializer/protobuf/ProtobufHelper.java | 2 +- .../protobuf/ProtobufInnerSerializer.java | 2 +- .../protobuf/ProtobufSerializer.java | 6 +- .../BatchResultMessageConvertor.java | 10 +- .../BranchCommitRequestConvertor.java | 14 +- .../BranchCommitResponseConvertor.java | 20 +- .../BranchRegisterRequestConvertor.java | 12 +- .../BranchRegisterResponseConvertor.java | 16 +- .../BranchReportRequestConvertor.java | 14 +- .../BranchReportResponseConvertor.java | 16 +- .../BranchRollbackRequestConvertor.java | 14 +- .../BranchRollbackResponseConvertor.java | 20 +- .../GlobalBeginRequestConvertor.java | 10 +- .../GlobalBeginResponseConvertor.java | 16 +- .../GlobalCommitRequestConvertor.java | 12 +- .../GlobalCommitResponseConvertor.java | 20 +- .../GlobalLockQueryRequestConvertor.java | 14 +- .../GlobalLockQueryResponseConvertor.java | 16 +- .../GlobalReportRequestConvertor.java | 16 +- .../GlobalReportResponseConvertor.java | 20 +- .../GlobalRollbackRequestConvertor.java | 12 +- .../GlobalRollbackResponseConvertor.java | 20 +- .../GlobalStatusRequestConvertor.java | 12 +- .../GlobalStatusResponseConvertor.java | 20 +- .../convertor/HeartbeatMessageConvertor.java | 4 +- .../MergeResultMessageConvertor.java | 10 +- .../convertor/MergedWarpMessageConvertor.java | 10 +- .../protobuf/convertor/PbConvertor.java | 2 +- .../convertor/RegisterRMRequestConvertor.java | 10 +- .../RegisterRMResponseConvertor.java | 14 +- .../convertor/RegisterTMRequestConvertor.java | 10 +- .../RegisterTMResponseConvertor.java | 14 +- .../UndoLogDeleteRequestConvertor.java | 12 +- .../manager/ProtobufConvertManager.java | 120 +- ...rg.apache.seata.core.serializer.Serializer | 3 +- .../abstractBranchEndRequest.proto | 2 +- .../abstractBranchEndResponse.proto | 2 +- .../abstractGlobalEndRequest.proto | 2 +- .../abstractGlobalEndResponse.proto | 2 +- .../abstractIdentifyRequest.proto | 2 +- .../abstractIdentifyResponse.proto | 2 +- .../transcation}/abstractMessage.proto | 2 +- .../transcation}/abstractResultMessage.proto | 2 +- .../abstractTransactionRequest.proto | 2 +- .../abstractTransactionResponse.proto | 2 +- .../transcation}/batchResultMessage.proto | 2 +- .../transcation}/branchCommitRequest.proto | 2 +- .../transcation}/branchCommitResponse.proto | 2 +- .../transcation}/branchRegisterRequest.proto | 2 +- .../transcation}/branchRegisterResponse.proto | 2 +- .../transcation}/branchReportRequest.proto | 2 +- .../transcation}/branchReportResponse.proto | 2 +- .../transcation}/branchRollbackRequest.proto | 2 +- .../transcation}/branchRollbackResponse.proto | 2 +- .../protocol/transcation}/branchStatus.proto | 2 +- .../protocol/transcation}/branchType.proto | 2 +- .../transcation}/globalBeginRequest.proto | 2 +- .../transcation}/globalBeginResponse.proto | 2 +- .../transcation}/globalCommitRequest.proto | 2 +- .../transcation}/globalCommitResponse.proto | 2 +- .../transcation}/globalLockQueryRequest.proto | 2 +- .../globalLockQueryResponse.proto | 2 +- .../transcation}/globalReportRequest.proto | 2 +- .../transcation}/globalReportResponse.proto | 2 +- .../transcation}/globalRollbackRequest.proto | 2 +- .../transcation}/globalRollbackResponse.proto | 2 +- .../protocol/transcation}/globalStatus.proto | 2 +- .../transcation}/globalStatusRequest.proto | 2 +- .../transcation}/globalStatusResponse.proto | 2 +- .../transcation}/heartbeatMessage.proto | 2 +- .../transcation}/mergedResultMessage.proto | 2 +- .../transcation}/mergedWarpMessage.proto | 2 +- .../protocol/transcation}/messageType.proto | 2 +- .../transcation}/registerRMRequest.proto | 2 +- .../transcation}/registerRMResponse.proto | 2 +- .../transcation}/registerTMRequest.proto | 2 +- .../transcation}/registerTMResponse.proto | 2 +- .../protocol/transcation}/resultCode.proto | 2 +- .../transactionExceptionCode.proto | 2 +- .../transcation}/undoLogDeleteRequest.proto | 2 +- .../BatchResultMessageConvertorTest.java | 4 +- .../BranchCommitRequestConvertorTest.java | 4 +- .../BranchCommitResponseConvertorTest.java | 4 +- .../BranchRegisterRequestConvertorTest.java | 4 +- .../BranchRegisterResponseConvertorTest.java | 4 +- .../BranchReportRequestConvertorTest.java | 4 +- .../BranchReportResponseConvertorTest.java | 4 +- .../BranchRollbackRequestConvertorTest.java | 4 +- .../BranchRollbackResponseConvertorTest.java | 4 +- .../GlobalBeginRequestConvertorTest.java | 4 +- .../GlobalBeginResponseConvertorTest.java | 4 +- .../GlobalCommitRequestConvertorTest.java | 4 +- .../GlobalCommitResponseConvertorTest.java | 4 +- .../GlobalLockQueryRequestConvertorTest.java | 4 +- .../GlobalLockQueryResponseConvertorTest.java | 4 +- .../GlobalRollbackRequestConvertorTest.java | 4 +- .../GlobalRollbackResponseConvertorTest.java | 4 +- .../GlobalStatusRequestConvertorTest.java | 4 +- .../GlobalStatusResponseConvertorTest.java | 4 +- .../HeartbeatMessageConvertorTest.java | 4 +- .../convertor/MergeMessageConvertorTest.java | 4 +- .../MergeResultMessageConvertorTest.java | 4 +- .../RegisterRMRequestConvertorTest.java | 4 +- .../RegisterRMResponseConvertorTest.java | 4 +- .../RegisterTMRequestConvertorTest.java | 4 +- .../RegisterTMResponseConvertorTest.java | 4 +- .../UndoLogDeleteRequestConvertorTest.java | 4 +- 251 files changed, 487 insertions(+), 36735 deletions(-) delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessage.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessage.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessage.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatus.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatusProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchType.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchTypeProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatus.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessage.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessage.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessage.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageType.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageTypeProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponse.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProtoOrBuilder.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCode.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCodeProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCode.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCodeProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequest.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java delete mode 100644 core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java create mode 100644 serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/ProtobufHelper.java (98%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/ProtobufInnerSerializer.java (98%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/ProtobufSerializer.java (94%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BatchResultMessageConvertor.java (90%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BranchCommitRequestConvertor.java (85%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BranchCommitResponseConvertor.java (83%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java (86%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java (83%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BranchReportRequestConvertor.java (85%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BranchReportResponseConvertor.java (82%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java (85%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java (83%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java (84%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java (84%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java (83%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java (82%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java (85%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java (84%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalReportRequestConvertor.java (83%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalReportResponseConvertor.java (82%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java (83%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java (82%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java (83%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java (82%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/HeartbeatMessageConvertor.java (90%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/MergeResultMessageConvertor.java (90%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/MergedWarpMessageConvertor.java (89%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/PbConvertor.java (93%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/RegisterRMRequestConvertor.java (87%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/RegisterRMResponseConvertor.java (86%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/RegisterTMRequestConvertor.java (87%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/RegisterTMResponseConvertor.java (86%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java (84%) rename {core/src/main/java/org/apache/seata/core => serializer/seata-serializer-protobuf/src/main/java/org/apache/seata}/serializer/protobuf/manager/ProtobufConvertManager.java (76%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractBranchEndRequest.proto (95%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractBranchEndResponse.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractGlobalEndRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractGlobalEndResponse.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractIdentifyRequest.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractIdentifyResponse.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractMessage.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractResultMessage.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractTransactionRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/abstractTransactionResponse.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/batchResultMessage.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchCommitRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchCommitResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchRegisterRequest.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchRegisterResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchReportRequest.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchReportResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchRollbackRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchRollbackResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchStatus.proto (97%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/branchType.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalBeginRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalBeginResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalCommitRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalCommitResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalLockQueryRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalLockQueryResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalReportRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalReportResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalRollbackRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalRollbackResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalStatus.proto (97%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalStatusRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/globalStatusResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/heartbeatMessage.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/mergedResultMessage.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/mergedWarpMessage.proto (94%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/messageType.proto (97%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/registerRMRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/registerRMResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/registerTMRequest.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/registerTMResponse.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/resultCode.proto (93%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/transactionExceptionCode.proto (97%) rename {core/src/main/proto => serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation}/undoLogDeleteRequest.proto (94%) diff --git a/core/src/main/java/org/apache/seata/core/protocol/ProtocolConstants.java b/core/src/main/java/org/apache/seata/core/protocol/ProtocolConstants.java index 4b2b7ef8700..7b72181df20 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/ProtocolConstants.java +++ b/core/src/main/java/org/apache/seata/core/protocol/ProtocolConstants.java @@ -19,8 +19,8 @@ import org.apache.seata.config.ConfigurationFactory; import org.apache.seata.core.compressor.CompressorType; import org.apache.seata.core.constants.ConfigurationKeys; -import org.apache.seata.core.serializer.SerializerServiceLoader; -import org.apache.seata.core.serializer.SerializerType; +import org.apache.seata.serializer.SerializerServiceLoader; +import org.apache.seata.serializer.SerializerType; /** * @since 0.7.0 diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index e36d121f83e..db7bce61823 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -1,18 +1,17 @@ package org.apache.seata.core.rpc.netty.grpc; import com.google.protobuf.Any; -import com.google.protobuf.InvalidProtocolBufferException; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http2.Http2DataFrame; import io.netty.handler.codec.http2.Http2HeadersFrame; import io.netty.util.ReferenceCounted; -import org.apache.seata.common.exception.ShouldNeverHappenException; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.protocol.generated.GrpcMessageProto; -import org.apache.seata.core.serializer.protobuf.convertor.PbConvertor; -import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.core.serializer.Serializer; +import org.apache.seata.core.serializer.SerializerServiceLoader; +import org.apache.seata.core.serializer.SerializerType; public class GrpcDecoder extends ChannelDuplexHandler { @@ -46,34 +45,21 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc Any body = grpcMessageProto.getBody(); int messageType = grpcMessageProto.getMessageType(); int messageId = grpcMessageProto.getId(); - final Class clazz = ProtobufConvertManager.getInstance().fetchProtoClass( - getTypeNameFromTypeUrl(body.getTypeUrl())); - if (body.is(clazz)) { - try { - Object ob = body.unpack(clazz); - final PbConvertor pbConvertor = ProtobufConvertManager.getInstance().fetchReversedConvertor(clazz.getName()); - Object model = pbConvertor.convert2Model(ob); + byte[] byteArray = body.toByteArray(); - RpcMessage rpcMsg = new RpcMessage(); - rpcMsg.setMessageType((byte) messageType); - rpcMsg.setBody(model); - rpcMsg.setId(messageId); - rpcMsg.setHeadMap(grpcMessageProto.getHeadMapMap()); + Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode())); + Object messageBody = serializer.deserialize(byteArray); - ctx.fireChannelRead(rpcMsg); - } catch (InvalidProtocolBufferException e) { - throw new ShouldNeverHappenException(e); - } - } + RpcMessage rpcMsg = new RpcMessage(); + rpcMsg.setMessageType((byte) messageType); + rpcMsg.setBody(messageBody); + rpcMsg.setId(messageId); + rpcMsg.setHeadMap(grpcMessageProto.getHeadMapMap()); + + ctx.fireChannelRead(rpcMsg); } public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headersFrame) throws Exception { // TODO 后续可以解压缩逻辑 } - - private String getTypeNameFromTypeUrl(String typeUri) { - int pos = typeUri.lastIndexOf('/'); - return pos == -1 ? "" : typeUri.substring(pos + 1); - } - } diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java index 292b263f5df..d41d6cc34e7 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -1,7 +1,6 @@ package org.apache.seata.core.rpc.netty.grpc; import com.google.protobuf.Any; -import com.google.protobuf.Message; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelOutboundHandlerAdapter; @@ -12,8 +11,9 @@ import io.netty.handler.codec.http2.Http2Headers; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.protocol.generated.GrpcMessageProto; -import org.apache.seata.core.serializer.protobuf.convertor.PbConvertor; -import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.core.serializer.Serializer; +import org.apache.seata.core.serializer.SerializerServiceLoader; +import org.apache.seata.core.serializer.SerializerType; import java.nio.ByteBuffer; import java.util.Map; @@ -43,10 +43,10 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) ctx.writeAndFlush(new DefaultHttp2HeadersFrame(headers)); } - PbConvertor pbConvertor = ProtobufConvertManager.getInstance().fetchConvertor(body.getClass().getName()); - Any grpcBody = Any.pack((Message) pbConvertor.convert2Proto(body)); + Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode())); + Any messageBody = Any.parseFrom(serializer.serialize(body)); GrpcMessageProto grpcMessageProto = GrpcMessageProto.newBuilder() - .setBody(grpcBody) + .setBody(messageBody) .putAllHeadMap(headMap) .setMessageType(messageType) .setId(id).build(); diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java index 8c28ad96c2b..92a40b99740 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java @@ -25,9 +25,9 @@ import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.rpc.netty.ProtocolDecoder; -import org.apache.seata.core.serializer.Serializer; -import org.apache.seata.core.serializer.SerializerServiceLoader; -import org.apache.seata.core.serializer.SerializerType; +import org.apache.seata.serializer.Serializer; +import org.apache.seata.serializer.SerializerServiceLoader; +import org.apache.seata.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java index f217a843294..a717e382061 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java @@ -24,9 +24,9 @@ import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.rpc.netty.ProtocolEncoder; -import org.apache.seata.core.serializer.Serializer; -import org.apache.seata.core.serializer.SerializerServiceLoader; -import org.apache.seata.core.serializer.SerializerType; +import org.apache.seata.serializer.Serializer; +import org.apache.seata.serializer.SerializerServiceLoader; +import org.apache.seata.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java index cea2d7e6f71..9f085ff208b 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java @@ -20,7 +20,7 @@ import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.rpc.netty.ProtocolRpcMessage; -import org.apache.seata.core.serializer.SerializerType; +import org.apache.seata.serializer.SerializerType; import java.util.concurrent.atomic.AtomicLong; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java index ce48b3ce8ca..b296b762846 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java @@ -29,9 +29,9 @@ import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.rpc.netty.ProtocolDecoder; -import org.apache.seata.core.serializer.Serializer; -import org.apache.seata.core.serializer.SerializerServiceLoader; -import org.apache.seata.core.serializer.SerializerType; +import org.apache.seata.serializer.Serializer; +import org.apache.seata.serializer.SerializerServiceLoader; +import org.apache.seata.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java index dd01b948dba..50f3bdf9c65 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java @@ -20,13 +20,13 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; import org.apache.seata.core.rpc.netty.ProtocolEncoder; -import org.apache.seata.core.serializer.Serializer; +import org.apache.seata.serializer.Serializer; import org.apache.seata.core.compressor.Compressor; import org.apache.seata.core.compressor.CompressorFactory; import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; -import org.apache.seata.core.serializer.SerializerServiceLoader; -import org.apache.seata.core.serializer.SerializerType; +import org.apache.seata.serializer.SerializerServiceLoader; +import org.apache.seata.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java index 2ccec776307..173420329de 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java +++ b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java @@ -87,6 +87,33 @@ public static Serializer load(SerializerType type, byte version) throws Enhanced return serializer; } + /** + * Load the service of {@link Serializer} + * + * @param type the serializer type + * @return the service of {@link Serializer} + * @throws EnhancedServiceNotFoundException the enhanced service not found exception + */ + public static Serializer load(SerializerType type) throws EnhancedServiceNotFoundException { + if (type == SerializerType.PROTOBUF) { + try { + ReflectionUtil.getClassByName(PROTOBUF_SERIALIZER_CLASS_NAME); + } catch (ClassNotFoundException e) { + throw new EnhancedServiceNotFoundException("'ProtobufSerializer' not found. " + + "Please manually reference 'org.apache.seata:seata-serializer-protobuf' dependency ", e); + } + } + + String key = type.name(); + Serializer serializer = SERIALIZER_MAP.get(key); + if (serializer == null) { + serializer = EnhancedServiceLoader.load(Serializer.class, type.name()); + + SERIALIZER_MAP.put(key, serializer); + } + return serializer; + } + private static String serialzerKey(SerializerType type, byte version) { if (type == SerializerType.SEATA) { return type.name() + version; diff --git a/core/src/main/java/org/apache/seata/core/serializer/SerializerType.java b/core/src/main/java/org/apache/seata/core/serializer/SerializerType.java index c60067e72bc..8c5d21f68f5 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/SerializerType.java +++ b/core/src/main/java/org/apache/seata/core/serializer/SerializerType.java @@ -63,6 +63,13 @@ public enum SerializerType { * Math.pow(2, 5) */ JACKSON((byte)0x32), + + /** + * The grpc. + *

+ * Math.pow(2, 6) + */ + GRPC((byte)0x64) ; private final byte code; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequest.java deleted file mode 100644 index 16efda81244..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractBranchEndRequest { - private AbstractBranchEndRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\036abstractBranchEndRequest.proto\022\"org.ap" + - "ache.seata.protocol.protobuf\032 abstractTr" + - "ansactionRequest.proto\032\020branchType.proto" + - "\"\235\002\n\035AbstractBranchEndRequestProto\022g\n\032ab" + - "stractTransactionRequest\030\001 \001(\0132C.org.apa" + - "che.seata.protocol.protobuf.AbstractTran" + - "sactionRequestProto\022\013\n\003xid\030\002 \001(\t\022\020\n\010bran" + - "chId\030\003 \001(\003\022G\n\nbranchType\030\004 \001(\01623.org.apa" + - "che.seata.protocol.protobuf.BranchTypePr" + - "oto\022\022\n\nresourceId\030\005 \001(\t\022\027\n\017applicationDa" + - "ta\030\006 \001(\tBQ\n3org.apache.seata.core.serial" + - "izer.protobuf.generatedB\030AbstractBranchE" + - "ndRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionRequest.getDescriptor(), - BranchType.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor, - new String[] { "AbstractTransactionRequest", "Xid", "BranchId", "BranchType", "ResourceId", "ApplicationData", }); - AbstractTransactionRequest.getDescriptor(); - BranchType.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProto.java deleted file mode 100644 index 449ba46252c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProto.java +++ /dev/null @@ -1,1317 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *

- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto} - */ -public final class AbstractBranchEndRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) - AbstractBranchEndRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractBranchEndRequestProto.newBuilder() to construct. - private AbstractBranchEndRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractBranchEndRequestProto() { - xid_ = ""; - branchType_ = 0; - resourceId_ = ""; - applicationData_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractBranchEndRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractBranchEndRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 24: { - - branchId_ = input.readInt64(); - break; - } - case 32: { - int rawValue = input.readEnum(); - - branchType_ = rawValue; - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - - resourceId_ = s; - break; - } - case 50: { - String s = input.readStringRequireUtf8(); - - applicationData_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractBranchEndRequestProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - @Override - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - @Override - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - @Override - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile Object xid_; - /** - * string xid = 2; - * @return The xid. - */ - @Override - public String getXid() { - Object ref = xid_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - @Override - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BRANCHID_FIELD_NUMBER = 3; - private long branchId_; - /** - *
-   **
-   * The Branch id.
-   * 
- * - * int64 branchId = 3; - * @return The branchId. - */ - @Override - public long getBranchId() { - return branchId_; - } - - public static final int BRANCHTYPE_FIELD_NUMBER = 4; - private int branchType_; - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The enum numeric value on the wire for branchType. - */ - @Override public int getBranchTypeValue() { - return branchType_; - } - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The branchType. - */ - @Override public BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - BranchTypeProto result = BranchTypeProto.valueOf(branchType_); - return result == null ? BranchTypeProto.UNRECOGNIZED : result; - } - - public static final int RESOURCEID_FIELD_NUMBER = 5; - private volatile Object resourceId_; - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 5; - * @return The resourceId. - */ - @Override - public String getResourceId() { - Object ref = resourceId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } - } - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 5; - * @return The bytes for resourceId. - */ - @Override - public com.google.protobuf.ByteString - getResourceIdBytes() { - Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int APPLICATIONDATA_FIELD_NUMBER = 6; - private volatile Object applicationData_; - /** - *
-   **
-   * The Application data.
-   * 
- * - * string applicationData = 6; - * @return The applicationData. - */ - @Override - public String getApplicationData() { - Object ref = applicationData_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } - } - /** - *
-   **
-   * The Application data.
-   * 
- * - * string applicationData = 6; - * @return The bytes for applicationData. - */ - @Override - public com.google.protobuf.ByteString - getApplicationDataBytes() { - Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (branchId_ != 0L) { - output.writeInt64(3, branchId_); - } - if (branchType_ != BranchTypeProto.AT.getNumber()) { - output.writeEnum(4, branchType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, resourceId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (branchId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, branchId_); - } - if (branchType_ != BranchTypeProto.AT.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, branchType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, resourceId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractBranchEndRequestProto)) { - return super.equals(obj); - } - AbstractBranchEndRequestProto other = (AbstractBranchEndRequestProto) obj; - - if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; - if (hasAbstractTransactionRequest()) { - if (!getAbstractTransactionRequest() - .equals(other.getAbstractTransactionRequest())) return false; - } - if (!getXid() - .equals(other.getXid())) return false; - if (getBranchId() - != other.getBranchId()) return false; - if (branchType_ != other.branchType_) return false; - if (!getResourceId() - .equals(other.getResourceId())) return false; - if (!getApplicationData() - .equals(other.getApplicationData())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionRequest()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); - } - hash = (37 * hash) + XID_FIELD_NUMBER; - hash = (53 * hash) + getXid().hashCode(); - hash = (37 * hash) + BRANCHID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBranchId()); - hash = (37 * hash) + BRANCHTYPE_FIELD_NUMBER; - hash = (53 * hash) + branchType_; - hash = (37 * hash) + RESOURCEID_FIELD_NUMBER; - hash = (53 * hash) + getResourceId().hashCode(); - hash = (37 * hash) + APPLICATIONDATA_FIELD_NUMBER; - hash = (53 * hash) + getApplicationData().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractBranchEndRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractBranchEndRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractBranchEndRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractBranchEndRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractBranchEndRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractBranchEndRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractBranchEndRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractBranchEndRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractBranchEndRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractBranchEndRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractBranchEndRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractBranchEndRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractBranchEndRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) - AbstractBranchEndRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractBranchEndRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - xid_ = ""; - - branchId_ = 0L; - - branchType_ = 0; - - resourceId_ = ""; - - applicationData_ = ""; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractBranchEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; - } - - @Override - public AbstractBranchEndRequestProto getDefaultInstanceForType() { - return AbstractBranchEndRequestProto.getDefaultInstance(); - } - - @Override - public AbstractBranchEndRequestProto build() { - AbstractBranchEndRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractBranchEndRequestProto buildPartial() { - AbstractBranchEndRequestProto result = new AbstractBranchEndRequestProto(this); - if (abstractTransactionRequestBuilder_ == null) { - result.abstractTransactionRequest_ = abstractTransactionRequest_; - } else { - result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); - } - result.xid_ = xid_; - result.branchId_ = branchId_; - result.branchType_ = branchType_; - result.resourceId_ = resourceId_; - result.applicationData_ = applicationData_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractBranchEndRequestProto) { - return mergeFrom((AbstractBranchEndRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractBranchEndRequestProto other) { - if (other == AbstractBranchEndRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionRequest()) { - mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); - } - if (!other.getXid().isEmpty()) { - xid_ = other.xid_; - onChanged(); - } - if (other.getBranchId() != 0L) { - setBranchId(other.getBranchId()); - } - if (other.branchType_ != 0) { - setBranchTypeValue(other.getBranchTypeValue()); - } - if (!other.getResourceId().isEmpty()) { - resourceId_ = other.resourceId_; - onChanged(); - } - if (!other.getApplicationData().isEmpty()) { - applicationData_ = other.applicationData_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractBranchEndRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractBranchEndRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private Object xid_ = ""; - /** - * string xid = 2; - * @return The xid. - */ - public String getXid() { - Object ref = xid_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - * @param value The xid to set. - * @return This builder for chaining. - */ - public Builder setXid( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - * @return This builder for chaining. - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - * @param value The bytes for xid to set. - * @return This builder for chaining. - */ - public Builder setXidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - xid_ = value; - onChanged(); - return this; - } - - private long branchId_ ; - /** - *
-     **
-     * The Branch id.
-     * 
- * - * int64 branchId = 3; - * @return The branchId. - */ - @Override - public long getBranchId() { - return branchId_; - } - /** - *
-     **
-     * The Branch id.
-     * 
- * - * int64 branchId = 3; - * @param value The branchId to set. - * @return This builder for chaining. - */ - public Builder setBranchId(long value) { - - branchId_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch id.
-     * 
- * - * int64 branchId = 3; - * @return This builder for chaining. - */ - public Builder clearBranchId() { - - branchId_ = 0L; - onChanged(); - return this; - } - - private int branchType_ = 0; - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The enum numeric value on the wire for branchType. - */ - @Override public int getBranchTypeValue() { - return branchType_; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @param value The enum numeric value on the wire for branchType to set. - * @return This builder for chaining. - */ - public Builder setBranchTypeValue(int value) { - - branchType_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The branchType. - */ - @Override - public BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - BranchTypeProto result = BranchTypeProto.valueOf(branchType_); - return result == null ? BranchTypeProto.UNRECOGNIZED : result; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @param value The branchType to set. - * @return This builder for chaining. - */ - public Builder setBranchType(BranchTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return This builder for chaining. - */ - public Builder clearBranchType() { - - branchType_ = 0; - onChanged(); - return this; - } - - private Object resourceId_ = ""; - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - * @return The resourceId. - */ - public String getResourceId() { - Object ref = resourceId_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } else { - return (String) ref; - } - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - * @return The bytes for resourceId. - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - * @param value The resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceId( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceId_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - * @return This builder for chaining. - */ - public Builder clearResourceId() { - - resourceId_ = getDefaultInstance().getResourceId(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - * @param value The bytes for resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceId_ = value; - onChanged(); - return this; - } - - private Object applicationData_ = ""; - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - * @return The applicationData. - */ - public String getApplicationData() { - Object ref = applicationData_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } else { - return (String) ref; - } - } - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - * @return The bytes for applicationData. - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - * @param value The applicationData to set. - * @return This builder for chaining. - */ - public Builder setApplicationData( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationData_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - * @return This builder for chaining. - */ - public Builder clearApplicationData() { - - applicationData_ = getDefaultInstance().getApplicationData(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - * @param value The bytes for applicationData to set. - * @return This builder for chaining. - */ - public Builder setApplicationDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - applicationData_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) - private static final AbstractBranchEndRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractBranchEndRequestProto(); - } - - public static AbstractBranchEndRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractBranchEndRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractBranchEndRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractBranchEndRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java deleted file mode 100644 index 95399143645..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractBranchEndRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - boolean hasAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * string xid = 2; - * @return The xid. - */ - String getXid(); - /** - * string xid = 2; - * @return The bytes for xid. - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - *
-   **
-   * The Branch id.
-   * 
- * - * int64 branchId = 3; - * @return The branchId. - */ - long getBranchId(); - - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The enum numeric value on the wire for branchType. - */ - int getBranchTypeValue(); - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The branchType. - */ - BranchTypeProto getBranchType(); - - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 5; - * @return The resourceId. - */ - String getResourceId(); - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 5; - * @return The bytes for resourceId. - */ - com.google.protobuf.ByteString - getResourceIdBytes(); - - /** - *
-   **
-   * The Application data.
-   * 
- * - * string applicationData = 6; - * @return The applicationData. - */ - String getApplicationData(); - /** - *
-   **
-   * The Application data.
-   * 
- * - * string applicationData = 6; - * @return The bytes for applicationData. - */ - com.google.protobuf.ByteString - getApplicationDataBytes(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponse.java deleted file mode 100644 index d5ca539c0dc..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponse.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractBranchEndResponse { - private AbstractBranchEndResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\037abstractBranchEndResponse.proto\022\"org.a" + - "pache.seata.protocol.protobuf\032!abstractT" + - "ransactionResponse.proto\032\022branchStatus.p" + - "roto\"\367\001\n\036AbstractBranchEndResponseProto\022" + - "i\n\033abstractTransactionResponse\030\001 \001(\0132D.o" + - "rg.apache.seata.protocol.protobuf.Abstra" + - "ctTransactionResponseProto\022\013\n\003xid\030\002 \001(\t\022" + - "\020\n\010branchId\030\003 \001(\003\022K\n\014branchStatus\030\004 \001(\0162" + - "5.org.apache.seata.protocol.protobuf.Bra" + - "nchStatusProtoBR\n3org.apache.seata.core." + - "serializer.protobuf.generatedB\031AbstractB" + - "ranchEndResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionResponse.getDescriptor(), - BranchStatus.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor, - new String[] { "AbstractTransactionResponse", "Xid", "BranchId", "BranchStatus", }); - AbstractTransactionResponse.getDescriptor(); - BranchStatus.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProto.java deleted file mode 100644 index c819656df91..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProto.java +++ /dev/null @@ -1,916 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto} - */ -public final class AbstractBranchEndResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) - AbstractBranchEndResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractBranchEndResponseProto.newBuilder() to construct. - private AbstractBranchEndResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractBranchEndResponseProto() { - xid_ = ""; - branchStatus_ = 0; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractBranchEndResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractBranchEndResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionResponse_); - abstractTransactionResponse_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 24: { - - branchId_ = input.readInt64(); - break; - } - case 32: { - int rawValue = input.readEnum(); - - branchStatus_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractBranchEndResponseProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - @Override - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - @Override - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - @Override - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile Object xid_; - /** - * string xid = 2; - * @return The xid. - */ - @Override - public String getXid() { - Object ref = xid_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - @Override - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BRANCHID_FIELD_NUMBER = 3; - private long branchId_; - /** - * int64 branchId = 3; - * @return The branchId. - */ - @Override - public long getBranchId() { - return branchId_; - } - - public static final int BRANCHSTATUS_FIELD_NUMBER = 4; - private int branchStatus_; - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @return The enum numeric value on the wire for branchStatus. - */ - @Override public int getBranchStatusValue() { - return branchStatus_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @return The branchStatus. - */ - @Override public BranchStatusProto getBranchStatus() { - @SuppressWarnings("deprecation") - BranchStatusProto result = BranchStatusProto.valueOf(branchStatus_); - return result == null ? BranchStatusProto.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (branchId_ != 0L) { - output.writeInt64(3, branchId_); - } - if (branchStatus_ != BranchStatusProto.BUnknown.getNumber()) { - output.writeEnum(4, branchStatus_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionResponse()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (branchId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, branchId_); - } - if (branchStatus_ != BranchStatusProto.BUnknown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, branchStatus_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractBranchEndResponseProto)) { - return super.equals(obj); - } - AbstractBranchEndResponseProto other = (AbstractBranchEndResponseProto) obj; - - if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; - if (hasAbstractTransactionResponse()) { - if (!getAbstractTransactionResponse() - .equals(other.getAbstractTransactionResponse())) return false; - } - if (!getXid() - .equals(other.getXid())) return false; - if (getBranchId() - != other.getBranchId()) return false; - if (branchStatus_ != other.branchStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionResponse()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); - } - hash = (37 * hash) + XID_FIELD_NUMBER; - hash = (53 * hash) + getXid().hashCode(); - hash = (37 * hash) + BRANCHID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBranchId()); - hash = (37 * hash) + BRANCHSTATUS_FIELD_NUMBER; - hash = (53 * hash) + branchStatus_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractBranchEndResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractBranchEndResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractBranchEndResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractBranchEndResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractBranchEndResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractBranchEndResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractBranchEndResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractBranchEndResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractBranchEndResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractBranchEndResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractBranchEndResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractBranchEndResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractBranchEndResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) - AbstractBranchEndResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractBranchEndResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - xid_ = ""; - - branchId_ = 0L; - - branchStatus_ = 0; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractBranchEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; - } - - @Override - public AbstractBranchEndResponseProto getDefaultInstanceForType() { - return AbstractBranchEndResponseProto.getDefaultInstance(); - } - - @Override - public AbstractBranchEndResponseProto build() { - AbstractBranchEndResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractBranchEndResponseProto buildPartial() { - AbstractBranchEndResponseProto result = new AbstractBranchEndResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.xid_ = xid_; - result.branchId_ = branchId_; - result.branchStatus_ = branchStatus_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractBranchEndResponseProto) { - return mergeFrom((AbstractBranchEndResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractBranchEndResponseProto other) { - if (other == AbstractBranchEndResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - if (!other.getXid().isEmpty()) { - xid_ = other.xid_; - onChanged(); - } - if (other.getBranchId() != 0L) { - setBranchId(other.getBranchId()); - } - if (other.branchStatus_ != 0) { - setBranchStatusValue(other.getBranchStatusValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractBranchEndResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractBranchEndResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private Object xid_ = ""; - /** - * string xid = 2; - * @return The xid. - */ - public String getXid() { - Object ref = xid_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - * @param value The xid to set. - * @return This builder for chaining. - */ - public Builder setXid( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - * @return This builder for chaining. - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - * @param value The bytes for xid to set. - * @return This builder for chaining. - */ - public Builder setXidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - xid_ = value; - onChanged(); - return this; - } - - private long branchId_ ; - /** - * int64 branchId = 3; - * @return The branchId. - */ - @Override - public long getBranchId() { - return branchId_; - } - /** - * int64 branchId = 3; - * @param value The branchId to set. - * @return This builder for chaining. - */ - public Builder setBranchId(long value) { - - branchId_ = value; - onChanged(); - return this; - } - /** - * int64 branchId = 3; - * @return This builder for chaining. - */ - public Builder clearBranchId() { - - branchId_ = 0L; - onChanged(); - return this; - } - - private int branchStatus_ = 0; - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @return The enum numeric value on the wire for branchStatus. - */ - @Override public int getBranchStatusValue() { - return branchStatus_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @param value The enum numeric value on the wire for branchStatus to set. - * @return This builder for chaining. - */ - public Builder setBranchStatusValue(int value) { - - branchStatus_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @return The branchStatus. - */ - @Override - public BranchStatusProto getBranchStatus() { - @SuppressWarnings("deprecation") - BranchStatusProto result = BranchStatusProto.valueOf(branchStatus_); - return result == null ? BranchStatusProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @param value The branchStatus to set. - * @return This builder for chaining. - */ - public Builder setBranchStatus(BranchStatusProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @return This builder for chaining. - */ - public Builder clearBranchStatus() { - - branchStatus_ = 0; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) - private static final AbstractBranchEndResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractBranchEndResponseProto(); - } - - public static AbstractBranchEndResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractBranchEndResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractBranchEndResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractBranchEndResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java deleted file mode 100644 index a2347833015..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractBranchEndResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - boolean hasAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * string xid = 2; - * @return The xid. - */ - String getXid(); - /** - * string xid = 2; - * @return The bytes for xid. - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * int64 branchId = 3; - * @return The branchId. - */ - long getBranchId(); - - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @return The enum numeric value on the wire for branchStatus. - */ - int getBranchStatusValue(); - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - * @return The branchStatus. - */ - BranchStatusProto getBranchStatus(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequest.java deleted file mode 100644 index 2bc450d87bf..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequest.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractGlobalEndRequest { - private AbstractGlobalEndRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\036abstractGlobalEndRequest.proto\022\"org.ap" + - "ache.seata.protocol.protobuf\032 abstractTr" + - "ansactionRequest.proto\"\250\001\n\035AbstractGloba" + - "lEndRequestProto\022g\n\032abstractTransactionR" + - "equest\030\001 \001(\0132C.org.apache.seata.protocol" + - ".protobuf.AbstractTransactionRequestProt" + - "o\022\013\n\003xid\030\002 \001(\t\022\021\n\textraData\030\003 \001(\tBQ\n3org" + - ".apache.seata.core.serializer.protobuf.g" + - "eneratedB\030AbstractGlobalEndRequestP\001b\006pr" + - "oto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor, - new String[] { "AbstractTransactionRequest", "Xid", "ExtraData", }); - AbstractTransactionRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProto.java deleted file mode 100644 index 8d64b539c1a..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProto.java +++ /dev/null @@ -1,893 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto} - */ -public final class AbstractGlobalEndRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - AbstractGlobalEndRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractGlobalEndRequestProto.newBuilder() to construct. - private AbstractGlobalEndRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractGlobalEndRequestProto() { - xid_ = ""; - extraData_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractGlobalEndRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractGlobalEndRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - extraData_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractGlobalEndRequestProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - @Override - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - @Override - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - @Override - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile Object xid_; - /** - * string xid = 2; - * @return The xid. - */ - @Override - public String getXid() { - Object ref = xid_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - @Override - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTRADATA_FIELD_NUMBER = 3; - private volatile Object extraData_; - /** - * string extraData = 3; - * @return The extraData. - */ - @Override - public String getExtraData() { - Object ref = extraData_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } - } - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - @Override - public com.google.protobuf.ByteString - getExtraDataBytes() { - Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extraData_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractGlobalEndRequestProto)) { - return super.equals(obj); - } - AbstractGlobalEndRequestProto other = (AbstractGlobalEndRequestProto) obj; - - if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; - if (hasAbstractTransactionRequest()) { - if (!getAbstractTransactionRequest() - .equals(other.getAbstractTransactionRequest())) return false; - } - if (!getXid() - .equals(other.getXid())) return false; - if (!getExtraData() - .equals(other.getExtraData())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionRequest()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); - } - hash = (37 * hash) + XID_FIELD_NUMBER; - hash = (53 * hash) + getXid().hashCode(); - hash = (37 * hash) + EXTRADATA_FIELD_NUMBER; - hash = (53 * hash) + getExtraData().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractGlobalEndRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractGlobalEndRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractGlobalEndRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractGlobalEndRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractGlobalEndRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractGlobalEndRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractGlobalEndRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractGlobalEndRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractGlobalEndRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractGlobalEndRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractGlobalEndRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractGlobalEndRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractGlobalEndRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - AbstractGlobalEndRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractGlobalEndRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - xid_ = ""; - - extraData_ = ""; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractGlobalEndRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; - } - - @Override - public AbstractGlobalEndRequestProto getDefaultInstanceForType() { - return AbstractGlobalEndRequestProto.getDefaultInstance(); - } - - @Override - public AbstractGlobalEndRequestProto build() { - AbstractGlobalEndRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractGlobalEndRequestProto buildPartial() { - AbstractGlobalEndRequestProto result = new AbstractGlobalEndRequestProto(this); - if (abstractTransactionRequestBuilder_ == null) { - result.abstractTransactionRequest_ = abstractTransactionRequest_; - } else { - result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); - } - result.xid_ = xid_; - result.extraData_ = extraData_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractGlobalEndRequestProto) { - return mergeFrom((AbstractGlobalEndRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractGlobalEndRequestProto other) { - if (other == AbstractGlobalEndRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionRequest()) { - mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); - } - if (!other.getXid().isEmpty()) { - xid_ = other.xid_; - onChanged(); - } - if (!other.getExtraData().isEmpty()) { - extraData_ = other.extraData_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractGlobalEndRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractGlobalEndRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private Object xid_ = ""; - /** - * string xid = 2; - * @return The xid. - */ - public String getXid() { - Object ref = xid_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - * @param value The xid to set. - * @return This builder for chaining. - */ - public Builder setXid( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - * @return This builder for chaining. - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - * @param value The bytes for xid to set. - * @return This builder for chaining. - */ - public Builder setXidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - xid_ = value; - onChanged(); - return this; - } - - private Object extraData_ = ""; - /** - * string extraData = 3; - * @return The extraData. - */ - public String getExtraData() { - Object ref = extraData_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string extraData = 3; - * @param value The extraData to set. - * @return This builder for chaining. - */ - public Builder setExtraData( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - extraData_ = value; - onChanged(); - return this; - } - /** - * string extraData = 3; - * @return This builder for chaining. - */ - public Builder clearExtraData() { - - extraData_ = getDefaultInstance().getExtraData(); - onChanged(); - return this; - } - /** - * string extraData = 3; - * @param value The bytes for extraData to set. - * @return This builder for chaining. - */ - public Builder setExtraDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - extraData_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - private static final AbstractGlobalEndRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractGlobalEndRequestProto(); - } - - public static AbstractGlobalEndRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractGlobalEndRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractGlobalEndRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractGlobalEndRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java deleted file mode 100644 index 8e1e0a05298..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractGlobalEndRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - boolean hasAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * string xid = 2; - * @return The xid. - */ - String getXid(); - /** - * string xid = 2; - * @return The bytes for xid. - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * string extraData = 3; - * @return The extraData. - */ - String getExtraData(); - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - com.google.protobuf.ByteString - getExtraDataBytes(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponse.java deleted file mode 100644 index 80a0cfb2ef7..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponse.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractGlobalEndResponse { - private AbstractGlobalEndResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\037abstractGlobalEndResponse.proto\022\"org.a" + - "pache.seata.protocol.protobuf\032!abstractT" + - "ransactionResponse.proto\032\022globalStatus.p" + - "roto\"\330\001\n\036AbstractGlobalEndResponseProto\022" + - "i\n\033abstractTransactionResponse\030\001 \001(\0132D.o" + - "rg.apache.seata.protocol.protobuf.Abstra" + - "ctTransactionResponseProto\022K\n\014globalStat" + - "us\030\002 \001(\01625.org.apache.seata.protocol.pro" + - "tobuf.GlobalStatusProtoBR\n3org.apache.se" + - "ata.core.serializer.protobuf.generatedB\031" + - "AbstractGlobalEndResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionResponse.getDescriptor(), - GlobalStatus.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor, - new String[] { "AbstractTransactionResponse", "GlobalStatus", }); - AbstractTransactionResponse.getDescriptor(); - GlobalStatus.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProto.java deleted file mode 100644 index 6c517a7a933..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProto.java +++ /dev/null @@ -1,713 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto} - */ -public final class AbstractGlobalEndResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - AbstractGlobalEndResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractGlobalEndResponseProto.newBuilder() to construct. - private AbstractGlobalEndResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractGlobalEndResponseProto() { - globalStatus_ = 0; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractGlobalEndResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractGlobalEndResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionResponse_); - abstractTransactionResponse_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - globalStatus_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractGlobalEndResponseProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - @Override - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - @Override - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - @Override - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int GLOBALSTATUS_FIELD_NUMBER = 2; - private int globalStatus_; - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The enum numeric value on the wire for globalStatus. - */ - @Override public int getGlobalStatusValue() { - return globalStatus_; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The globalStatus. - */ - @Override public GlobalStatusProto getGlobalStatus() { - @SuppressWarnings("deprecation") - GlobalStatusProto result = GlobalStatusProto.valueOf(globalStatus_); - return result == null ? GlobalStatusProto.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (globalStatus_ != GlobalStatusProto.UnKnown.getNumber()) { - output.writeEnum(2, globalStatus_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionResponse()); - } - if (globalStatus_ != GlobalStatusProto.UnKnown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, globalStatus_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractGlobalEndResponseProto)) { - return super.equals(obj); - } - AbstractGlobalEndResponseProto other = (AbstractGlobalEndResponseProto) obj; - - if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; - if (hasAbstractTransactionResponse()) { - if (!getAbstractTransactionResponse() - .equals(other.getAbstractTransactionResponse())) return false; - } - if (globalStatus_ != other.globalStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionResponse()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); - } - hash = (37 * hash) + GLOBALSTATUS_FIELD_NUMBER; - hash = (53 * hash) + globalStatus_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractGlobalEndResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractGlobalEndResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractGlobalEndResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractGlobalEndResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractGlobalEndResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractGlobalEndResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractGlobalEndResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractGlobalEndResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractGlobalEndResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractGlobalEndResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractGlobalEndResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractGlobalEndResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractGlobalEndResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - AbstractGlobalEndResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractGlobalEndResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - globalStatus_ = 0; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractGlobalEndResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; - } - - @Override - public AbstractGlobalEndResponseProto getDefaultInstanceForType() { - return AbstractGlobalEndResponseProto.getDefaultInstance(); - } - - @Override - public AbstractGlobalEndResponseProto build() { - AbstractGlobalEndResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractGlobalEndResponseProto buildPartial() { - AbstractGlobalEndResponseProto result = new AbstractGlobalEndResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.globalStatus_ = globalStatus_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractGlobalEndResponseProto) { - return mergeFrom((AbstractGlobalEndResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractGlobalEndResponseProto other) { - if (other == AbstractGlobalEndResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - if (other.globalStatus_ != 0) { - setGlobalStatusValue(other.getGlobalStatusValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractGlobalEndResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractGlobalEndResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private int globalStatus_ = 0; - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The enum numeric value on the wire for globalStatus. - */ - @Override public int getGlobalStatusValue() { - return globalStatus_; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @param value The enum numeric value on the wire for globalStatus to set. - * @return This builder for chaining. - */ - public Builder setGlobalStatusValue(int value) { - - globalStatus_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The globalStatus. - */ - @Override - public GlobalStatusProto getGlobalStatus() { - @SuppressWarnings("deprecation") - GlobalStatusProto result = GlobalStatusProto.valueOf(globalStatus_); - return result == null ? GlobalStatusProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @param value The globalStatus to set. - * @return This builder for chaining. - */ - public Builder setGlobalStatus(GlobalStatusProto value) { - if (value == null) { - throw new NullPointerException(); - } - - globalStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return This builder for chaining. - */ - public Builder clearGlobalStatus() { - - globalStatus_ = 0; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - private static final AbstractGlobalEndResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractGlobalEndResponseProto(); - } - - public static AbstractGlobalEndResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractGlobalEndResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractGlobalEndResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractGlobalEndResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java deleted file mode 100644 index 2b78f5cb240..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractGlobalEndResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - boolean hasAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The enum numeric value on the wire for globalStatus. - */ - int getGlobalStatusValue(); - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The globalStatus. - */ - GlobalStatusProto getGlobalStatus(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequest.java deleted file mode 100644 index e883b233176..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequest.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractIdentifyRequest { - private AbstractIdentifyRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\035abstractIdentifyRequest.proto\022\"org.apa" + - "che.seata.protocol.protobuf\032\025abstractMes" + - "sage.proto\"\315\001\n\034AbstractIdentifyRequestPr" + - "oto\022Q\n\017abstractMessage\030\001 \001(\01328.org.apach" + - "e.seata.protocol.protobuf.AbstractMessag" + - "eProto\022\017\n\007version\030\002 \001(\t\022\025\n\rapplicationId" + - "\030\003 \001(\t\022\037\n\027transactionServiceGroup\030\004 \001(\t\022" + - "\021\n\textraData\030\005 \001(\tBP\n3org.apache.seata.c" + - "ore.serializer.protobuf.generatedB\027Abstr" + - "actIdentifyRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractMessage.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor, - new String[] { "AbstractMessage", "Version", "ApplicationId", "TransactionServiceGroup", "ExtraData", }); - AbstractMessage.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProto.java deleted file mode 100644 index 3e72f403aa9..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProto.java +++ /dev/null @@ -1,1169 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto} - */ -public final class AbstractIdentifyRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) - AbstractIdentifyRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractIdentifyRequestProto.newBuilder() to construct. - private AbstractIdentifyRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractIdentifyRequestProto() { - version_ = ""; - applicationId_ = ""; - transactionServiceGroup_ = ""; - extraData_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractIdentifyRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractIdentifyRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - applicationId_ = s; - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - transactionServiceGroup_ = s; - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - - extraData_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractIdentifyRequestProto.class, Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private AbstractMessageProto abstractMessage_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - @Override - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - @Override - public AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - @Override - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int VERSION_FIELD_NUMBER = 2; - private volatile Object version_; - /** - * string version = 2; - * @return The version. - */ - @Override - public String getVersion() { - Object ref = version_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * string version = 2; - * @return The bytes for version. - */ - @Override - public com.google.protobuf.ByteString - getVersionBytes() { - Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int APPLICATIONID_FIELD_NUMBER = 3; - private volatile Object applicationId_; - /** - * string applicationId = 3; - * @return The applicationId. - */ - @Override - public String getApplicationId() { - Object ref = applicationId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - applicationId_ = s; - return s; - } - } - /** - * string applicationId = 3; - * @return The bytes for applicationId. - */ - @Override - public com.google.protobuf.ByteString - getApplicationIdBytes() { - Object ref = applicationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - applicationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TRANSACTIONSERVICEGROUP_FIELD_NUMBER = 4; - private volatile Object transactionServiceGroup_; - /** - * string transactionServiceGroup = 4; - * @return The transactionServiceGroup. - */ - @Override - public String getTransactionServiceGroup() { - Object ref = transactionServiceGroup_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - transactionServiceGroup_ = s; - return s; - } - } - /** - * string transactionServiceGroup = 4; - * @return The bytes for transactionServiceGroup. - */ - @Override - public com.google.protobuf.ByteString - getTransactionServiceGroupBytes() { - Object ref = transactionServiceGroup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - transactionServiceGroup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTRADATA_FIELD_NUMBER = 5; - private volatile Object extraData_; - /** - * string extraData = 5; - * @return The extraData. - */ - @Override - public String getExtraData() { - Object ref = extraData_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } - } - /** - * string extraData = 5; - * @return The bytes for extraData. - */ - @Override - public com.google.protobuf.ByteString - getExtraDataBytes() { - Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, applicationId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionServiceGroup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, transactionServiceGroup_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, extraData_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractMessage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractMessage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, applicationId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionServiceGroup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, transactionServiceGroup_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, extraData_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractIdentifyRequestProto)) { - return super.equals(obj); - } - AbstractIdentifyRequestProto other = (AbstractIdentifyRequestProto) obj; - - if (hasAbstractMessage() != other.hasAbstractMessage()) return false; - if (hasAbstractMessage()) { - if (!getAbstractMessage() - .equals(other.getAbstractMessage())) return false; - } - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getApplicationId() - .equals(other.getApplicationId())) return false; - if (!getTransactionServiceGroup() - .equals(other.getTransactionServiceGroup())) return false; - if (!getExtraData() - .equals(other.getExtraData())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractMessage()) { - hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractMessage().hashCode(); - } - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + APPLICATIONID_FIELD_NUMBER; - hash = (53 * hash) + getApplicationId().hashCode(); - hash = (37 * hash) + TRANSACTIONSERVICEGROUP_FIELD_NUMBER; - hash = (53 * hash) + getTransactionServiceGroup().hashCode(); - hash = (37 * hash) + EXTRADATA_FIELD_NUMBER; - hash = (53 * hash) + getExtraData().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractIdentifyRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractIdentifyRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractIdentifyRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractIdentifyRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractIdentifyRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractIdentifyRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractIdentifyRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractIdentifyRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractIdentifyRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractIdentifyRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractIdentifyRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractIdentifyRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractIdentifyRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) - AbstractIdentifyRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractIdentifyRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - version_ = ""; - - applicationId_ = ""; - - transactionServiceGroup_ = ""; - - extraData_ = ""; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractIdentifyRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; - } - - @Override - public AbstractIdentifyRequestProto getDefaultInstanceForType() { - return AbstractIdentifyRequestProto.getDefaultInstance(); - } - - @Override - public AbstractIdentifyRequestProto build() { - AbstractIdentifyRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractIdentifyRequestProto buildPartial() { - AbstractIdentifyRequestProto result = new AbstractIdentifyRequestProto(this); - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - result.version_ = version_; - result.applicationId_ = applicationId_; - result.transactionServiceGroup_ = transactionServiceGroup_; - result.extraData_ = extraData_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractIdentifyRequestProto) { - return mergeFrom((AbstractIdentifyRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractIdentifyRequestProto other) { - if (other == AbstractIdentifyRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractMessage()) { - mergeAbstractMessage(other.getAbstractMessage()); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.getApplicationId().isEmpty()) { - applicationId_ = other.applicationId_; - onChanged(); - } - if (!other.getTransactionServiceGroup().isEmpty()) { - transactionServiceGroup_ = other.transactionServiceGroup_; - onChanged(); - } - if (!other.getExtraData().isEmpty()) { - extraData_ = other.extraData_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractIdentifyRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractIdentifyRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - public AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private Object version_ = ""; - /** - * string version = 2; - * @return The version. - */ - public String getVersion() { - Object ref = version_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string version = 2; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string version = 2; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - * string version = 2; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * string version = 2; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private Object applicationId_ = ""; - /** - * string applicationId = 3; - * @return The applicationId. - */ - public String getApplicationId() { - Object ref = applicationId_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - applicationId_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string applicationId = 3; - * @return The bytes for applicationId. - */ - public com.google.protobuf.ByteString - getApplicationIdBytes() { - Object ref = applicationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - applicationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string applicationId = 3; - * @param value The applicationId to set. - * @return This builder for chaining. - */ - public Builder setApplicationId( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationId_ = value; - onChanged(); - return this; - } - /** - * string applicationId = 3; - * @return This builder for chaining. - */ - public Builder clearApplicationId() { - - applicationId_ = getDefaultInstance().getApplicationId(); - onChanged(); - return this; - } - /** - * string applicationId = 3; - * @param value The bytes for applicationId to set. - * @return This builder for chaining. - */ - public Builder setApplicationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - applicationId_ = value; - onChanged(); - return this; - } - - private Object transactionServiceGroup_ = ""; - /** - * string transactionServiceGroup = 4; - * @return The transactionServiceGroup. - */ - public String getTransactionServiceGroup() { - Object ref = transactionServiceGroup_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - transactionServiceGroup_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string transactionServiceGroup = 4; - * @return The bytes for transactionServiceGroup. - */ - public com.google.protobuf.ByteString - getTransactionServiceGroupBytes() { - Object ref = transactionServiceGroup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - transactionServiceGroup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string transactionServiceGroup = 4; - * @param value The transactionServiceGroup to set. - * @return This builder for chaining. - */ - public Builder setTransactionServiceGroup( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - transactionServiceGroup_ = value; - onChanged(); - return this; - } - /** - * string transactionServiceGroup = 4; - * @return This builder for chaining. - */ - public Builder clearTransactionServiceGroup() { - - transactionServiceGroup_ = getDefaultInstance().getTransactionServiceGroup(); - onChanged(); - return this; - } - /** - * string transactionServiceGroup = 4; - * @param value The bytes for transactionServiceGroup to set. - * @return This builder for chaining. - */ - public Builder setTransactionServiceGroupBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transactionServiceGroup_ = value; - onChanged(); - return this; - } - - private Object extraData_ = ""; - /** - * string extraData = 5; - * @return The extraData. - */ - public String getExtraData() { - Object ref = extraData_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string extraData = 5; - * @return The bytes for extraData. - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string extraData = 5; - * @param value The extraData to set. - * @return This builder for chaining. - */ - public Builder setExtraData( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - extraData_ = value; - onChanged(); - return this; - } - /** - * string extraData = 5; - * @return This builder for chaining. - */ - public Builder clearExtraData() { - - extraData_ = getDefaultInstance().getExtraData(); - onChanged(); - return this; - } - /** - * string extraData = 5; - * @param value The bytes for extraData to set. - * @return This builder for chaining. - */ - public Builder setExtraDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - extraData_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) - private static final AbstractIdentifyRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractIdentifyRequestProto(); - } - - public static AbstractIdentifyRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractIdentifyRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractIdentifyRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractIdentifyRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java deleted file mode 100644 index 10522fdad97..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractIdentifyRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - boolean hasAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - AbstractMessageProto getAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); - - /** - * string version = 2; - * @return The version. - */ - String getVersion(); - /** - * string version = 2; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - * string applicationId = 3; - * @return The applicationId. - */ - String getApplicationId(); - /** - * string applicationId = 3; - * @return The bytes for applicationId. - */ - com.google.protobuf.ByteString - getApplicationIdBytes(); - - /** - * string transactionServiceGroup = 4; - * @return The transactionServiceGroup. - */ - String getTransactionServiceGroup(); - /** - * string transactionServiceGroup = 4; - * @return The bytes for transactionServiceGroup. - */ - com.google.protobuf.ByteString - getTransactionServiceGroupBytes(); - - /** - * string extraData = 5; - * @return The extraData. - */ - String getExtraData(); - /** - * string extraData = 5; - * @return The bytes for extraData. - */ - com.google.protobuf.ByteString - getExtraDataBytes(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponse.java deleted file mode 100644 index d2938287111..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponse.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractIdentifyResponse { - private AbstractIdentifyResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\036abstractIdentifyResponse.proto\022\"org.ap" + - "ache.seata.protocol.protobuf\032\033abstractRe" + - "sultMessage.proto\"\266\001\n\035AbstractIdentifyRe" + - "sponseProto\022]\n\025abstractResultMessage\030\001 \001" + - "(\0132>.org.apache.seata.protocol.protobuf." + - "AbstractResultMessageProto\022\017\n\007version\030\002 " + - "\001(\t\022\021\n\textraData\030\003 \001(\t\022\022\n\nidentified\030\004 \001" + - "(\010BQ\n3org.apache.seata.core.serializer.p" + - "rotobuf.generatedB\030AbstractIdentifyRespo" + - "nseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractResultMessage.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor, - new String[] { "AbstractResultMessage", "Version", "ExtraData", "Identified", }); - AbstractResultMessage.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProto.java deleted file mode 100644 index 622dee13d07..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProto.java +++ /dev/null @@ -1,958 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto} - */ -public final class AbstractIdentifyResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) - AbstractIdentifyResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractIdentifyResponseProto.newBuilder() to construct. - private AbstractIdentifyResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractIdentifyResponseProto() { - version_ = ""; - extraData_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractIdentifyResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractIdentifyResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractResultMessageProto.Builder subBuilder = null; - if (abstractResultMessage_ != null) { - subBuilder = abstractResultMessage_.toBuilder(); - } - abstractResultMessage_ = input.readMessage(AbstractResultMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractResultMessage_); - abstractResultMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - extraData_ = s; - break; - } - case 32: { - - identified_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractIdentifyResponseProto.class, Builder.class); - } - - public static final int ABSTRACTRESULTMESSAGE_FIELD_NUMBER = 1; - private AbstractResultMessageProto abstractResultMessage_; - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return Whether the abstractResultMessage field is set. - */ - @Override - public boolean hasAbstractResultMessage() { - return abstractResultMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return The abstractResultMessage. - */ - @Override - public AbstractResultMessageProto getAbstractResultMessage() { - return abstractResultMessage_ == null ? AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - @Override - public AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { - return getAbstractResultMessage(); - } - - public static final int VERSION_FIELD_NUMBER = 2; - private volatile Object version_; - /** - * string version = 2; - * @return The version. - */ - @Override - public String getVersion() { - Object ref = version_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * string version = 2; - * @return The bytes for version. - */ - @Override - public com.google.protobuf.ByteString - getVersionBytes() { - Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTRADATA_FIELD_NUMBER = 3; - private volatile Object extraData_; - /** - * string extraData = 3; - * @return The extraData. - */ - @Override - public String getExtraData() { - Object ref = extraData_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } - } - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - @Override - public com.google.protobuf.ByteString - getExtraDataBytes() { - Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IDENTIFIED_FIELD_NUMBER = 4; - private boolean identified_; - /** - * bool identified = 4; - * @return The identified. - */ - @Override - public boolean getIdentified() { - return identified_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractResultMessage_ != null) { - output.writeMessage(1, getAbstractResultMessage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); - } - if (identified_ != false) { - output.writeBool(4, identified_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractResultMessage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractResultMessage()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extraData_); - } - if (identified_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, identified_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractIdentifyResponseProto)) { - return super.equals(obj); - } - AbstractIdentifyResponseProto other = (AbstractIdentifyResponseProto) obj; - - if (hasAbstractResultMessage() != other.hasAbstractResultMessage()) return false; - if (hasAbstractResultMessage()) { - if (!getAbstractResultMessage() - .equals(other.getAbstractResultMessage())) return false; - } - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getExtraData() - .equals(other.getExtraData())) return false; - if (getIdentified() - != other.getIdentified()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractResultMessage()) { - hash = (37 * hash) + ABSTRACTRESULTMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractResultMessage().hashCode(); - } - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + EXTRADATA_FIELD_NUMBER; - hash = (53 * hash) + getExtraData().hashCode(); - hash = (37 * hash) + IDENTIFIED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIdentified()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractIdentifyResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractIdentifyResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractIdentifyResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractIdentifyResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractIdentifyResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractIdentifyResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractIdentifyResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractIdentifyResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractIdentifyResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractIdentifyResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractIdentifyResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractIdentifyResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractIdentifyResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) - AbstractIdentifyResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractIdentifyResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = null; - } else { - abstractResultMessage_ = null; - abstractResultMessageBuilder_ = null; - } - version_ = ""; - - extraData_ = ""; - - identified_ = false; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractIdentifyResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; - } - - @Override - public AbstractIdentifyResponseProto getDefaultInstanceForType() { - return AbstractIdentifyResponseProto.getDefaultInstance(); - } - - @Override - public AbstractIdentifyResponseProto build() { - AbstractIdentifyResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractIdentifyResponseProto buildPartial() { - AbstractIdentifyResponseProto result = new AbstractIdentifyResponseProto(this); - if (abstractResultMessageBuilder_ == null) { - result.abstractResultMessage_ = abstractResultMessage_; - } else { - result.abstractResultMessage_ = abstractResultMessageBuilder_.build(); - } - result.version_ = version_; - result.extraData_ = extraData_; - result.identified_ = identified_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractIdentifyResponseProto) { - return mergeFrom((AbstractIdentifyResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractIdentifyResponseProto other) { - if (other == AbstractIdentifyResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractResultMessage()) { - mergeAbstractResultMessage(other.getAbstractResultMessage()); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.getExtraData().isEmpty()) { - extraData_ = other.extraData_; - onChanged(); - } - if (other.getIdentified() != false) { - setIdentified(other.getIdentified()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractIdentifyResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractIdentifyResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractResultMessageProto abstractResultMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder> abstractResultMessageBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return Whether the abstractResultMessage field is set. - */ - public boolean hasAbstractResultMessage() { - return abstractResultMessageBuilder_ != null || abstractResultMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return The abstractResultMessage. - */ - public AbstractResultMessageProto getAbstractResultMessage() { - if (abstractResultMessageBuilder_ == null) { - return abstractResultMessage_ == null ? AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } else { - return abstractResultMessageBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder setAbstractResultMessage(AbstractResultMessageProto value) { - if (abstractResultMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractResultMessage_ = value; - onChanged(); - } else { - abstractResultMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder setAbstractResultMessage( - AbstractResultMessageProto.Builder builderForValue) { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractResultMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder mergeAbstractResultMessage(AbstractResultMessageProto value) { - if (abstractResultMessageBuilder_ == null) { - if (abstractResultMessage_ != null) { - abstractResultMessage_ = - AbstractResultMessageProto.newBuilder(abstractResultMessage_).mergeFrom(value).buildPartial(); - } else { - abstractResultMessage_ = value; - } - onChanged(); - } else { - abstractResultMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder clearAbstractResultMessage() { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = null; - onChanged(); - } else { - abstractResultMessage_ = null; - abstractResultMessageBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public AbstractResultMessageProto.Builder getAbstractResultMessageBuilder() { - - onChanged(); - return getAbstractResultMessageFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { - if (abstractResultMessageBuilder_ != null) { - return abstractResultMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractResultMessage_ == null ? - AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder> - getAbstractResultMessageFieldBuilder() { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder>( - getAbstractResultMessage(), - getParentForChildren(), - isClean()); - abstractResultMessage_ = null; - } - return abstractResultMessageBuilder_; - } - - private Object version_ = ""; - /** - * string version = 2; - * @return The version. - */ - public String getVersion() { - Object ref = version_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string version = 2; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string version = 2; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - * string version = 2; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * string version = 2; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private Object extraData_ = ""; - /** - * string extraData = 3; - * @return The extraData. - */ - public String getExtraData() { - Object ref = extraData_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string extraData = 3; - * @param value The extraData to set. - * @return This builder for chaining. - */ - public Builder setExtraData( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - extraData_ = value; - onChanged(); - return this; - } - /** - * string extraData = 3; - * @return This builder for chaining. - */ - public Builder clearExtraData() { - - extraData_ = getDefaultInstance().getExtraData(); - onChanged(); - return this; - } - /** - * string extraData = 3; - * @param value The bytes for extraData to set. - * @return This builder for chaining. - */ - public Builder setExtraDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - extraData_ = value; - onChanged(); - return this; - } - - private boolean identified_ ; - /** - * bool identified = 4; - * @return The identified. - */ - @Override - public boolean getIdentified() { - return identified_; - } - /** - * bool identified = 4; - * @param value The identified to set. - * @return This builder for chaining. - */ - public Builder setIdentified(boolean value) { - - identified_ = value; - onChanged(); - return this; - } - /** - * bool identified = 4; - * @return This builder for chaining. - */ - public Builder clearIdentified() { - - identified_ = false; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) - private static final AbstractIdentifyResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractIdentifyResponseProto(); - } - - public static AbstractIdentifyResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractIdentifyResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractIdentifyResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractIdentifyResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java deleted file mode 100644 index 97d50127e7c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractIdentifyResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return Whether the abstractResultMessage field is set. - */ - boolean hasAbstractResultMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return The abstractResultMessage. - */ - AbstractResultMessageProto getAbstractResultMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder(); - - /** - * string version = 2; - * @return The version. - */ - String getVersion(); - /** - * string version = 2; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - * string extraData = 3; - * @return The extraData. - */ - String getExtraData(); - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - com.google.protobuf.ByteString - getExtraDataBytes(); - - /** - * bool identified = 4; - * @return The identified. - */ - boolean getIdentified(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessage.java deleted file mode 100644 index 5911521f0b3..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessage.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractMessage { - private AbstractMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\025abstractMessage.proto\022\"org.apache.seat" + - "a.protocol.protobuf\032\021messageType.proto\"a" + - "\n\024AbstractMessageProto\022I\n\013messageType\030\001 " + - "\001(\01624.org.apache.seata.protocol.protobuf" + - ".MessageTypeProtoBH\n3org.apache.seata.co" + - "re.serializer.protobuf.generatedB\017Abstra" + - "ctMessageP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - MessageType.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor, - new String[] { "MessageType", }); - MessageType.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProto.java deleted file mode 100644 index 4a2a73673a1..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProto.java +++ /dev/null @@ -1,525 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractMessageProto} - */ -public final class AbstractMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractMessageProto) - AbstractMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractMessageProto.newBuilder() to construct. - private AbstractMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractMessageProto() { - messageType_ = 0; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractMessageProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - messageType_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractMessageProto.class, Builder.class); - } - - public static final int MESSAGETYPE_FIELD_NUMBER = 1; - private int messageType_; - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @return The enum numeric value on the wire for messageType. - */ - @Override public int getMessageTypeValue() { - return messageType_; - } - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @return The messageType. - */ - @Override public MessageTypeProto getMessageType() { - @SuppressWarnings("deprecation") - MessageTypeProto result = MessageTypeProto.valueOf(messageType_); - return result == null ? MessageTypeProto.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (messageType_ != MessageTypeProto.TYPE_GLOBAL_PRESERVED.getNumber()) { - output.writeEnum(1, messageType_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (messageType_ != MessageTypeProto.TYPE_GLOBAL_PRESERVED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, messageType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractMessageProto)) { - return super.equals(obj); - } - AbstractMessageProto other = (AbstractMessageProto) obj; - - if (messageType_ != other.messageType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER; - hash = (53 * hash) + messageType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractMessageProto) - AbstractMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractMessageProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - messageType_ = 0; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractMessageProto_descriptor; - } - - @Override - public AbstractMessageProto getDefaultInstanceForType() { - return AbstractMessageProto.getDefaultInstance(); - } - - @Override - public AbstractMessageProto build() { - AbstractMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractMessageProto buildPartial() { - AbstractMessageProto result = new AbstractMessageProto(this); - result.messageType_ = messageType_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractMessageProto) { - return mergeFrom((AbstractMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractMessageProto other) { - if (other == AbstractMessageProto.getDefaultInstance()) return this; - if (other.messageType_ != 0) { - setMessageTypeValue(other.getMessageTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int messageType_ = 0; - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @return The enum numeric value on the wire for messageType. - */ - @Override public int getMessageTypeValue() { - return messageType_; - } - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @param value The enum numeric value on the wire for messageType to set. - * @return This builder for chaining. - */ - public Builder setMessageTypeValue(int value) { - - messageType_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @return The messageType. - */ - @Override - public MessageTypeProto getMessageType() { - @SuppressWarnings("deprecation") - MessageTypeProto result = MessageTypeProto.valueOf(messageType_); - return result == null ? MessageTypeProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @param value The messageType to set. - * @return This builder for chaining. - */ - public Builder setMessageType(MessageTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - messageType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @return This builder for chaining. - */ - public Builder clearMessageType() { - - messageType_ = 0; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractMessageProto) - private static final AbstractMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractMessageProto(); - } - - public static AbstractMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProtoOrBuilder.java deleted file mode 100644 index d73f6000816..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractMessageProtoOrBuilder.java +++ /dev/null @@ -1,20 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @return The enum numeric value on the wire for messageType. - */ - int getMessageTypeValue(); - /** - * .org.apache.seata.protocol.protobuf.MessageTypeProto messageType = 1; - * @return The messageType. - */ - MessageTypeProto getMessageType(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessage.java deleted file mode 100644 index 105e607b71b..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessage.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractResultMessage { - private AbstractResultMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\033abstractResultMessage.proto\022\"org.apach" + - "e.seata.protocol.protobuf\032\020resultCode.pr" + - "oto\032\025abstractMessage.proto\"\305\001\n\032AbstractR" + - "esultMessageProto\022Q\n\017AbstractMessage\030\001 \001" + - "(\01328.org.apache.seata.protocol.protobuf." + - "AbstractMessageProto\022G\n\nresultCode\030\002 \001(\016" + - "23.org.apache.seata.protocol.protobuf.Re" + - "sultCodeProto\022\013\n\003msg\030\003 \001(\tBN\n3org.apache" + - ".seata.core.serializer.protobuf.generate" + - "dB\025AbstractResultMessageP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - ResultCode.getDescriptor(), - AbstractMessage.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor, - new String[] { "AbstractMessage", "ResultCode", "Msg", }); - ResultCode.getDescriptor(); - AbstractMessage.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProto.java deleted file mode 100644 index cecbbca79c8..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProto.java +++ /dev/null @@ -1,851 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractResultMessageProto} - */ -public final class AbstractResultMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) - AbstractResultMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractResultMessageProto.newBuilder() to construct. - private AbstractResultMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractResultMessageProto() { - resultCode_ = 0; - msg_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractResultMessageProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractResultMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - resultCode_ = rawValue; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - msg_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractResultMessageProto.class, Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private AbstractMessageProto abstractMessage_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - @Override - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - * @return The abstractMessage. - */ - @Override - public AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - @Override - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int RESULTCODE_FIELD_NUMBER = 2; - private int resultCode_; - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @return The enum numeric value on the wire for resultCode. - */ - @Override public int getResultCodeValue() { - return resultCode_; - } - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @return The resultCode. - */ - @Override public ResultCodeProto getResultCode() { - @SuppressWarnings("deprecation") - ResultCodeProto result = ResultCodeProto.valueOf(resultCode_); - return result == null ? ResultCodeProto.UNRECOGNIZED : result; - } - - public static final int MSG_FIELD_NUMBER = 3; - private volatile Object msg_; - /** - * string msg = 3; - * @return The msg. - */ - @Override - public String getMsg() { - Object ref = msg_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - msg_ = s; - return s; - } - } - /** - * string msg = 3; - * @return The bytes for msg. - */ - @Override - public com.google.protobuf.ByteString - getMsgBytes() { - Object ref = msg_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - msg_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - if (resultCode_ != ResultCodeProto.Failed.getNumber()) { - output.writeEnum(2, resultCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, msg_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractMessage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractMessage()); - } - if (resultCode_ != ResultCodeProto.Failed.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, resultCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, msg_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractResultMessageProto)) { - return super.equals(obj); - } - AbstractResultMessageProto other = (AbstractResultMessageProto) obj; - - if (hasAbstractMessage() != other.hasAbstractMessage()) return false; - if (hasAbstractMessage()) { - if (!getAbstractMessage() - .equals(other.getAbstractMessage())) return false; - } - if (resultCode_ != other.resultCode_) return false; - if (!getMsg() - .equals(other.getMsg())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractMessage()) { - hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractMessage().hashCode(); - } - hash = (37 * hash) + RESULTCODE_FIELD_NUMBER; - hash = (53 * hash) + resultCode_; - hash = (37 * hash) + MSG_FIELD_NUMBER; - hash = (53 * hash) + getMsg().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractResultMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractResultMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractResultMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractResultMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractResultMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractResultMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractResultMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractResultMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractResultMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractResultMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractResultMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractResultMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractResultMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractResultMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) - AbstractResultMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractResultMessageProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - resultCode_ = 0; - - msg_ = ""; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractResultMessage.internal_static_org_apache_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; - } - - @Override - public AbstractResultMessageProto getDefaultInstanceForType() { - return AbstractResultMessageProto.getDefaultInstance(); - } - - @Override - public AbstractResultMessageProto build() { - AbstractResultMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractResultMessageProto buildPartial() { - AbstractResultMessageProto result = new AbstractResultMessageProto(this); - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - result.resultCode_ = resultCode_; - result.msg_ = msg_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractResultMessageProto) { - return mergeFrom((AbstractResultMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractResultMessageProto other) { - if (other == AbstractResultMessageProto.getDefaultInstance()) return this; - if (other.hasAbstractMessage()) { - mergeAbstractMessage(other.getAbstractMessage()); - } - if (other.resultCode_ != 0) { - setResultCodeValue(other.getResultCodeValue()); - } - if (!other.getMsg().isEmpty()) { - msg_ = other.msg_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractResultMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractResultMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - * @return The abstractMessage. - */ - public AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public Builder setAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public Builder setAbstractMessage( - AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public Builder mergeAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private int resultCode_ = 0; - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @return The enum numeric value on the wire for resultCode. - */ - @Override public int getResultCodeValue() { - return resultCode_; - } - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @param value The enum numeric value on the wire for resultCode to set. - * @return This builder for chaining. - */ - public Builder setResultCodeValue(int value) { - - resultCode_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @return The resultCode. - */ - @Override - public ResultCodeProto getResultCode() { - @SuppressWarnings("deprecation") - ResultCodeProto result = ResultCodeProto.valueOf(resultCode_); - return result == null ? ResultCodeProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @param value The resultCode to set. - * @return This builder for chaining. - */ - public Builder setResultCode(ResultCodeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - resultCode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @return This builder for chaining. - */ - public Builder clearResultCode() { - - resultCode_ = 0; - onChanged(); - return this; - } - - private Object msg_ = ""; - /** - * string msg = 3; - * @return The msg. - */ - public String getMsg() { - Object ref = msg_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - msg_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string msg = 3; - * @return The bytes for msg. - */ - public com.google.protobuf.ByteString - getMsgBytes() { - Object ref = msg_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - msg_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string msg = 3; - * @param value The msg to set. - * @return This builder for chaining. - */ - public Builder setMsg( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - msg_ = value; - onChanged(); - return this; - } - /** - * string msg = 3; - * @return This builder for chaining. - */ - public Builder clearMsg() { - - msg_ = getDefaultInstance().getMsg(); - onChanged(); - return this; - } - /** - * string msg = 3; - * @param value The bytes for msg to set. - * @return This builder for chaining. - */ - public Builder setMsgBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - msg_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) - private static final AbstractResultMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractResultMessageProto(); - } - - public static AbstractResultMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractResultMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractResultMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractResultMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProtoOrBuilder.java deleted file mode 100644 index d7870f7afa0..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractResultMessageProtoOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractResultMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractResultMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - boolean hasAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - * @return The abstractMessage. - */ - AbstractMessageProto getAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); - - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @return The enum numeric value on the wire for resultCode. - */ - int getResultCodeValue(); - /** - * .org.apache.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - * @return The resultCode. - */ - ResultCodeProto getResultCode(); - - /** - * string msg = 3; - * @return The msg. - */ - String getMsg(); - /** - * string msg = 3; - * @return The bytes for msg. - */ - com.google.protobuf.ByteString - getMsgBytes(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequest.java deleted file mode 100644 index d067c30590c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractTransactionRequest { - private AbstractTransactionRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n abstractTransactionRequest.proto\022\"org." + - "apache.seata.protocol.protobuf\032\025abstract" + - "Message.proto\"t\n\037AbstractTransactionRequ" + - "estProto\022Q\n\017abstractMessage\030\001 \001(\01328.org." + - "apache.seata.protocol.protobuf.AbstractM" + - "essageProtoBS\n3org.apache.seata.core.ser" + - "ializer.protobuf.generatedB\032AbstractTran" + - "sactionRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractMessage.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor, - new String[] { "AbstractMessage", }); - AbstractMessage.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProto.java deleted file mode 100644 index 572f7fc7230..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProto.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto} - */ -public final class AbstractTransactionRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) - AbstractTransactionRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractTransactionRequestProto.newBuilder() to construct. - private AbstractTransactionRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractTransactionRequestProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractTransactionRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractTransactionRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractTransactionRequestProto.class, Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private AbstractMessageProto abstractMessage_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - @Override - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - @Override - public AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - @Override - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractMessage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractMessage()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractTransactionRequestProto)) { - return super.equals(obj); - } - AbstractTransactionRequestProto other = (AbstractTransactionRequestProto) obj; - - if (hasAbstractMessage() != other.hasAbstractMessage()) return false; - if (hasAbstractMessage()) { - if (!getAbstractMessage() - .equals(other.getAbstractMessage())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractMessage()) { - hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractMessage().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractTransactionRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractTransactionRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractTransactionRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractTransactionRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractTransactionRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractTransactionRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractTransactionRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractTransactionRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractTransactionRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractTransactionRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractTransactionRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractTransactionRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractTransactionRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) - AbstractTransactionRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractTransactionRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractTransactionRequest.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; - } - - @Override - public AbstractTransactionRequestProto getDefaultInstanceForType() { - return AbstractTransactionRequestProto.getDefaultInstance(); - } - - @Override - public AbstractTransactionRequestProto build() { - AbstractTransactionRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractTransactionRequestProto buildPartial() { - AbstractTransactionRequestProto result = new AbstractTransactionRequestProto(this); - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractTransactionRequestProto) { - return mergeFrom((AbstractTransactionRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractTransactionRequestProto other) { - if (other == AbstractTransactionRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractMessage()) { - mergeAbstractMessage(other.getAbstractMessage()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractTransactionRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractTransactionRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - public AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) - private static final AbstractTransactionRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractTransactionRequestProto(); - } - - public static AbstractTransactionRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractTransactionRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractTransactionRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractTransactionRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java deleted file mode 100644 index 62b81c56fe8..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractTransactionRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - boolean hasAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - AbstractMessageProto getAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponse.java deleted file mode 100644 index 68bd93885b5..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponse.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class AbstractTransactionResponse { - private AbstractTransactionResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n!abstractTransactionResponse.proto\022\"org" + - ".apache.seata.protocol.protobuf\032\033abstrac" + - "tResultMessage.proto\032\036transactionExcepti" + - "onCode.proto\"\346\001\n AbstractTransactionResp" + - "onseProto\022]\n\025abstractResultMessage\030\001 \001(\013" + - "2>.org.apache.seata.protocol.protobuf.Ab" + - "stractResultMessageProto\022c\n\030transactionE" + - "xceptionCode\030\002 \001(\0162A.org.apache.seata.pr" + - "otocol.protobuf.TransactionExceptionCode" + - "ProtoBT\n3org.apache.seata.core.serialize" + - "r.protobuf.generatedB\033AbstractTransactio" + - "nResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractResultMessage.getDescriptor(), - TransactionExceptionCode.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor, - new String[] { "AbstractResultMessage", "TransactionExceptionCode", }); - AbstractResultMessage.getDescriptor(); - TransactionExceptionCode.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProto.java deleted file mode 100644 index ec8df2da47b..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProto.java +++ /dev/null @@ -1,713 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto} - */ -public final class AbstractTransactionResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) - AbstractTransactionResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use AbstractTransactionResponseProto.newBuilder() to construct. - private AbstractTransactionResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AbstractTransactionResponseProto() { - transactionExceptionCode_ = 0; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new AbstractTransactionResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbstractTransactionResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractResultMessageProto.Builder subBuilder = null; - if (abstractResultMessage_ != null) { - subBuilder = abstractResultMessage_.toBuilder(); - } - abstractResultMessage_ = input.readMessage(AbstractResultMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractResultMessage_); - abstractResultMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - transactionExceptionCode_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractTransactionResponseProto.class, Builder.class); - } - - public static final int ABSTRACTRESULTMESSAGE_FIELD_NUMBER = 1; - private AbstractResultMessageProto abstractResultMessage_; - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return Whether the abstractResultMessage field is set. - */ - @Override - public boolean hasAbstractResultMessage() { - return abstractResultMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return The abstractResultMessage. - */ - @Override - public AbstractResultMessageProto getAbstractResultMessage() { - return abstractResultMessage_ == null ? AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - @Override - public AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { - return getAbstractResultMessage(); - } - - public static final int TRANSACTIONEXCEPTIONCODE_FIELD_NUMBER = 2; - private int transactionExceptionCode_; - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @return The enum numeric value on the wire for transactionExceptionCode. - */ - @Override public int getTransactionExceptionCodeValue() { - return transactionExceptionCode_; - } - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @return The transactionExceptionCode. - */ - @Override public TransactionExceptionCodeProto getTransactionExceptionCode() { - @SuppressWarnings("deprecation") - TransactionExceptionCodeProto result = TransactionExceptionCodeProto.valueOf(transactionExceptionCode_); - return result == null ? TransactionExceptionCodeProto.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractResultMessage_ != null) { - output.writeMessage(1, getAbstractResultMessage()); - } - if (transactionExceptionCode_ != TransactionExceptionCodeProto.Unknown.getNumber()) { - output.writeEnum(2, transactionExceptionCode_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractResultMessage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractResultMessage()); - } - if (transactionExceptionCode_ != TransactionExceptionCodeProto.Unknown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, transactionExceptionCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof AbstractTransactionResponseProto)) { - return super.equals(obj); - } - AbstractTransactionResponseProto other = (AbstractTransactionResponseProto) obj; - - if (hasAbstractResultMessage() != other.hasAbstractResultMessage()) return false; - if (hasAbstractResultMessage()) { - if (!getAbstractResultMessage() - .equals(other.getAbstractResultMessage())) return false; - } - if (transactionExceptionCode_ != other.transactionExceptionCode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractResultMessage()) { - hash = (37 * hash) + ABSTRACTRESULTMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractResultMessage().hashCode(); - } - hash = (37 * hash) + TRANSACTIONEXCEPTIONCODE_FIELD_NUMBER; - hash = (53 * hash) + transactionExceptionCode_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static AbstractTransactionResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractTransactionResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractTransactionResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractTransactionResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractTransactionResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static AbstractTransactionResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static AbstractTransactionResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractTransactionResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractTransactionResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static AbstractTransactionResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static AbstractTransactionResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static AbstractTransactionResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(AbstractTransactionResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) - AbstractTransactionResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AbstractTransactionResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = null; - } else { - abstractResultMessage_ = null; - abstractResultMessageBuilder_ = null; - } - transactionExceptionCode_ = 0; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return AbstractTransactionResponse.internal_static_org_apache_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; - } - - @Override - public AbstractTransactionResponseProto getDefaultInstanceForType() { - return AbstractTransactionResponseProto.getDefaultInstance(); - } - - @Override - public AbstractTransactionResponseProto build() { - AbstractTransactionResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public AbstractTransactionResponseProto buildPartial() { - AbstractTransactionResponseProto result = new AbstractTransactionResponseProto(this); - if (abstractResultMessageBuilder_ == null) { - result.abstractResultMessage_ = abstractResultMessage_; - } else { - result.abstractResultMessage_ = abstractResultMessageBuilder_.build(); - } - result.transactionExceptionCode_ = transactionExceptionCode_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AbstractTransactionResponseProto) { - return mergeFrom((AbstractTransactionResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(AbstractTransactionResponseProto other) { - if (other == AbstractTransactionResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractResultMessage()) { - mergeAbstractResultMessage(other.getAbstractResultMessage()); - } - if (other.transactionExceptionCode_ != 0) { - setTransactionExceptionCodeValue(other.getTransactionExceptionCodeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AbstractTransactionResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AbstractTransactionResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractResultMessageProto abstractResultMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder> abstractResultMessageBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return Whether the abstractResultMessage field is set. - */ - public boolean hasAbstractResultMessage() { - return abstractResultMessageBuilder_ != null || abstractResultMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return The abstractResultMessage. - */ - public AbstractResultMessageProto getAbstractResultMessage() { - if (abstractResultMessageBuilder_ == null) { - return abstractResultMessage_ == null ? AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } else { - return abstractResultMessageBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder setAbstractResultMessage(AbstractResultMessageProto value) { - if (abstractResultMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractResultMessage_ = value; - onChanged(); - } else { - abstractResultMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder setAbstractResultMessage( - AbstractResultMessageProto.Builder builderForValue) { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractResultMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder mergeAbstractResultMessage(AbstractResultMessageProto value) { - if (abstractResultMessageBuilder_ == null) { - if (abstractResultMessage_ != null) { - abstractResultMessage_ = - AbstractResultMessageProto.newBuilder(abstractResultMessage_).mergeFrom(value).buildPartial(); - } else { - abstractResultMessage_ = value; - } - onChanged(); - } else { - abstractResultMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder clearAbstractResultMessage() { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = null; - onChanged(); - } else { - abstractResultMessage_ = null; - abstractResultMessageBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public AbstractResultMessageProto.Builder getAbstractResultMessageBuilder() { - - onChanged(); - return getAbstractResultMessageFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { - if (abstractResultMessageBuilder_ != null) { - return abstractResultMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractResultMessage_ == null ? - AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder> - getAbstractResultMessageFieldBuilder() { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractResultMessageProto, AbstractResultMessageProto.Builder, AbstractResultMessageProtoOrBuilder>( - getAbstractResultMessage(), - getParentForChildren(), - isClean()); - abstractResultMessage_ = null; - } - return abstractResultMessageBuilder_; - } - - private int transactionExceptionCode_ = 0; - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @return The enum numeric value on the wire for transactionExceptionCode. - */ - @Override public int getTransactionExceptionCodeValue() { - return transactionExceptionCode_; - } - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @param value The enum numeric value on the wire for transactionExceptionCode to set. - * @return This builder for chaining. - */ - public Builder setTransactionExceptionCodeValue(int value) { - - transactionExceptionCode_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @return The transactionExceptionCode. - */ - @Override - public TransactionExceptionCodeProto getTransactionExceptionCode() { - @SuppressWarnings("deprecation") - TransactionExceptionCodeProto result = TransactionExceptionCodeProto.valueOf(transactionExceptionCode_); - return result == null ? TransactionExceptionCodeProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @param value The transactionExceptionCode to set. - * @return This builder for chaining. - */ - public Builder setTransactionExceptionCode(TransactionExceptionCodeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - transactionExceptionCode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @return This builder for chaining. - */ - public Builder clearTransactionExceptionCode() { - - transactionExceptionCode_ = 0; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) - private static final AbstractTransactionResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new AbstractTransactionResponseProto(); - } - - public static AbstractTransactionResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public AbstractTransactionResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbstractTransactionResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public AbstractTransactionResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java deleted file mode 100644 index 5fdc2ef6de9..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface AbstractTransactionResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return Whether the abstractResultMessage field is set. - */ - boolean hasAbstractResultMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - * @return The abstractResultMessage. - */ - AbstractResultMessageProto getAbstractResultMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder(); - - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @return The enum numeric value on the wire for transactionExceptionCode. - */ - int getTransactionExceptionCodeValue(); - /** - * .org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - * @return The transactionExceptionCode. - */ - TransactionExceptionCodeProto getTransactionExceptionCode(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessage.java deleted file mode 100644 index 77eddef9e4f..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessage.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: batchResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BatchResultMessage { - private BatchResultMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\030batchResultMessage.proto\022\"org.apache.s" + - "eata.protocol.protobuf\032\025abstractMessage." + - "proto\032\031google/protobuf/any.proto\"\252\001\n\027Bat" + - "chResultMessageProto\022Q\n\017abstractMessage\030" + - "\001 \001(\01328.org.apache.seata.protocol.protob" + - "uf.AbstractMessageProto\022,\n\016resultMessage" + - "s\030\002 \003(\0132\024.google.protobuf.Any\022\016\n\006msgIds\030" + - "\003 \003(\005BK\n3org.apache.seata.core.serialize" + - "r.protobuf.generatedB\022BatchResultMessage" + - "P\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractMessage.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor, - new String[] { "AbstractMessage", "ResultMessages", "MsgIds", }); - AbstractMessage.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProto.java deleted file mode 100644 index 41748757e72..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProto.java +++ /dev/null @@ -1,1145 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: batchResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BatchResultMessageProto} - */ -public final class BatchResultMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BatchResultMessageProto) - BatchResultMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchResultMessageProto.newBuilder() to construct. - private BatchResultMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchResultMessageProto() { - resultMessages_ = java.util.Collections.emptyList(); - msgIds_ = emptyIntList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BatchResultMessageProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchResultMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resultMessages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resultMessages_.add( - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - msgIds_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - msgIds_.addInt(input.readInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - msgIds_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - msgIds_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - resultMessages_ = java.util.Collections.unmodifiableList(resultMessages_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - msgIds_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BatchResultMessageProto.class, Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private AbstractMessageProto abstractMessage_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - @Override - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - @Override - public AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - @Override - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int RESULTMESSAGES_FIELD_NUMBER = 2; - private java.util.List resultMessages_; - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - @Override - public java.util.List getResultMessagesList() { - return resultMessages_; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - @Override - public java.util.List - getResultMessagesOrBuilderList() { - return resultMessages_; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - @Override - public int getResultMessagesCount() { - return resultMessages_.size(); - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - @Override - public com.google.protobuf.Any getResultMessages(int index) { - return resultMessages_.get(index); - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - @Override - public com.google.protobuf.AnyOrBuilder getResultMessagesOrBuilder( - int index) { - return resultMessages_.get(index); - } - - public static final int MSGIDS_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.IntList msgIds_; - /** - * repeated int32 msgIds = 3; - * @return A list containing the msgIds. - */ - @Override - public java.util.List - getMsgIdsList() { - return msgIds_; - } - /** - * repeated int32 msgIds = 3; - * @return The count of msgIds. - */ - public int getMsgIdsCount() { - return msgIds_.size(); - } - /** - * repeated int32 msgIds = 3; - * @param index The index of the element to return. - * @return The msgIds at the given index. - */ - public int getMsgIds(int index) { - return msgIds_.getInt(index); - } - private int msgIdsMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - for (int i = 0; i < resultMessages_.size(); i++) { - output.writeMessage(2, resultMessages_.get(i)); - } - if (getMsgIdsList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(msgIdsMemoizedSerializedSize); - } - for (int i = 0; i < msgIds_.size(); i++) { - output.writeInt32NoTag(msgIds_.getInt(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractMessage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractMessage()); - } - for (int i = 0; i < resultMessages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, resultMessages_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < msgIds_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(msgIds_.getInt(i)); - } - size += dataSize; - if (!getMsgIdsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - msgIdsMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BatchResultMessageProto)) { - return super.equals(obj); - } - BatchResultMessageProto other = (BatchResultMessageProto) obj; - - if (hasAbstractMessage() != other.hasAbstractMessage()) return false; - if (hasAbstractMessage()) { - if (!getAbstractMessage() - .equals(other.getAbstractMessage())) return false; - } - if (!getResultMessagesList() - .equals(other.getResultMessagesList())) return false; - if (!getMsgIdsList() - .equals(other.getMsgIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractMessage()) { - hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractMessage().hashCode(); - } - if (getResultMessagesCount() > 0) { - hash = (37 * hash) + RESULTMESSAGES_FIELD_NUMBER; - hash = (53 * hash) + getResultMessagesList().hashCode(); - } - if (getMsgIdsCount() > 0) { - hash = (37 * hash) + MSGIDS_FIELD_NUMBER; - hash = (53 * hash) + getMsgIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BatchResultMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BatchResultMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BatchResultMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BatchResultMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BatchResultMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BatchResultMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BatchResultMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BatchResultMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BatchResultMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BatchResultMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BatchResultMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BatchResultMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BatchResultMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BatchResultMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BatchResultMessageProto) - BatchResultMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BatchResultMessageProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BatchResultMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultMessagesFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - if (resultMessagesBuilder_ == null) { - resultMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultMessagesBuilder_.clear(); - } - msgIds_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BatchResultMessage.internal_static_org_apache_seata_protocol_protobuf_BatchResultMessageProto_descriptor; - } - - @Override - public BatchResultMessageProto getDefaultInstanceForType() { - return BatchResultMessageProto.getDefaultInstance(); - } - - @Override - public BatchResultMessageProto build() { - BatchResultMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BatchResultMessageProto buildPartial() { - BatchResultMessageProto result = new BatchResultMessageProto(this); - int from_bitField0_ = bitField0_; - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - if (resultMessagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - resultMessages_ = java.util.Collections.unmodifiableList(resultMessages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.resultMessages_ = resultMessages_; - } else { - result.resultMessages_ = resultMessagesBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - msgIds_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.msgIds_ = msgIds_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BatchResultMessageProto) { - return mergeFrom((BatchResultMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BatchResultMessageProto other) { - if (other == BatchResultMessageProto.getDefaultInstance()) return this; - if (other.hasAbstractMessage()) { - mergeAbstractMessage(other.getAbstractMessage()); - } - if (resultMessagesBuilder_ == null) { - if (!other.resultMessages_.isEmpty()) { - if (resultMessages_.isEmpty()) { - resultMessages_ = other.resultMessages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultMessagesIsMutable(); - resultMessages_.addAll(other.resultMessages_); - } - onChanged(); - } - } else { - if (!other.resultMessages_.isEmpty()) { - if (resultMessagesBuilder_.isEmpty()) { - resultMessagesBuilder_.dispose(); - resultMessagesBuilder_ = null; - resultMessages_ = other.resultMessages_; - bitField0_ = (bitField0_ & ~0x00000001); - resultMessagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultMessagesFieldBuilder() : null; - } else { - resultMessagesBuilder_.addAllMessages(other.resultMessages_); - } - } - } - if (!other.msgIds_.isEmpty()) { - if (msgIds_.isEmpty()) { - msgIds_ = other.msgIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMsgIdsIsMutable(); - msgIds_.addAll(other.msgIds_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BatchResultMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BatchResultMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - public AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private java.util.List resultMessages_ = - java.util.Collections.emptyList(); - private void ensureResultMessagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - resultMessages_ = new java.util.ArrayList(resultMessages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> resultMessagesBuilder_; - - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public java.util.List getResultMessagesList() { - if (resultMessagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(resultMessages_); - } else { - return resultMessagesBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public int getResultMessagesCount() { - if (resultMessagesBuilder_ == null) { - return resultMessages_.size(); - } else { - return resultMessagesBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public com.google.protobuf.Any getResultMessages(int index) { - if (resultMessagesBuilder_ == null) { - return resultMessages_.get(index); - } else { - return resultMessagesBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder setResultMessages( - int index, com.google.protobuf.Any value) { - if (resultMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultMessagesIsMutable(); - resultMessages_.set(index, value); - onChanged(); - } else { - resultMessagesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder setResultMessages( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (resultMessagesBuilder_ == null) { - ensureResultMessagesIsMutable(); - resultMessages_.set(index, builderForValue.build()); - onChanged(); - } else { - resultMessagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder addResultMessages(com.google.protobuf.Any value) { - if (resultMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultMessagesIsMutable(); - resultMessages_.add(value); - onChanged(); - } else { - resultMessagesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder addResultMessages( - int index, com.google.protobuf.Any value) { - if (resultMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultMessagesIsMutable(); - resultMessages_.add(index, value); - onChanged(); - } else { - resultMessagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder addResultMessages( - com.google.protobuf.Any.Builder builderForValue) { - if (resultMessagesBuilder_ == null) { - ensureResultMessagesIsMutable(); - resultMessages_.add(builderForValue.build()); - onChanged(); - } else { - resultMessagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder addResultMessages( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (resultMessagesBuilder_ == null) { - ensureResultMessagesIsMutable(); - resultMessages_.add(index, builderForValue.build()); - onChanged(); - } else { - resultMessagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder addAllResultMessages( - Iterable values) { - if (resultMessagesBuilder_ == null) { - ensureResultMessagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resultMessages_); - onChanged(); - } else { - resultMessagesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder clearResultMessages() { - if (resultMessagesBuilder_ == null) { - resultMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultMessagesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public Builder removeResultMessages(int index) { - if (resultMessagesBuilder_ == null) { - ensureResultMessagesIsMutable(); - resultMessages_.remove(index); - onChanged(); - } else { - resultMessagesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public com.google.protobuf.Any.Builder getResultMessagesBuilder( - int index) { - return getResultMessagesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public com.google.protobuf.AnyOrBuilder getResultMessagesOrBuilder( - int index) { - if (resultMessagesBuilder_ == null) { - return resultMessages_.get(index); } else { - return resultMessagesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public java.util.List - getResultMessagesOrBuilderList() { - if (resultMessagesBuilder_ != null) { - return resultMessagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(resultMessages_); - } - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public com.google.protobuf.Any.Builder addResultMessagesBuilder() { - return getResultMessagesFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public com.google.protobuf.Any.Builder addResultMessagesBuilder( - int index) { - return getResultMessagesFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - public java.util.List - getResultMessagesBuilderList() { - return getResultMessagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getResultMessagesFieldBuilder() { - if (resultMessagesBuilder_ == null) { - resultMessagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - resultMessages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - resultMessages_ = null; - } - return resultMessagesBuilder_; - } - - private com.google.protobuf.Internal.IntList msgIds_ = emptyIntList(); - private void ensureMsgIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - msgIds_ = mutableCopy(msgIds_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated int32 msgIds = 3; - * @return A list containing the msgIds. - */ - public java.util.List - getMsgIdsList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(msgIds_) : msgIds_; - } - /** - * repeated int32 msgIds = 3; - * @return The count of msgIds. - */ - public int getMsgIdsCount() { - return msgIds_.size(); - } - /** - * repeated int32 msgIds = 3; - * @param index The index of the element to return. - * @return The msgIds at the given index. - */ - public int getMsgIds(int index) { - return msgIds_.getInt(index); - } - /** - * repeated int32 msgIds = 3; - * @param index The index to set the value at. - * @param value The msgIds to set. - * @return This builder for chaining. - */ - public Builder setMsgIds( - int index, int value) { - ensureMsgIdsIsMutable(); - msgIds_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - * @param value The msgIds to add. - * @return This builder for chaining. - */ - public Builder addMsgIds(int value) { - ensureMsgIdsIsMutable(); - msgIds_.addInt(value); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - * @param values The msgIds to add. - * @return This builder for chaining. - */ - public Builder addAllMsgIds( - Iterable values) { - ensureMsgIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, msgIds_); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - * @return This builder for chaining. - */ - public Builder clearMsgIds() { - msgIds_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BatchResultMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BatchResultMessageProto) - private static final BatchResultMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BatchResultMessageProto(); - } - - public static BatchResultMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BatchResultMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchResultMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BatchResultMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProtoOrBuilder.java deleted file mode 100644 index 8e644d356f3..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BatchResultMessageProtoOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: batchResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BatchResultMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BatchResultMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - boolean hasAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - AbstractMessageProto getAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); - - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - java.util.List - getResultMessagesList(); - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - com.google.protobuf.Any getResultMessages(int index); - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - int getResultMessagesCount(); - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - java.util.List - getResultMessagesOrBuilderList(); - /** - * repeated .google.protobuf.Any resultMessages = 2; - */ - com.google.protobuf.AnyOrBuilder getResultMessagesOrBuilder( - int index); - - /** - * repeated int32 msgIds = 3; - * @return A list containing the msgIds. - */ - java.util.List getMsgIdsList(); - /** - * repeated int32 msgIds = 3; - * @return The count of msgIds. - */ - int getMsgIdsCount(); - /** - * repeated int32 msgIds = 3; - * @param index The index of the element to return. - * @return The msgIds at the given index. - */ - int getMsgIds(int index); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequest.java deleted file mode 100644 index b4761a89066..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchCommitRequest { - private BranchCommitRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\031branchCommitRequest.proto\022\"org.apache." + - "seata.protocol.protobuf\032\036abstractBranchE" + - "ndRequest.proto\"\177\n\030BranchCommitRequestPr" + - "oto\022c\n\030abstractBranchEndRequest\030\001 \001(\0132A." + - "org.apache.seata.protocol.protobuf.Abstr" + - "actBranchEndRequestProtoBL\n3org.apache.s" + - "eata.core.serializer.protobuf.generatedB" + - "\023BranchCommitRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractBranchEndRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor, - new String[] { "AbstractBranchEndRequest", }); - AbstractBranchEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProto.java deleted file mode 100644 index fec377b4130..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProto.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchCommitRequestProto} - */ -public final class BranchCommitRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) - BranchCommitRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BranchCommitRequestProto.newBuilder() to construct. - private BranchCommitRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BranchCommitRequestProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BranchCommitRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BranchCommitRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractBranchEndRequestProto.Builder subBuilder = null; - if (abstractBranchEndRequest_ != null) { - subBuilder = abstractBranchEndRequest_.toBuilder(); - } - abstractBranchEndRequest_ = input.readMessage(AbstractBranchEndRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractBranchEndRequest_); - abstractBranchEndRequest_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchCommitRequestProto.class, Builder.class); - } - - public static final int ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER = 1; - private AbstractBranchEndRequestProto abstractBranchEndRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return Whether the abstractBranchEndRequest field is set. - */ - @Override - public boolean hasAbstractBranchEndRequest() { - return abstractBranchEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return The abstractBranchEndRequest. - */ - @Override - public AbstractBranchEndRequestProto getAbstractBranchEndRequest() { - return abstractBranchEndRequest_ == null ? AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - @Override - public AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { - return getAbstractBranchEndRequest(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractBranchEndRequest_ != null) { - output.writeMessage(1, getAbstractBranchEndRequest()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractBranchEndRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractBranchEndRequest()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BranchCommitRequestProto)) { - return super.equals(obj); - } - BranchCommitRequestProto other = (BranchCommitRequestProto) obj; - - if (hasAbstractBranchEndRequest() != other.hasAbstractBranchEndRequest()) return false; - if (hasAbstractBranchEndRequest()) { - if (!getAbstractBranchEndRequest() - .equals(other.getAbstractBranchEndRequest())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractBranchEndRequest()) { - hash = (37 * hash) + ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractBranchEndRequest().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BranchCommitRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchCommitRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchCommitRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchCommitRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchCommitRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchCommitRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchCommitRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchCommitRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BranchCommitRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BranchCommitRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BranchCommitRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchCommitRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BranchCommitRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchCommitRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) - BranchCommitRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchCommitRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchCommitRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = null; - } else { - abstractBranchEndRequest_ = null; - abstractBranchEndRequestBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BranchCommitRequest.internal_static_org_apache_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; - } - - @Override - public BranchCommitRequestProto getDefaultInstanceForType() { - return BranchCommitRequestProto.getDefaultInstance(); - } - - @Override - public BranchCommitRequestProto build() { - BranchCommitRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BranchCommitRequestProto buildPartial() { - BranchCommitRequestProto result = new BranchCommitRequestProto(this); - if (abstractBranchEndRequestBuilder_ == null) { - result.abstractBranchEndRequest_ = abstractBranchEndRequest_; - } else { - result.abstractBranchEndRequest_ = abstractBranchEndRequestBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BranchCommitRequestProto) { - return mergeFrom((BranchCommitRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BranchCommitRequestProto other) { - if (other == BranchCommitRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractBranchEndRequest()) { - mergeAbstractBranchEndRequest(other.getAbstractBranchEndRequest()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BranchCommitRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BranchCommitRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractBranchEndRequestProto abstractBranchEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder> abstractBranchEndRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return Whether the abstractBranchEndRequest field is set. - */ - public boolean hasAbstractBranchEndRequest() { - return abstractBranchEndRequestBuilder_ != null || abstractBranchEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return The abstractBranchEndRequest. - */ - public AbstractBranchEndRequestProto getAbstractBranchEndRequest() { - if (abstractBranchEndRequestBuilder_ == null) { - return abstractBranchEndRequest_ == null ? AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } else { - return abstractBranchEndRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder setAbstractBranchEndRequest(AbstractBranchEndRequestProto value) { - if (abstractBranchEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractBranchEndRequest_ = value; - onChanged(); - } else { - abstractBranchEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder setAbstractBranchEndRequest( - AbstractBranchEndRequestProto.Builder builderForValue) { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractBranchEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder mergeAbstractBranchEndRequest(AbstractBranchEndRequestProto value) { - if (abstractBranchEndRequestBuilder_ == null) { - if (abstractBranchEndRequest_ != null) { - abstractBranchEndRequest_ = - AbstractBranchEndRequestProto.newBuilder(abstractBranchEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractBranchEndRequest_ = value; - } - onChanged(); - } else { - abstractBranchEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder clearAbstractBranchEndRequest() { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = null; - onChanged(); - } else { - abstractBranchEndRequest_ = null; - abstractBranchEndRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public AbstractBranchEndRequestProto.Builder getAbstractBranchEndRequestBuilder() { - - onChanged(); - return getAbstractBranchEndRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { - if (abstractBranchEndRequestBuilder_ != null) { - return abstractBranchEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractBranchEndRequest_ == null ? - AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder> - getAbstractBranchEndRequestFieldBuilder() { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder>( - getAbstractBranchEndRequest(), - getParentForChildren(), - isClean()); - abstractBranchEndRequest_ = null; - } - return abstractBranchEndRequestBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) - private static final BranchCommitRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BranchCommitRequestProto(); - } - - public static BranchCommitRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BranchCommitRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BranchCommitRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BranchCommitRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProtoOrBuilder.java deleted file mode 100644 index 1ecd11109fb..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitRequestProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BranchCommitRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchCommitRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return Whether the abstractBranchEndRequest field is set. - */ - boolean hasAbstractBranchEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return The abstractBranchEndRequest. - */ - AbstractBranchEndRequestProto getAbstractBranchEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponse.java deleted file mode 100644 index b75dc8e4d05..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchCommitResponse { - private BranchCommitResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\032branchCommitResponse.proto\022\"org.apache" + - ".seata.protocol.protobuf\032\037abstractBranch" + - "EndResponse.proto\"\202\001\n\031BranchCommitRespon" + - "seProto\022e\n\031abstractBranchEndResponse\030\001 \001" + - "(\0132B.org.apache.seata.protocol.protobuf." + - "AbstractBranchEndResponseProtoBM\n3org.ap" + - "ache.seata.core.serializer.protobuf.gene" + - "ratedB\024BranchCommitResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractBranchEndResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor, - new String[] { "AbstractBranchEndResponse", }); - AbstractBranchEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProto.java deleted file mode 100644 index d78f5cbc09d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProto.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchCommitResponseProto} - */ -public final class BranchCommitResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) - BranchCommitResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BranchCommitResponseProto.newBuilder() to construct. - private BranchCommitResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BranchCommitResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BranchCommitResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BranchCommitResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractBranchEndResponseProto.Builder subBuilder = null; - if (abstractBranchEndResponse_ != null) { - subBuilder = abstractBranchEndResponse_.toBuilder(); - } - abstractBranchEndResponse_ = input.readMessage(AbstractBranchEndResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractBranchEndResponse_); - abstractBranchEndResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchCommitResponseProto.class, Builder.class); - } - - public static final int ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER = 1; - private AbstractBranchEndResponseProto abstractBranchEndResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return Whether the abstractBranchEndResponse field is set. - */ - @Override - public boolean hasAbstractBranchEndResponse() { - return abstractBranchEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return The abstractBranchEndResponse. - */ - @Override - public AbstractBranchEndResponseProto getAbstractBranchEndResponse() { - return abstractBranchEndResponse_ == null ? AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - @Override - public AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { - return getAbstractBranchEndResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractBranchEndResponse_ != null) { - output.writeMessage(1, getAbstractBranchEndResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractBranchEndResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractBranchEndResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BranchCommitResponseProto)) { - return super.equals(obj); - } - BranchCommitResponseProto other = (BranchCommitResponseProto) obj; - - if (hasAbstractBranchEndResponse() != other.hasAbstractBranchEndResponse()) return false; - if (hasAbstractBranchEndResponse()) { - if (!getAbstractBranchEndResponse() - .equals(other.getAbstractBranchEndResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractBranchEndResponse()) { - hash = (37 * hash) + ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractBranchEndResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BranchCommitResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchCommitResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchCommitResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchCommitResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchCommitResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchCommitResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchCommitResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchCommitResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BranchCommitResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BranchCommitResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BranchCommitResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchCommitResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BranchCommitResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchCommitResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) - BranchCommitResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchCommitResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchCommitResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = null; - } else { - abstractBranchEndResponse_ = null; - abstractBranchEndResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BranchCommitResponse.internal_static_org_apache_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; - } - - @Override - public BranchCommitResponseProto getDefaultInstanceForType() { - return BranchCommitResponseProto.getDefaultInstance(); - } - - @Override - public BranchCommitResponseProto build() { - BranchCommitResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BranchCommitResponseProto buildPartial() { - BranchCommitResponseProto result = new BranchCommitResponseProto(this); - if (abstractBranchEndResponseBuilder_ == null) { - result.abstractBranchEndResponse_ = abstractBranchEndResponse_; - } else { - result.abstractBranchEndResponse_ = abstractBranchEndResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BranchCommitResponseProto) { - return mergeFrom((BranchCommitResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BranchCommitResponseProto other) { - if (other == BranchCommitResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractBranchEndResponse()) { - mergeAbstractBranchEndResponse(other.getAbstractBranchEndResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BranchCommitResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BranchCommitResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractBranchEndResponseProto abstractBranchEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder> abstractBranchEndResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return Whether the abstractBranchEndResponse field is set. - */ - public boolean hasAbstractBranchEndResponse() { - return abstractBranchEndResponseBuilder_ != null || abstractBranchEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return The abstractBranchEndResponse. - */ - public AbstractBranchEndResponseProto getAbstractBranchEndResponse() { - if (abstractBranchEndResponseBuilder_ == null) { - return abstractBranchEndResponse_ == null ? AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } else { - return abstractBranchEndResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder setAbstractBranchEndResponse(AbstractBranchEndResponseProto value) { - if (abstractBranchEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractBranchEndResponse_ = value; - onChanged(); - } else { - abstractBranchEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder setAbstractBranchEndResponse( - AbstractBranchEndResponseProto.Builder builderForValue) { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractBranchEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder mergeAbstractBranchEndResponse(AbstractBranchEndResponseProto value) { - if (abstractBranchEndResponseBuilder_ == null) { - if (abstractBranchEndResponse_ != null) { - abstractBranchEndResponse_ = - AbstractBranchEndResponseProto.newBuilder(abstractBranchEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractBranchEndResponse_ = value; - } - onChanged(); - } else { - abstractBranchEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder clearAbstractBranchEndResponse() { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = null; - onChanged(); - } else { - abstractBranchEndResponse_ = null; - abstractBranchEndResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public AbstractBranchEndResponseProto.Builder getAbstractBranchEndResponseBuilder() { - - onChanged(); - return getAbstractBranchEndResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { - if (abstractBranchEndResponseBuilder_ != null) { - return abstractBranchEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractBranchEndResponse_ == null ? - AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder> - getAbstractBranchEndResponseFieldBuilder() { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder>( - getAbstractBranchEndResponse(), - getParentForChildren(), - isClean()); - abstractBranchEndResponse_ = null; - } - return abstractBranchEndResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) - private static final BranchCommitResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BranchCommitResponseProto(); - } - - public static BranchCommitResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BranchCommitResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BranchCommitResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BranchCommitResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProtoOrBuilder.java deleted file mode 100644 index fb53c6b7fb2..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchCommitResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BranchCommitResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchCommitResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return Whether the abstractBranchEndResponse field is set. - */ - boolean hasAbstractBranchEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return The abstractBranchEndResponse. - */ - AbstractBranchEndResponseProto getAbstractBranchEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequest.java deleted file mode 100644 index 05e5ca2ee9c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchRegisterRequest { - private BranchRegisterRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\033branchRegisterRequest.proto\022\"org.apach" + - "e.seata.protocol.protobuf\032\020branchType.pr" + - "oto\032 abstractTransactionRequest.proto\"\231\002" + - "\n\032BranchRegisterRequestProto\022g\n\032abstract" + - "TransactionRequest\030\001 \001(\0132C.org.apache.se" + - "ata.protocol.protobuf.AbstractTransactio" + - "nRequestProto\022\013\n\003xid\030\002 \001(\t\022G\n\nbranchType" + - "\030\003 \001(\01623.org.apache.seata.protocol.proto" + - "buf.BranchTypeProto\022\022\n\nresourceId\030\004 \001(\t\022" + - "\017\n\007lockKey\030\005 \001(\t\022\027\n\017applicationData\030\006 \001(" + - "\tBN\n3org.apache.seata.core.serializer.pr" + - "otobuf.generatedB\025BranchRegisterRequestP" + - "\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - BranchType.getDescriptor(), - AbstractTransactionRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor, - new String[] { "AbstractTransactionRequest", "Xid", "BranchType", "ResourceId", "LockKey", "ApplicationData", }); - BranchType.getDescriptor(); - AbstractTransactionRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProto.java deleted file mode 100644 index a79d3122645..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProto.java +++ /dev/null @@ -1,1265 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRegisterRequestProto} - */ -public final class BranchRegisterRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) - BranchRegisterRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BranchRegisterRequestProto.newBuilder() to construct. - private BranchRegisterRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BranchRegisterRequestProto() { - xid_ = ""; - branchType_ = 0; - resourceId_ = ""; - lockKey_ = ""; - applicationData_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BranchRegisterRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BranchRegisterRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - - branchType_ = rawValue; - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - resourceId_ = s; - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - - lockKey_ = s; - break; - } - case 50: { - String s = input.readStringRequireUtf8(); - - applicationData_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchRegisterRequestProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - @Override - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - @Override - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - @Override - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile Object xid_; - /** - * string xid = 2; - * @return The xid. - */ - @Override - public String getXid() { - Object ref = xid_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - @Override - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BRANCHTYPE_FIELD_NUMBER = 3; - private int branchType_; - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @return The enum numeric value on the wire for branchType. - */ - @Override public int getBranchTypeValue() { - return branchType_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @return The branchType. - */ - @Override public BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - BranchTypeProto result = BranchTypeProto.valueOf(branchType_); - return result == null ? BranchTypeProto.UNRECOGNIZED : result; - } - - public static final int RESOURCEID_FIELD_NUMBER = 4; - private volatile Object resourceId_; - /** - * string resourceId = 4; - * @return The resourceId. - */ - @Override - public String getResourceId() { - Object ref = resourceId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } - } - /** - * string resourceId = 4; - * @return The bytes for resourceId. - */ - @Override - public com.google.protobuf.ByteString - getResourceIdBytes() { - Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCKKEY_FIELD_NUMBER = 5; - private volatile Object lockKey_; - /** - * string lockKey = 5; - * @return The lockKey. - */ - @Override - public String getLockKey() { - Object ref = lockKey_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - lockKey_ = s; - return s; - } - } - /** - * string lockKey = 5; - * @return The bytes for lockKey. - */ - @Override - public com.google.protobuf.ByteString - getLockKeyBytes() { - Object ref = lockKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - lockKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int APPLICATIONDATA_FIELD_NUMBER = 6; - private volatile Object applicationData_; - /** - * string applicationData = 6; - * @return The applicationData. - */ - @Override - public String getApplicationData() { - Object ref = applicationData_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } - } - /** - * string applicationData = 6; - * @return The bytes for applicationData. - */ - @Override - public com.google.protobuf.ByteString - getApplicationDataBytes() { - Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (branchType_ != BranchTypeProto.AT.getNumber()) { - output.writeEnum(3, branchType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lockKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lockKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (branchType_ != BranchTypeProto.AT.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, branchType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lockKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lockKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BranchRegisterRequestProto)) { - return super.equals(obj); - } - BranchRegisterRequestProto other = (BranchRegisterRequestProto) obj; - - if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; - if (hasAbstractTransactionRequest()) { - if (!getAbstractTransactionRequest() - .equals(other.getAbstractTransactionRequest())) return false; - } - if (!getXid() - .equals(other.getXid())) return false; - if (branchType_ != other.branchType_) return false; - if (!getResourceId() - .equals(other.getResourceId())) return false; - if (!getLockKey() - .equals(other.getLockKey())) return false; - if (!getApplicationData() - .equals(other.getApplicationData())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionRequest()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); - } - hash = (37 * hash) + XID_FIELD_NUMBER; - hash = (53 * hash) + getXid().hashCode(); - hash = (37 * hash) + BRANCHTYPE_FIELD_NUMBER; - hash = (53 * hash) + branchType_; - hash = (37 * hash) + RESOURCEID_FIELD_NUMBER; - hash = (53 * hash) + getResourceId().hashCode(); - hash = (37 * hash) + LOCKKEY_FIELD_NUMBER; - hash = (53 * hash) + getLockKey().hashCode(); - hash = (37 * hash) + APPLICATIONDATA_FIELD_NUMBER; - hash = (53 * hash) + getApplicationData().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BranchRegisterRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRegisterRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRegisterRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRegisterRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRegisterRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRegisterRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRegisterRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchRegisterRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BranchRegisterRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BranchRegisterRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BranchRegisterRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchRegisterRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BranchRegisterRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRegisterRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) - BranchRegisterRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchRegisterRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - xid_ = ""; - - branchType_ = 0; - - resourceId_ = ""; - - lockKey_ = ""; - - applicationData_ = ""; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BranchRegisterRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; - } - - @Override - public BranchRegisterRequestProto getDefaultInstanceForType() { - return BranchRegisterRequestProto.getDefaultInstance(); - } - - @Override - public BranchRegisterRequestProto build() { - BranchRegisterRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BranchRegisterRequestProto buildPartial() { - BranchRegisterRequestProto result = new BranchRegisterRequestProto(this); - if (abstractTransactionRequestBuilder_ == null) { - result.abstractTransactionRequest_ = abstractTransactionRequest_; - } else { - result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); - } - result.xid_ = xid_; - result.branchType_ = branchType_; - result.resourceId_ = resourceId_; - result.lockKey_ = lockKey_; - result.applicationData_ = applicationData_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BranchRegisterRequestProto) { - return mergeFrom((BranchRegisterRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BranchRegisterRequestProto other) { - if (other == BranchRegisterRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionRequest()) { - mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); - } - if (!other.getXid().isEmpty()) { - xid_ = other.xid_; - onChanged(); - } - if (other.branchType_ != 0) { - setBranchTypeValue(other.getBranchTypeValue()); - } - if (!other.getResourceId().isEmpty()) { - resourceId_ = other.resourceId_; - onChanged(); - } - if (!other.getLockKey().isEmpty()) { - lockKey_ = other.lockKey_; - onChanged(); - } - if (!other.getApplicationData().isEmpty()) { - applicationData_ = other.applicationData_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BranchRegisterRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BranchRegisterRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private Object xid_ = ""; - /** - * string xid = 2; - * @return The xid. - */ - public String getXid() { - Object ref = xid_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - * @param value The xid to set. - * @return This builder for chaining. - */ - public Builder setXid( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - * @return This builder for chaining. - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - * @param value The bytes for xid to set. - * @return This builder for chaining. - */ - public Builder setXidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - xid_ = value; - onChanged(); - return this; - } - - private int branchType_ = 0; - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @return The enum numeric value on the wire for branchType. - */ - @Override public int getBranchTypeValue() { - return branchType_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @param value The enum numeric value on the wire for branchType to set. - * @return This builder for chaining. - */ - public Builder setBranchTypeValue(int value) { - - branchType_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @return The branchType. - */ - @Override - public BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - BranchTypeProto result = BranchTypeProto.valueOf(branchType_); - return result == null ? BranchTypeProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @param value The branchType to set. - * @return This builder for chaining. - */ - public Builder setBranchType(BranchTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @return This builder for chaining. - */ - public Builder clearBranchType() { - - branchType_ = 0; - onChanged(); - return this; - } - - private Object resourceId_ = ""; - /** - * string resourceId = 4; - * @return The resourceId. - */ - public String getResourceId() { - Object ref = resourceId_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string resourceId = 4; - * @return The bytes for resourceId. - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resourceId = 4; - * @param value The resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceId( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceId_ = value; - onChanged(); - return this; - } - /** - * string resourceId = 4; - * @return This builder for chaining. - */ - public Builder clearResourceId() { - - resourceId_ = getDefaultInstance().getResourceId(); - onChanged(); - return this; - } - /** - * string resourceId = 4; - * @param value The bytes for resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceId_ = value; - onChanged(); - return this; - } - - private Object lockKey_ = ""; - /** - * string lockKey = 5; - * @return The lockKey. - */ - public String getLockKey() { - Object ref = lockKey_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - lockKey_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string lockKey = 5; - * @return The bytes for lockKey. - */ - public com.google.protobuf.ByteString - getLockKeyBytes() { - Object ref = lockKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - lockKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string lockKey = 5; - * @param value The lockKey to set. - * @return This builder for chaining. - */ - public Builder setLockKey( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - lockKey_ = value; - onChanged(); - return this; - } - /** - * string lockKey = 5; - * @return This builder for chaining. - */ - public Builder clearLockKey() { - - lockKey_ = getDefaultInstance().getLockKey(); - onChanged(); - return this; - } - /** - * string lockKey = 5; - * @param value The bytes for lockKey to set. - * @return This builder for chaining. - */ - public Builder setLockKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - lockKey_ = value; - onChanged(); - return this; - } - - private Object applicationData_ = ""; - /** - * string applicationData = 6; - * @return The applicationData. - */ - public String getApplicationData() { - Object ref = applicationData_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string applicationData = 6; - * @return The bytes for applicationData. - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string applicationData = 6; - * @param value The applicationData to set. - * @return This builder for chaining. - */ - public Builder setApplicationData( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationData_ = value; - onChanged(); - return this; - } - /** - * string applicationData = 6; - * @return This builder for chaining. - */ - public Builder clearApplicationData() { - - applicationData_ = getDefaultInstance().getApplicationData(); - onChanged(); - return this; - } - /** - * string applicationData = 6; - * @param value The bytes for applicationData to set. - * @return This builder for chaining. - */ - public Builder setApplicationDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - applicationData_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) - private static final BranchRegisterRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BranchRegisterRequestProto(); - } - - public static BranchRegisterRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BranchRegisterRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BranchRegisterRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BranchRegisterRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java deleted file mode 100644 index 793ed6ec33f..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BranchRegisterRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchRegisterRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - boolean hasAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * string xid = 2; - * @return The xid. - */ - String getXid(); - /** - * string xid = 2; - * @return The bytes for xid. - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @return The enum numeric value on the wire for branchType. - */ - int getBranchTypeValue(); - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 3; - * @return The branchType. - */ - BranchTypeProto getBranchType(); - - /** - * string resourceId = 4; - * @return The resourceId. - */ - String getResourceId(); - /** - * string resourceId = 4; - * @return The bytes for resourceId. - */ - com.google.protobuf.ByteString - getResourceIdBytes(); - - /** - * string lockKey = 5; - * @return The lockKey. - */ - String getLockKey(); - /** - * string lockKey = 5; - * @return The bytes for lockKey. - */ - com.google.protobuf.ByteString - getLockKeyBytes(); - - /** - * string applicationData = 6; - * @return The applicationData. - */ - String getApplicationData(); - /** - * string applicationData = 6; - * @return The bytes for applicationData. - */ - com.google.protobuf.ByteString - getApplicationDataBytes(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponse.java deleted file mode 100644 index 6deaf2da27b..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchRegisterResponse { - private BranchRegisterResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\034branchRegisterResponse.proto\022\"org.apac" + - "he.seata.protocol.protobuf\032!abstractTran" + - "sactionResponse.proto\"\232\001\n\033BranchRegister" + - "ResponseProto\022i\n\033abstractTransactionResp" + - "onse\030\001 \001(\0132D.org.apache.seata.protocol.p" + - "rotobuf.AbstractTransactionResponseProto" + - "\022\020\n\010branchId\030\002 \001(\003BO\n3org.apache.seata.c" + - "ore.serializer.protobuf.generatedB\026Branc" + - "hRegisterResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor, - new String[] { "AbstractTransactionResponse", "BranchId", }); - AbstractTransactionResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProto.java deleted file mode 100644 index ef82e077cd2..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProto.java +++ /dev/null @@ -1,682 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRegisterResponseProto} - */ -public final class BranchRegisterResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) - BranchRegisterResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BranchRegisterResponseProto.newBuilder() to construct. - private BranchRegisterResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BranchRegisterResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BranchRegisterResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BranchRegisterResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionResponse_); - abstractTransactionResponse_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - branchId_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchRegisterResponseProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - @Override - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - @Override - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - @Override - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int BRANCHID_FIELD_NUMBER = 2; - private long branchId_; - /** - * int64 branchId = 2; - * @return The branchId. - */ - @Override - public long getBranchId() { - return branchId_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (branchId_ != 0L) { - output.writeInt64(2, branchId_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionResponse()); - } - if (branchId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, branchId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BranchRegisterResponseProto)) { - return super.equals(obj); - } - BranchRegisterResponseProto other = (BranchRegisterResponseProto) obj; - - if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; - if (hasAbstractTransactionResponse()) { - if (!getAbstractTransactionResponse() - .equals(other.getAbstractTransactionResponse())) return false; - } - if (getBranchId() - != other.getBranchId()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionResponse()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); - } - hash = (37 * hash) + BRANCHID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBranchId()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BranchRegisterResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRegisterResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRegisterResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRegisterResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRegisterResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRegisterResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRegisterResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchRegisterResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BranchRegisterResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BranchRegisterResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BranchRegisterResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchRegisterResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BranchRegisterResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRegisterResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) - BranchRegisterResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchRegisterResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchRegisterResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - branchId_ = 0L; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BranchRegisterResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; - } - - @Override - public BranchRegisterResponseProto getDefaultInstanceForType() { - return BranchRegisterResponseProto.getDefaultInstance(); - } - - @Override - public BranchRegisterResponseProto build() { - BranchRegisterResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BranchRegisterResponseProto buildPartial() { - BranchRegisterResponseProto result = new BranchRegisterResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.branchId_ = branchId_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BranchRegisterResponseProto) { - return mergeFrom((BranchRegisterResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BranchRegisterResponseProto other) { - if (other == BranchRegisterResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - if (other.getBranchId() != 0L) { - setBranchId(other.getBranchId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BranchRegisterResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BranchRegisterResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private long branchId_ ; - /** - * int64 branchId = 2; - * @return The branchId. - */ - @Override - public long getBranchId() { - return branchId_; - } - /** - * int64 branchId = 2; - * @param value The branchId to set. - * @return This builder for chaining. - */ - public Builder setBranchId(long value) { - - branchId_ = value; - onChanged(); - return this; - } - /** - * int64 branchId = 2; - * @return This builder for chaining. - */ - public Builder clearBranchId() { - - branchId_ = 0L; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) - private static final BranchRegisterResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BranchRegisterResponseProto(); - } - - public static BranchRegisterResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BranchRegisterResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BranchRegisterResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BranchRegisterResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java deleted file mode 100644 index 111fded3ef6..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java +++ /dev/null @@ -1,30 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BranchRegisterResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchRegisterResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - boolean hasAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * int64 branchId = 2; - * @return The branchId. - */ - long getBranchId(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequest.java deleted file mode 100644 index e7d62bf132d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequest.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchReportRequest { - private BranchReportRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\031branchReportRequest.proto\022\"org.apache." + - "seata.protocol.protobuf\032\022branchStatus.pr" + - "oto\032\020branchType.proto\032 abstractTransacti" + - "onRequest.proto\"\337\002\n\030BranchReportRequestP" + - "roto\022g\n\032abstractTransactionRequest\030\001 \001(\013" + - "2C.org.apache.seata.protocol.protobuf.Ab" + - "stractTransactionRequestProto\022\013\n\003xid\030\002 \001" + - "(\t\022\020\n\010branchId\030\003 \001(\003\022\022\n\nresourceId\030\004 \001(\t" + - "\022E\n\006status\030\005 \001(\01625.org.apache.seata.prot" + - "ocol.protobuf.BranchStatusProto\022\027\n\017appli" + - "cationData\030\006 \001(\t\022G\n\nbranchType\030\007 \001(\01623.o" + - "rg.apache.seata.protocol.protobuf.Branch" + - "TypeProtoBL\n3org.apache.seata.core.seria" + - "lizer.protobuf.generatedB\023BranchReportRe" + - "questP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - BranchStatus.getDescriptor(), - BranchType.getDescriptor(), - AbstractTransactionRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor, - new String[] { "AbstractTransactionRequest", "Xid", "BranchId", "ResourceId", "Status", "ApplicationData", "BranchType", }); - BranchStatus.getDescriptor(); - BranchType.getDescriptor(); - AbstractTransactionRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProto.java deleted file mode 100644 index b3cbf2cb449..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProto.java +++ /dev/null @@ -1,1280 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchReportRequestProto} - */ -public final class BranchReportRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchReportRequestProto) - BranchReportRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BranchReportRequestProto.newBuilder() to construct. - private BranchReportRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BranchReportRequestProto() { - xid_ = ""; - resourceId_ = ""; - status_ = 0; - applicationData_ = ""; - branchType_ = 0; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BranchReportRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BranchReportRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 24: { - - branchId_ = input.readInt64(); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - resourceId_ = s; - break; - } - case 40: { - int rawValue = input.readEnum(); - - status_ = rawValue; - break; - } - case 50: { - String s = input.readStringRequireUtf8(); - - applicationData_ = s; - break; - } - case 56: { - int rawValue = input.readEnum(); - - branchType_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchReportRequestProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - @Override - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - @Override - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - @Override - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile Object xid_; - /** - * string xid = 2; - * @return The xid. - */ - @Override - public String getXid() { - Object ref = xid_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - @Override - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BRANCHID_FIELD_NUMBER = 3; - private long branchId_; - /** - * int64 branchId = 3; - * @return The branchId. - */ - @Override - public long getBranchId() { - return branchId_; - } - - public static final int RESOURCEID_FIELD_NUMBER = 4; - private volatile Object resourceId_; - /** - * string resourceId = 4; - * @return The resourceId. - */ - @Override - public String getResourceId() { - Object ref = resourceId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } - } - /** - * string resourceId = 4; - * @return The bytes for resourceId. - */ - @Override - public com.google.protobuf.ByteString - getResourceIdBytes() { - Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_FIELD_NUMBER = 5; - private int status_; - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @return The enum numeric value on the wire for status. - */ - @Override public int getStatusValue() { - return status_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @return The status. - */ - @Override public BranchStatusProto getStatus() { - @SuppressWarnings("deprecation") - BranchStatusProto result = BranchStatusProto.valueOf(status_); - return result == null ? BranchStatusProto.UNRECOGNIZED : result; - } - - public static final int APPLICATIONDATA_FIELD_NUMBER = 6; - private volatile Object applicationData_; - /** - * string applicationData = 6; - * @return The applicationData. - */ - @Override - public String getApplicationData() { - Object ref = applicationData_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } - } - /** - * string applicationData = 6; - * @return The bytes for applicationData. - */ - @Override - public com.google.protobuf.ByteString - getApplicationDataBytes() { - Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BRANCHTYPE_FIELD_NUMBER = 7; - private int branchType_; - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @return The enum numeric value on the wire for branchType. - */ - @Override public int getBranchTypeValue() { - return branchType_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @return The branchType. - */ - @Override public BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - BranchTypeProto result = BranchTypeProto.valueOf(branchType_); - return result == null ? BranchTypeProto.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (branchId_ != 0L) { - output.writeInt64(3, branchId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceId_); - } - if (status_ != BranchStatusProto.BUnknown.getNumber()) { - output.writeEnum(5, status_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); - } - if (branchType_ != BranchTypeProto.AT.getNumber()) { - output.writeEnum(7, branchType_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (branchId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, branchId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceId_); - } - if (status_ != BranchStatusProto.BUnknown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, status_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); - } - if (branchType_ != BranchTypeProto.AT.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, branchType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BranchReportRequestProto)) { - return super.equals(obj); - } - BranchReportRequestProto other = (BranchReportRequestProto) obj; - - if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; - if (hasAbstractTransactionRequest()) { - if (!getAbstractTransactionRequest() - .equals(other.getAbstractTransactionRequest())) return false; - } - if (!getXid() - .equals(other.getXid())) return false; - if (getBranchId() - != other.getBranchId()) return false; - if (!getResourceId() - .equals(other.getResourceId())) return false; - if (status_ != other.status_) return false; - if (!getApplicationData() - .equals(other.getApplicationData())) return false; - if (branchType_ != other.branchType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionRequest()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); - } - hash = (37 * hash) + XID_FIELD_NUMBER; - hash = (53 * hash) + getXid().hashCode(); - hash = (37 * hash) + BRANCHID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBranchId()); - hash = (37 * hash) + RESOURCEID_FIELD_NUMBER; - hash = (53 * hash) + getResourceId().hashCode(); - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + status_; - hash = (37 * hash) + APPLICATIONDATA_FIELD_NUMBER; - hash = (53 * hash) + getApplicationData().hashCode(); - hash = (37 * hash) + BRANCHTYPE_FIELD_NUMBER; - hash = (53 * hash) + branchType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BranchReportRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchReportRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchReportRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchReportRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchReportRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchReportRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchReportRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchReportRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BranchReportRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BranchReportRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BranchReportRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchReportRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BranchReportRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchReportRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchReportRequestProto) - BranchReportRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchReportRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchReportRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - xid_ = ""; - - branchId_ = 0L; - - resourceId_ = ""; - - status_ = 0; - - applicationData_ = ""; - - branchType_ = 0; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BranchReportRequest.internal_static_org_apache_seata_protocol_protobuf_BranchReportRequestProto_descriptor; - } - - @Override - public BranchReportRequestProto getDefaultInstanceForType() { - return BranchReportRequestProto.getDefaultInstance(); - } - - @Override - public BranchReportRequestProto build() { - BranchReportRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BranchReportRequestProto buildPartial() { - BranchReportRequestProto result = new BranchReportRequestProto(this); - if (abstractTransactionRequestBuilder_ == null) { - result.abstractTransactionRequest_ = abstractTransactionRequest_; - } else { - result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); - } - result.xid_ = xid_; - result.branchId_ = branchId_; - result.resourceId_ = resourceId_; - result.status_ = status_; - result.applicationData_ = applicationData_; - result.branchType_ = branchType_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BranchReportRequestProto) { - return mergeFrom((BranchReportRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BranchReportRequestProto other) { - if (other == BranchReportRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionRequest()) { - mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); - } - if (!other.getXid().isEmpty()) { - xid_ = other.xid_; - onChanged(); - } - if (other.getBranchId() != 0L) { - setBranchId(other.getBranchId()); - } - if (!other.getResourceId().isEmpty()) { - resourceId_ = other.resourceId_; - onChanged(); - } - if (other.status_ != 0) { - setStatusValue(other.getStatusValue()); - } - if (!other.getApplicationData().isEmpty()) { - applicationData_ = other.applicationData_; - onChanged(); - } - if (other.branchType_ != 0) { - setBranchTypeValue(other.getBranchTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BranchReportRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BranchReportRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private Object xid_ = ""; - /** - * string xid = 2; - * @return The xid. - */ - public String getXid() { - Object ref = xid_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - * @param value The xid to set. - * @return This builder for chaining. - */ - public Builder setXid( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - * @return This builder for chaining. - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - * @param value The bytes for xid to set. - * @return This builder for chaining. - */ - public Builder setXidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - xid_ = value; - onChanged(); - return this; - } - - private long branchId_ ; - /** - * int64 branchId = 3; - * @return The branchId. - */ - @Override - public long getBranchId() { - return branchId_; - } - /** - * int64 branchId = 3; - * @param value The branchId to set. - * @return This builder for chaining. - */ - public Builder setBranchId(long value) { - - branchId_ = value; - onChanged(); - return this; - } - /** - * int64 branchId = 3; - * @return This builder for chaining. - */ - public Builder clearBranchId() { - - branchId_ = 0L; - onChanged(); - return this; - } - - private Object resourceId_ = ""; - /** - * string resourceId = 4; - * @return The resourceId. - */ - public String getResourceId() { - Object ref = resourceId_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string resourceId = 4; - * @return The bytes for resourceId. - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resourceId = 4; - * @param value The resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceId( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceId_ = value; - onChanged(); - return this; - } - /** - * string resourceId = 4; - * @return This builder for chaining. - */ - public Builder clearResourceId() { - - resourceId_ = getDefaultInstance().getResourceId(); - onChanged(); - return this; - } - /** - * string resourceId = 4; - * @param value The bytes for resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceId_ = value; - onChanged(); - return this; - } - - private int status_ = 0; - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @return The enum numeric value on the wire for status. - */ - @Override public int getStatusValue() { - return status_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @param value The enum numeric value on the wire for status to set. - * @return This builder for chaining. - */ - public Builder setStatusValue(int value) { - - status_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @return The status. - */ - @Override - public BranchStatusProto getStatus() { - @SuppressWarnings("deprecation") - BranchStatusProto result = BranchStatusProto.valueOf(status_); - return result == null ? BranchStatusProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @param value The status to set. - * @return This builder for chaining. - */ - public Builder setStatus(BranchStatusProto value) { - if (value == null) { - throw new NullPointerException(); - } - - status_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @return This builder for chaining. - */ - public Builder clearStatus() { - - status_ = 0; - onChanged(); - return this; - } - - private Object applicationData_ = ""; - /** - * string applicationData = 6; - * @return The applicationData. - */ - public String getApplicationData() { - Object ref = applicationData_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string applicationData = 6; - * @return The bytes for applicationData. - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string applicationData = 6; - * @param value The applicationData to set. - * @return This builder for chaining. - */ - public Builder setApplicationData( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationData_ = value; - onChanged(); - return this; - } - /** - * string applicationData = 6; - * @return This builder for chaining. - */ - public Builder clearApplicationData() { - - applicationData_ = getDefaultInstance().getApplicationData(); - onChanged(); - return this; - } - /** - * string applicationData = 6; - * @param value The bytes for applicationData to set. - * @return This builder for chaining. - */ - public Builder setApplicationDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - applicationData_ = value; - onChanged(); - return this; - } - - private int branchType_ = 0; - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @return The enum numeric value on the wire for branchType. - */ - @Override public int getBranchTypeValue() { - return branchType_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @param value The enum numeric value on the wire for branchType to set. - * @return This builder for chaining. - */ - public Builder setBranchTypeValue(int value) { - - branchType_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @return The branchType. - */ - @Override - public BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - BranchTypeProto result = BranchTypeProto.valueOf(branchType_); - return result == null ? BranchTypeProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @param value The branchType to set. - * @return This builder for chaining. - */ - public Builder setBranchType(BranchTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @return This builder for chaining. - */ - public Builder clearBranchType() { - - branchType_ = 0; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchReportRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchReportRequestProto) - private static final BranchReportRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BranchReportRequestProto(); - } - - public static BranchReportRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BranchReportRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BranchReportRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BranchReportRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProtoOrBuilder.java deleted file mode 100644 index 9fda3b9c96b..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportRequestProtoOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BranchReportRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchReportRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - boolean hasAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * string xid = 2; - * @return The xid. - */ - String getXid(); - /** - * string xid = 2; - * @return The bytes for xid. - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * int64 branchId = 3; - * @return The branchId. - */ - long getBranchId(); - - /** - * string resourceId = 4; - * @return The resourceId. - */ - String getResourceId(); - /** - * string resourceId = 4; - * @return The bytes for resourceId. - */ - com.google.protobuf.ByteString - getResourceIdBytes(); - - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @return The enum numeric value on the wire for status. - */ - int getStatusValue(); - /** - * .org.apache.seata.protocol.protobuf.BranchStatusProto status = 5; - * @return The status. - */ - BranchStatusProto getStatus(); - - /** - * string applicationData = 6; - * @return The applicationData. - */ - String getApplicationData(); - /** - * string applicationData = 6; - * @return The bytes for applicationData. - */ - com.google.protobuf.ByteString - getApplicationDataBytes(); - - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @return The enum numeric value on the wire for branchType. - */ - int getBranchTypeValue(); - /** - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 7; - * @return The branchType. - */ - BranchTypeProto getBranchType(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponse.java deleted file mode 100644 index 27dd77c68d7..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchReportResponse { - private BranchReportResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\032branchReportResponse.proto\022\"org.apache" + - ".seata.protocol.protobuf\032!abstractTransa" + - "ctionResponse.proto\"\206\001\n\031BranchReportResp" + - "onseProto\022i\n\033abstractTransactionResponse" + - "\030\001 \001(\0132D.org.apache.seata.protocol.proto" + - "buf.AbstractTransactionResponseProtoBM\n3" + - "org.apache.seata.core.serializer.protobu" + - "f.generatedB\024BranchReportResponseP\001b\006pro" + - "to3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor, - new String[] { "AbstractTransactionResponse", }); - AbstractTransactionResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProto.java deleted file mode 100644 index b5497928cd1..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchReportResponseProto} - */ -public final class BranchReportResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchReportResponseProto) - BranchReportResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BranchReportResponseProto.newBuilder() to construct. - private BranchReportResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BranchReportResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BranchReportResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BranchReportResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionResponse_); - abstractTransactionResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchReportResponseProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - @Override - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - @Override - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - @Override - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BranchReportResponseProto)) { - return super.equals(obj); - } - BranchReportResponseProto other = (BranchReportResponseProto) obj; - - if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; - if (hasAbstractTransactionResponse()) { - if (!getAbstractTransactionResponse() - .equals(other.getAbstractTransactionResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionResponse()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BranchReportResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchReportResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchReportResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchReportResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchReportResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchReportResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchReportResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchReportResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BranchReportResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BranchReportResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BranchReportResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchReportResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BranchReportResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchReportResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchReportResponseProto) - BranchReportResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchReportResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchReportResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BranchReportResponse.internal_static_org_apache_seata_protocol_protobuf_BranchReportResponseProto_descriptor; - } - - @Override - public BranchReportResponseProto getDefaultInstanceForType() { - return BranchReportResponseProto.getDefaultInstance(); - } - - @Override - public BranchReportResponseProto build() { - BranchReportResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BranchReportResponseProto buildPartial() { - BranchReportResponseProto result = new BranchReportResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BranchReportResponseProto) { - return mergeFrom((BranchReportResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BranchReportResponseProto other) { - if (other == BranchReportResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BranchReportResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BranchReportResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchReportResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchReportResponseProto) - private static final BranchReportResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BranchReportResponseProto(); - } - - public static BranchReportResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BranchReportResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BranchReportResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BranchReportResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProtoOrBuilder.java deleted file mode 100644 index e42fe6a644d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchReportResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BranchReportResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchReportResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - boolean hasAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequest.java deleted file mode 100644 index c2ebeb339e4..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchRollbackRequest { - private BranchRollbackRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\033branchRollbackRequest.proto\022\"org.apach" + - "e.seata.protocol.protobuf\032\036abstractBranc" + - "hEndRequest.proto\"\201\001\n\032BranchRollbackRequ" + - "estProto\022c\n\030abstractBranchEndRequest\030\001 \001" + - "(\0132A.org.apache.seata.protocol.protobuf." + - "AbstractBranchEndRequestProtoBN\n3org.apa" + - "che.seata.core.serializer.protobuf.gener" + - "atedB\025BranchRollbackRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractBranchEndRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor, - new String[] { "AbstractBranchEndRequest", }); - AbstractBranchEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProto.java deleted file mode 100644 index d3110be20f4..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProto.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRollbackRequestProto} - */ -public final class BranchRollbackRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) - BranchRollbackRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BranchRollbackRequestProto.newBuilder() to construct. - private BranchRollbackRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BranchRollbackRequestProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BranchRollbackRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BranchRollbackRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractBranchEndRequestProto.Builder subBuilder = null; - if (abstractBranchEndRequest_ != null) { - subBuilder = abstractBranchEndRequest_.toBuilder(); - } - abstractBranchEndRequest_ = input.readMessage(AbstractBranchEndRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractBranchEndRequest_); - abstractBranchEndRequest_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchRollbackRequestProto.class, Builder.class); - } - - public static final int ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER = 1; - private AbstractBranchEndRequestProto abstractBranchEndRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return Whether the abstractBranchEndRequest field is set. - */ - @Override - public boolean hasAbstractBranchEndRequest() { - return abstractBranchEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return The abstractBranchEndRequest. - */ - @Override - public AbstractBranchEndRequestProto getAbstractBranchEndRequest() { - return abstractBranchEndRequest_ == null ? AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - @Override - public AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { - return getAbstractBranchEndRequest(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractBranchEndRequest_ != null) { - output.writeMessage(1, getAbstractBranchEndRequest()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractBranchEndRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractBranchEndRequest()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BranchRollbackRequestProto)) { - return super.equals(obj); - } - BranchRollbackRequestProto other = (BranchRollbackRequestProto) obj; - - if (hasAbstractBranchEndRequest() != other.hasAbstractBranchEndRequest()) return false; - if (hasAbstractBranchEndRequest()) { - if (!getAbstractBranchEndRequest() - .equals(other.getAbstractBranchEndRequest())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractBranchEndRequest()) { - hash = (37 * hash) + ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractBranchEndRequest().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BranchRollbackRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRollbackRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRollbackRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRollbackRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRollbackRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRollbackRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRollbackRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchRollbackRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BranchRollbackRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BranchRollbackRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BranchRollbackRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchRollbackRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BranchRollbackRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRollbackRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) - BranchRollbackRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchRollbackRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchRollbackRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = null; - } else { - abstractBranchEndRequest_ = null; - abstractBranchEndRequestBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BranchRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; - } - - @Override - public BranchRollbackRequestProto getDefaultInstanceForType() { - return BranchRollbackRequestProto.getDefaultInstance(); - } - - @Override - public BranchRollbackRequestProto build() { - BranchRollbackRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BranchRollbackRequestProto buildPartial() { - BranchRollbackRequestProto result = new BranchRollbackRequestProto(this); - if (abstractBranchEndRequestBuilder_ == null) { - result.abstractBranchEndRequest_ = abstractBranchEndRequest_; - } else { - result.abstractBranchEndRequest_ = abstractBranchEndRequestBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BranchRollbackRequestProto) { - return mergeFrom((BranchRollbackRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BranchRollbackRequestProto other) { - if (other == BranchRollbackRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractBranchEndRequest()) { - mergeAbstractBranchEndRequest(other.getAbstractBranchEndRequest()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BranchRollbackRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BranchRollbackRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractBranchEndRequestProto abstractBranchEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder> abstractBranchEndRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return Whether the abstractBranchEndRequest field is set. - */ - public boolean hasAbstractBranchEndRequest() { - return abstractBranchEndRequestBuilder_ != null || abstractBranchEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return The abstractBranchEndRequest. - */ - public AbstractBranchEndRequestProto getAbstractBranchEndRequest() { - if (abstractBranchEndRequestBuilder_ == null) { - return abstractBranchEndRequest_ == null ? AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } else { - return abstractBranchEndRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder setAbstractBranchEndRequest(AbstractBranchEndRequestProto value) { - if (abstractBranchEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractBranchEndRequest_ = value; - onChanged(); - } else { - abstractBranchEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder setAbstractBranchEndRequest( - AbstractBranchEndRequestProto.Builder builderForValue) { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractBranchEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder mergeAbstractBranchEndRequest(AbstractBranchEndRequestProto value) { - if (abstractBranchEndRequestBuilder_ == null) { - if (abstractBranchEndRequest_ != null) { - abstractBranchEndRequest_ = - AbstractBranchEndRequestProto.newBuilder(abstractBranchEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractBranchEndRequest_ = value; - } - onChanged(); - } else { - abstractBranchEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder clearAbstractBranchEndRequest() { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = null; - onChanged(); - } else { - abstractBranchEndRequest_ = null; - abstractBranchEndRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public AbstractBranchEndRequestProto.Builder getAbstractBranchEndRequestBuilder() { - - onChanged(); - return getAbstractBranchEndRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { - if (abstractBranchEndRequestBuilder_ != null) { - return abstractBranchEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractBranchEndRequest_ == null ? - AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder> - getAbstractBranchEndRequestFieldBuilder() { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndRequestProto, AbstractBranchEndRequestProto.Builder, AbstractBranchEndRequestProtoOrBuilder>( - getAbstractBranchEndRequest(), - getParentForChildren(), - isClean()); - abstractBranchEndRequest_ = null; - } - return abstractBranchEndRequestBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) - private static final BranchRollbackRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BranchRollbackRequestProto(); - } - - public static BranchRollbackRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BranchRollbackRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BranchRollbackRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BranchRollbackRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java deleted file mode 100644 index 7952b09c47a..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BranchRollbackRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchRollbackRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return Whether the abstractBranchEndRequest field is set. - */ - boolean hasAbstractBranchEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - * @return The abstractBranchEndRequest. - */ - AbstractBranchEndRequestProto getAbstractBranchEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponse.java deleted file mode 100644 index 41c75b397e1..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchRollbackResponse { - private BranchRollbackResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\034branchRollbackResponse.proto\022\"org.apac" + - "he.seata.protocol.protobuf\032\037abstractBran" + - "chEndResponse.proto\"\204\001\n\033BranchRollbackRe" + - "sponseProto\022e\n\031abstractBranchEndResponse" + - "\030\001 \001(\0132B.org.apache.seata.protocol.proto" + - "buf.AbstractBranchEndResponseProtoBO\n3or" + - "g.apache.seata.core.serializer.protobuf." + - "generatedB\026BranchRollbackResponseP\001b\006pro" + - "to3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractBranchEndResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor, - new String[] { "AbstractBranchEndResponse", }); - AbstractBranchEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProto.java deleted file mode 100644 index 7bc7a44aa33..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProto.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRollbackResponseProto} - */ -public final class BranchRollbackResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) - BranchRollbackResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use BranchRollbackResponseProto.newBuilder() to construct. - private BranchRollbackResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BranchRollbackResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new BranchRollbackResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BranchRollbackResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractBranchEndResponseProto.Builder subBuilder = null; - if (abstractBranchEndResponse_ != null) { - subBuilder = abstractBranchEndResponse_.toBuilder(); - } - abstractBranchEndResponse_ = input.readMessage(AbstractBranchEndResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractBranchEndResponse_); - abstractBranchEndResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchRollbackResponseProto.class, Builder.class); - } - - public static final int ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER = 1; - private AbstractBranchEndResponseProto abstractBranchEndResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return Whether the abstractBranchEndResponse field is set. - */ - @Override - public boolean hasAbstractBranchEndResponse() { - return abstractBranchEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return The abstractBranchEndResponse. - */ - @Override - public AbstractBranchEndResponseProto getAbstractBranchEndResponse() { - return abstractBranchEndResponse_ == null ? AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - @Override - public AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { - return getAbstractBranchEndResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractBranchEndResponse_ != null) { - output.writeMessage(1, getAbstractBranchEndResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractBranchEndResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractBranchEndResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof BranchRollbackResponseProto)) { - return super.equals(obj); - } - BranchRollbackResponseProto other = (BranchRollbackResponseProto) obj; - - if (hasAbstractBranchEndResponse() != other.hasAbstractBranchEndResponse()) return false; - if (hasAbstractBranchEndResponse()) { - if (!getAbstractBranchEndResponse() - .equals(other.getAbstractBranchEndResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractBranchEndResponse()) { - hash = (37 * hash) + ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractBranchEndResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static BranchRollbackResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRollbackResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRollbackResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRollbackResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRollbackResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static BranchRollbackResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static BranchRollbackResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchRollbackResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static BranchRollbackResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static BranchRollbackResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static BranchRollbackResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static BranchRollbackResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(BranchRollbackResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.BranchRollbackResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) - BranchRollbackResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - BranchRollbackResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.BranchRollbackResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = null; - } else { - abstractBranchEndResponse_ = null; - abstractBranchEndResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return BranchRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; - } - - @Override - public BranchRollbackResponseProto getDefaultInstanceForType() { - return BranchRollbackResponseProto.getDefaultInstance(); - } - - @Override - public BranchRollbackResponseProto build() { - BranchRollbackResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public BranchRollbackResponseProto buildPartial() { - BranchRollbackResponseProto result = new BranchRollbackResponseProto(this); - if (abstractBranchEndResponseBuilder_ == null) { - result.abstractBranchEndResponse_ = abstractBranchEndResponse_; - } else { - result.abstractBranchEndResponse_ = abstractBranchEndResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof BranchRollbackResponseProto) { - return mergeFrom((BranchRollbackResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(BranchRollbackResponseProto other) { - if (other == BranchRollbackResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractBranchEndResponse()) { - mergeAbstractBranchEndResponse(other.getAbstractBranchEndResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - BranchRollbackResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (BranchRollbackResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractBranchEndResponseProto abstractBranchEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder> abstractBranchEndResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return Whether the abstractBranchEndResponse field is set. - */ - public boolean hasAbstractBranchEndResponse() { - return abstractBranchEndResponseBuilder_ != null || abstractBranchEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return The abstractBranchEndResponse. - */ - public AbstractBranchEndResponseProto getAbstractBranchEndResponse() { - if (abstractBranchEndResponseBuilder_ == null) { - return abstractBranchEndResponse_ == null ? AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } else { - return abstractBranchEndResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder setAbstractBranchEndResponse(AbstractBranchEndResponseProto value) { - if (abstractBranchEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractBranchEndResponse_ = value; - onChanged(); - } else { - abstractBranchEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder setAbstractBranchEndResponse( - AbstractBranchEndResponseProto.Builder builderForValue) { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractBranchEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder mergeAbstractBranchEndResponse(AbstractBranchEndResponseProto value) { - if (abstractBranchEndResponseBuilder_ == null) { - if (abstractBranchEndResponse_ != null) { - abstractBranchEndResponse_ = - AbstractBranchEndResponseProto.newBuilder(abstractBranchEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractBranchEndResponse_ = value; - } - onChanged(); - } else { - abstractBranchEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder clearAbstractBranchEndResponse() { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = null; - onChanged(); - } else { - abstractBranchEndResponse_ = null; - abstractBranchEndResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public AbstractBranchEndResponseProto.Builder getAbstractBranchEndResponseBuilder() { - - onChanged(); - return getAbstractBranchEndResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { - if (abstractBranchEndResponseBuilder_ != null) { - return abstractBranchEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractBranchEndResponse_ == null ? - AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder> - getAbstractBranchEndResponseFieldBuilder() { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractBranchEndResponseProto, AbstractBranchEndResponseProto.Builder, AbstractBranchEndResponseProtoOrBuilder>( - getAbstractBranchEndResponse(), - getParentForChildren(), - isClean()); - abstractBranchEndResponse_ = null; - } - return abstractBranchEndResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) - private static final BranchRollbackResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new BranchRollbackResponseProto(); - } - - public static BranchRollbackResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public BranchRollbackResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BranchRollbackResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public BranchRollbackResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java deleted file mode 100644 index 19db29f11db..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface BranchRollbackResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.BranchRollbackResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return Whether the abstractBranchEndResponse field is set. - */ - boolean hasAbstractBranchEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - * @return The abstractBranchEndResponse. - */ - AbstractBranchEndResponseProto getAbstractBranchEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatus.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatus.java deleted file mode 100644 index 969d68aa034..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatus.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchStatus.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchStatus { - private BranchStatus() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\022branchStatus.proto\022\"org.apache.seata.p" + - "rotocol.protobuf*\321\002\n\021BranchStatusProto\022\014" + - "\n\010BUnknown\020\000\022\016\n\nRegistered\020\001\022\021\n\rPhaseOne" + - "_Done\020\002\022\023\n\017PhaseOne_Failed\020\003\022\024\n\020PhaseOne" + - "_Timeout\020\004\022\026\n\022PhaseTwo_Committed\020\005\022#\n\037Ph" + - "aseTwo_CommitFailed_Retryable\020\006\022%\n!Phase" + - "Two_CommitFailed_Unretryable\020\007\022\027\n\023PhaseT" + - "wo_Rollbacked\020\010\022%\n!PhaseTwo_RollbackFail" + - "ed_Retryable\020\t\022\'\n#PhaseTwo_RollbackFaile" + - "d_Unretryable\020\n\022\023\n\017PhaseOne_RDONLY\020\rBE\n3" + - "org.apache.seata.core.serializer.protobu" + - "f.generatedB\014BranchStatusP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatusProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatusProto.java deleted file mode 100644 index 2ec4b0cfd4a..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchStatusProto.java +++ /dev/null @@ -1,303 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchStatus.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code org.apache.seata.protocol.protobuf.BranchStatusProto} - */ -public enum BranchStatusProto - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * special for Unknown
-   * 
- * - * BUnknown = 0; - */ - BUnknown(0), - /** - *
-   * Registered to TC.
-   * 
- * - * Registered = 1; - */ - Registered(1), - /** - *
-   * Branch logic is successfully done at phase one.
-   * 
- * - * PhaseOne_Done = 2; - */ - PhaseOne_Done(2), - /** - *
-   * Branch logic is failed at phase one.
-   * 
- * - * PhaseOne_Failed = 3; - */ - PhaseOne_Failed(3), - /** - *
-   * Branch logic is NOT reported for a timeout.
-   * 
- * - * PhaseOne_Timeout = 4; - */ - PhaseOne_Timeout(4), - /** - *
-   * Commit logic is successfully done at phase two.
-   * 
- * - * PhaseTwo_Committed = 5; - */ - PhaseTwo_Committed(5), - /** - *
-   * Commit logic is failed but retryable.
-   * 
- * - * PhaseTwo_CommitFailed_Retryable = 6; - */ - PhaseTwo_CommitFailed_Retryable(6), - /** - *
-   * Commit logic is failed and NOT retryable.
-   * 
- * - * PhaseTwo_CommitFailed_Unretryable = 7; - */ - PhaseTwo_CommitFailed_Unretryable(7), - /** - *
-   * Rollback logic is successfully done at phase two.
-   * 
- * - * PhaseTwo_Rollbacked = 8; - */ - PhaseTwo_Rollbacked(8), - /** - *
-   * Rollback logic is failed but retryable.
-   * 
- * - * PhaseTwo_RollbackFailed_Retryable = 9; - */ - PhaseTwo_RollbackFailed_Retryable(9), - /** - *
-   * Rollback logic is failed but NOT retryable.
-   * 
- * - * PhaseTwo_RollbackFailed_Unretryable = 10; - */ - PhaseTwo_RollbackFailed_Unretryable(10), - /** - *
-   * In the branch transaction, only purely read-only query statements were executed.
-   * 
- * - * PhaseOne_RDONLY = 13; - */ - PhaseOne_RDONLY(13), - UNRECOGNIZED(-1), - ; - - /** - *
-   * special for Unknown
-   * 
- * - * BUnknown = 0; - */ - public static final int BUnknown_VALUE = 0; - /** - *
-   * Registered to TC.
-   * 
- * - * Registered = 1; - */ - public static final int Registered_VALUE = 1; - /** - *
-   * Branch logic is successfully done at phase one.
-   * 
- * - * PhaseOne_Done = 2; - */ - public static final int PhaseOne_Done_VALUE = 2; - /** - *
-   * Branch logic is failed at phase one.
-   * 
- * - * PhaseOne_Failed = 3; - */ - public static final int PhaseOne_Failed_VALUE = 3; - /** - *
-   * Branch logic is NOT reported for a timeout.
-   * 
- * - * PhaseOne_Timeout = 4; - */ - public static final int PhaseOne_Timeout_VALUE = 4; - /** - *
-   * Commit logic is successfully done at phase two.
-   * 
- * - * PhaseTwo_Committed = 5; - */ - public static final int PhaseTwo_Committed_VALUE = 5; - /** - *
-   * Commit logic is failed but retryable.
-   * 
- * - * PhaseTwo_CommitFailed_Retryable = 6; - */ - public static final int PhaseTwo_CommitFailed_Retryable_VALUE = 6; - /** - *
-   * Commit logic is failed and NOT retryable.
-   * 
- * - * PhaseTwo_CommitFailed_Unretryable = 7; - */ - public static final int PhaseTwo_CommitFailed_Unretryable_VALUE = 7; - /** - *
-   * Rollback logic is successfully done at phase two.
-   * 
- * - * PhaseTwo_Rollbacked = 8; - */ - public static final int PhaseTwo_Rollbacked_VALUE = 8; - /** - *
-   * Rollback logic is failed but retryable.
-   * 
- * - * PhaseTwo_RollbackFailed_Retryable = 9; - */ - public static final int PhaseTwo_RollbackFailed_Retryable_VALUE = 9; - /** - *
-   * Rollback logic is failed but NOT retryable.
-   * 
- * - * PhaseTwo_RollbackFailed_Unretryable = 10; - */ - public static final int PhaseTwo_RollbackFailed_Unretryable_VALUE = 10; - /** - *
-   * In the branch transaction, only purely read-only query statements were executed.
-   * 
- * - * PhaseOne_RDONLY = 13; - */ - public static final int PhaseOne_RDONLY_VALUE = 13; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @Deprecated - public static BranchStatusProto valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BranchStatusProto forNumber(int value) { - switch (value) { - case 0: return BUnknown; - case 1: return Registered; - case 2: return PhaseOne_Done; - case 3: return PhaseOne_Failed; - case 4: return PhaseOne_Timeout; - case 5: return PhaseTwo_Committed; - case 6: return PhaseTwo_CommitFailed_Retryable; - case 7: return PhaseTwo_CommitFailed_Unretryable; - case 8: return PhaseTwo_Rollbacked; - case 9: return PhaseTwo_RollbackFailed_Retryable; - case 10: return PhaseTwo_RollbackFailed_Unretryable; - case 13: return PhaseOne_RDONLY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BranchStatusProto> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BranchStatusProto findValueByNumber(int number) { - return BranchStatusProto.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return BranchStatus.getDescriptor().getEnumTypes().get(0); - } - - private static final BranchStatusProto[] VALUES = values(); - - public static BranchStatusProto valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BranchStatusProto(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.BranchStatusProto) -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchType.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchType.java deleted file mode 100644 index eabd7a0ecce..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchType.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchType.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class BranchType { - private BranchType() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\020branchType.proto\022\"org.apache.seata.pro" + - "tocol.protobuf*,\n\017BranchTypeProto\022\006\n\002AT\020" + - "\000\022\007\n\003TCC\020\001\022\010\n\004SAGA\020\002BC\n3org.apache.seata" + - ".core.serializer.protobuf.generatedB\nBra" + - "nchTypeP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchTypeProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchTypeProto.java deleted file mode 100644 index 4e99c226109..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/BranchTypeProto.java +++ /dev/null @@ -1,126 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchType.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code org.apache.seata.protocol.protobuf.BranchTypeProto} - */ -public enum BranchTypeProto - implements com.google.protobuf.ProtocolMessageEnum { - /** - * AT = 0; - */ - AT(0), - /** - * TCC = 1; - */ - TCC(1), - /** - * SAGA = 2; - */ - SAGA(2), - UNRECOGNIZED(-1), - ; - - /** - * AT = 0; - */ - public static final int AT_VALUE = 0; - /** - * TCC = 1; - */ - public static final int TCC_VALUE = 1; - /** - * SAGA = 2; - */ - public static final int SAGA_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @Deprecated - public static BranchTypeProto valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BranchTypeProto forNumber(int value) { - switch (value) { - case 0: return AT; - case 1: return TCC; - case 2: return SAGA; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BranchTypeProto> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BranchTypeProto findValueByNumber(int number) { - return BranchTypeProto.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return BranchType.getDescriptor().getEnumTypes().get(0); - } - - private static final BranchTypeProto[] VALUES = values(); - - public static BranchTypeProto valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BranchTypeProto(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.BranchTypeProto) -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequest.java deleted file mode 100644 index 50d7bb2a8ef..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequest.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalBeginRequest { - private GlobalBeginRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\030globalBeginRequest.proto\022\"org.apache.s" + - "eata.protocol.protobuf\032 abstractTransact" + - "ionRequest.proto\"\254\001\n\027GlobalBeginRequestP" + - "roto\022g\n\032abstractTransactionRequest\030\001 \001(\013" + - "2C.org.apache.seata.protocol.protobuf.Ab" + - "stractTransactionRequestProto\022\017\n\007timeout" + - "\030\002 \001(\005\022\027\n\017transactionName\030\003 \001(\tBK\n3org.a" + - "pache.seata.core.serializer.protobuf.gen" + - "eratedB\022GlobalBeginRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor, - new String[] { "AbstractTransactionRequest", "Timeout", "TransactionName", }); - AbstractTransactionRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProto.java deleted file mode 100644 index 6b2b7eb012c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProto.java +++ /dev/null @@ -1,811 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalBeginRequestProto} - */ -public final class GlobalBeginRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) - GlobalBeginRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalBeginRequestProto.newBuilder() to construct. - private GlobalBeginRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalBeginRequestProto() { - transactionName_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalBeginRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalBeginRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - timeout_ = input.readInt32(); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - transactionName_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalBeginRequestProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - @Override - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - @Override - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - @Override - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int TIMEOUT_FIELD_NUMBER = 2; - private int timeout_; - /** - * int32 timeout = 2; - * @return The timeout. - */ - @Override - public int getTimeout() { - return timeout_; - } - - public static final int TRANSACTIONNAME_FIELD_NUMBER = 3; - private volatile Object transactionName_; - /** - * string transactionName = 3; - * @return The transactionName. - */ - @Override - public String getTransactionName() { - Object ref = transactionName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - transactionName_ = s; - return s; - } - } - /** - * string transactionName = 3; - * @return The bytes for transactionName. - */ - @Override - public com.google.protobuf.ByteString - getTransactionNameBytes() { - Object ref = transactionName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - transactionName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (timeout_ != 0) { - output.writeInt32(2, timeout_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, transactionName_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionRequest()); - } - if (timeout_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, timeout_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, transactionName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalBeginRequestProto)) { - return super.equals(obj); - } - GlobalBeginRequestProto other = (GlobalBeginRequestProto) obj; - - if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; - if (hasAbstractTransactionRequest()) { - if (!getAbstractTransactionRequest() - .equals(other.getAbstractTransactionRequest())) return false; - } - if (getTimeout() - != other.getTimeout()) return false; - if (!getTransactionName() - .equals(other.getTransactionName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionRequest()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); - } - hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getTimeout(); - hash = (37 * hash) + TRANSACTIONNAME_FIELD_NUMBER; - hash = (53 * hash) + getTransactionName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalBeginRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalBeginRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalBeginRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalBeginRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalBeginRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalBeginRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalBeginRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalBeginRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalBeginRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalBeginRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalBeginRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalBeginRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalBeginRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalBeginRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) - GlobalBeginRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalBeginRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalBeginRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - timeout_ = 0; - - transactionName_ = ""; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalBeginRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; - } - - @Override - public GlobalBeginRequestProto getDefaultInstanceForType() { - return GlobalBeginRequestProto.getDefaultInstance(); - } - - @Override - public GlobalBeginRequestProto build() { - GlobalBeginRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalBeginRequestProto buildPartial() { - GlobalBeginRequestProto result = new GlobalBeginRequestProto(this); - if (abstractTransactionRequestBuilder_ == null) { - result.abstractTransactionRequest_ = abstractTransactionRequest_; - } else { - result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); - } - result.timeout_ = timeout_; - result.transactionName_ = transactionName_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalBeginRequestProto) { - return mergeFrom((GlobalBeginRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalBeginRequestProto other) { - if (other == GlobalBeginRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionRequest()) { - mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); - } - if (other.getTimeout() != 0) { - setTimeout(other.getTimeout()); - } - if (!other.getTransactionName().isEmpty()) { - transactionName_ = other.transactionName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalBeginRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalBeginRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private int timeout_ ; - /** - * int32 timeout = 2; - * @return The timeout. - */ - @Override - public int getTimeout() { - return timeout_; - } - /** - * int32 timeout = 2; - * @param value The timeout to set. - * @return This builder for chaining. - */ - public Builder setTimeout(int value) { - - timeout_ = value; - onChanged(); - return this; - } - /** - * int32 timeout = 2; - * @return This builder for chaining. - */ - public Builder clearTimeout() { - - timeout_ = 0; - onChanged(); - return this; - } - - private Object transactionName_ = ""; - /** - * string transactionName = 3; - * @return The transactionName. - */ - public String getTransactionName() { - Object ref = transactionName_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - transactionName_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string transactionName = 3; - * @return The bytes for transactionName. - */ - public com.google.protobuf.ByteString - getTransactionNameBytes() { - Object ref = transactionName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - transactionName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string transactionName = 3; - * @param value The transactionName to set. - * @return This builder for chaining. - */ - public Builder setTransactionName( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - transactionName_ = value; - onChanged(); - return this; - } - /** - * string transactionName = 3; - * @return This builder for chaining. - */ - public Builder clearTransactionName() { - - transactionName_ = getDefaultInstance().getTransactionName(); - onChanged(); - return this; - } - /** - * string transactionName = 3; - * @param value The bytes for transactionName to set. - * @return This builder for chaining. - */ - public Builder setTransactionNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transactionName_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) - private static final GlobalBeginRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalBeginRequestProto(); - } - - public static GlobalBeginRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalBeginRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalBeginRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalBeginRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java deleted file mode 100644 index 9240645ddaf..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalBeginRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalBeginRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - boolean hasAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * int32 timeout = 2; - * @return The timeout. - */ - int getTimeout(); - - /** - * string transactionName = 3; - * @return The transactionName. - */ - String getTransactionName(); - /** - * string transactionName = 3; - * @return The bytes for transactionName. - */ - com.google.protobuf.ByteString - getTransactionNameBytes(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponse.java deleted file mode 100644 index facef46920f..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalBeginResponse { - private GlobalBeginResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\031globalBeginResponse.proto\022\"org.apache." + - "seata.protocol.protobuf\032!abstractTransac" + - "tionResponse.proto\"\245\001\n\030GlobalBeginRespon" + - "seProto\022i\n\033abstractTransactionResponse\030\001" + - " \001(\0132D.org.apache.seata.protocol.protobu" + - "f.AbstractTransactionResponseProto\022\013\n\003xi" + - "d\030\002 \001(\t\022\021\n\textraData\030\003 \001(\tBL\n3org.apache" + - ".seata.core.serializer.protobuf.generate" + - "dB\023GlobalBeginResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor, - new String[] { "AbstractTransactionResponse", "Xid", "ExtraData", }); - AbstractTransactionResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProto.java deleted file mode 100644 index 2b137c596e2..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProto.java +++ /dev/null @@ -1,885 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalBeginResponseProto} - */ -public final class GlobalBeginResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) - GlobalBeginResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalBeginResponseProto.newBuilder() to construct. - private GlobalBeginResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalBeginResponseProto() { - xid_ = ""; - extraData_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalBeginResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalBeginResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionResponse_); - abstractTransactionResponse_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - extraData_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalBeginResponseProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - @Override - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - @Override - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - @Override - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile Object xid_; - /** - * string xid = 2; - * @return The xid. - */ - @Override - public String getXid() { - Object ref = xid_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - @Override - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTRADATA_FIELD_NUMBER = 3; - private volatile Object extraData_; - /** - * string extraData = 3; - * @return The extraData. - */ - @Override - public String getExtraData() { - Object ref = extraData_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } - } - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - @Override - public com.google.protobuf.ByteString - getExtraDataBytes() { - Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionResponse()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(xid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extraData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extraData_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalBeginResponseProto)) { - return super.equals(obj); - } - GlobalBeginResponseProto other = (GlobalBeginResponseProto) obj; - - if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; - if (hasAbstractTransactionResponse()) { - if (!getAbstractTransactionResponse() - .equals(other.getAbstractTransactionResponse())) return false; - } - if (!getXid() - .equals(other.getXid())) return false; - if (!getExtraData() - .equals(other.getExtraData())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionResponse()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); - } - hash = (37 * hash) + XID_FIELD_NUMBER; - hash = (53 * hash) + getXid().hashCode(); - hash = (37 * hash) + EXTRADATA_FIELD_NUMBER; - hash = (53 * hash) + getExtraData().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalBeginResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalBeginResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalBeginResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalBeginResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalBeginResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalBeginResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalBeginResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalBeginResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalBeginResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalBeginResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalBeginResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalBeginResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalBeginResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalBeginResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) - GlobalBeginResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalBeginResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalBeginResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - xid_ = ""; - - extraData_ = ""; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalBeginResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; - } - - @Override - public GlobalBeginResponseProto getDefaultInstanceForType() { - return GlobalBeginResponseProto.getDefaultInstance(); - } - - @Override - public GlobalBeginResponseProto build() { - GlobalBeginResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalBeginResponseProto buildPartial() { - GlobalBeginResponseProto result = new GlobalBeginResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.xid_ = xid_; - result.extraData_ = extraData_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalBeginResponseProto) { - return mergeFrom((GlobalBeginResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalBeginResponseProto other) { - if (other == GlobalBeginResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - if (!other.getXid().isEmpty()) { - xid_ = other.xid_; - onChanged(); - } - if (!other.getExtraData().isEmpty()) { - extraData_ = other.extraData_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalBeginResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalBeginResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private Object xid_ = ""; - /** - * string xid = 2; - * @return The xid. - */ - public String getXid() { - Object ref = xid_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string xid = 2; - * @return The bytes for xid. - */ - public com.google.protobuf.ByteString - getXidBytes() { - Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - * @param value The xid to set. - * @return This builder for chaining. - */ - public Builder setXid( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - * @return This builder for chaining. - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - * @param value The bytes for xid to set. - * @return This builder for chaining. - */ - public Builder setXidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - xid_ = value; - onChanged(); - return this; - } - - private Object extraData_ = ""; - /** - * string extraData = 3; - * @return The extraData. - */ - public String getExtraData() { - Object ref = extraData_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string extraData = 3; - * @param value The extraData to set. - * @return This builder for chaining. - */ - public Builder setExtraData( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - extraData_ = value; - onChanged(); - return this; - } - /** - * string extraData = 3; - * @return This builder for chaining. - */ - public Builder clearExtraData() { - - extraData_ = getDefaultInstance().getExtraData(); - onChanged(); - return this; - } - /** - * string extraData = 3; - * @param value The bytes for extraData to set. - * @return This builder for chaining. - */ - public Builder setExtraDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - extraData_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) - private static final GlobalBeginResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalBeginResponseProto(); - } - - public static GlobalBeginResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalBeginResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalBeginResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalBeginResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java deleted file mode 100644 index 74521b4b36d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalBeginResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalBeginResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - boolean hasAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * string xid = 2; - * @return The xid. - */ - String getXid(); - /** - * string xid = 2; - * @return The bytes for xid. - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * string extraData = 3; - * @return The extraData. - */ - String getExtraData(); - /** - * string extraData = 3; - * @return The bytes for extraData. - */ - com.google.protobuf.ByteString - getExtraDataBytes(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequest.java deleted file mode 100644 index c8612cc26b8..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalCommitRequest { - private GlobalCommitRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\031globalCommitRequest.proto\022\"org.apache." + - "seata.protocol.protobuf\032\036abstractGlobalE" + - "ndRequest.proto\"\177\n\030GlobalCommitRequestPr" + - "oto\022c\n\030abstractGlobalEndRequest\030\001 \001(\0132A." + - "org.apache.seata.protocol.protobuf.Abstr" + - "actGlobalEndRequestProtoBL\n3org.apache.s" + - "eata.core.serializer.protobuf.generatedB" + - "\023GlobalCommitRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractGlobalEndRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor, - new String[] { "AbstractGlobalEndRequest", }); - AbstractGlobalEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProto.java deleted file mode 100644 index 846212cb936..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalCommitRequestProto} - */ -public final class GlobalCommitRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) - GlobalCommitRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalCommitRequestProto.newBuilder() to construct. - private GlobalCommitRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalCommitRequestProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalCommitRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalCommitRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractGlobalEndRequestProto.Builder subBuilder = null; - if (abstractGlobalEndRequest_ != null) { - subBuilder = abstractGlobalEndRequest_.toBuilder(); - } - abstractGlobalEndRequest_ = input.readMessage(AbstractGlobalEndRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractGlobalEndRequest_); - abstractGlobalEndRequest_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalCommitRequestProto.class, Builder.class); - } - - public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; - private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - @Override - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - @Override - public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - @Override - public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - return getAbstractGlobalEndRequest(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractGlobalEndRequest_ != null) { - output.writeMessage(1, getAbstractGlobalEndRequest()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractGlobalEndRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractGlobalEndRequest()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalCommitRequestProto)) { - return super.equals(obj); - } - GlobalCommitRequestProto other = (GlobalCommitRequestProto) obj; - - if (hasAbstractGlobalEndRequest() != other.hasAbstractGlobalEndRequest()) return false; - if (hasAbstractGlobalEndRequest()) { - if (!getAbstractGlobalEndRequest() - .equals(other.getAbstractGlobalEndRequest())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractGlobalEndRequest()) { - hash = (37 * hash) + ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractGlobalEndRequest().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalCommitRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalCommitRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalCommitRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalCommitRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalCommitRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalCommitRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalCommitRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalCommitRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalCommitRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalCommitRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalCommitRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalCommitRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalCommitRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalCommitRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) - GlobalCommitRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalCommitRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalCommitRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalCommitRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; - } - - @Override - public GlobalCommitRequestProto getDefaultInstanceForType() { - return GlobalCommitRequestProto.getDefaultInstance(); - } - - @Override - public GlobalCommitRequestProto build() { - GlobalCommitRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalCommitRequestProto buildPartial() { - GlobalCommitRequestProto result = new GlobalCommitRequestProto(this); - if (abstractGlobalEndRequestBuilder_ == null) { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; - } else { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalCommitRequestProto) { - return mergeFrom((GlobalCommitRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalCommitRequestProto other) { - if (other == GlobalCommitRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndRequest()) { - mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalCommitRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalCommitRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } else { - return abstractGlobalEndRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndRequest_ = value; - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest( - AbstractGlobalEndRequestProto.Builder builderForValue) { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder mergeAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (abstractGlobalEndRequest_ != null) { - abstractGlobalEndRequest_ = - AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndRequest_ = value; - } - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder clearAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - onChanged(); - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { - - onChanged(); - return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - if (abstractGlobalEndRequestBuilder_ != null) { - return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndRequest_ == null ? - AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> - getAbstractGlobalEndRequestFieldBuilder() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder>( - getAbstractGlobalEndRequest(), - getParentForChildren(), - isClean()); - abstractGlobalEndRequest_ = null; - } - return abstractGlobalEndRequestBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) - private static final GlobalCommitRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalCommitRequestProto(); - } - - public static GlobalCommitRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalCommitRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalCommitRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalCommitRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java deleted file mode 100644 index b3ab81a7d75..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalCommitRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalCommitRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - boolean hasAbstractGlobalEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponse.java deleted file mode 100644 index 74d4c1afcc5..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalCommitResponse { - private GlobalCommitResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\032globalCommitResponse.proto\022\"org.apache" + - ".seata.protocol.protobuf\032\037abstractGlobal" + - "EndResponse.proto\"\202\001\n\031GlobalCommitRespon" + - "seProto\022e\n\031abstractGlobalEndResponse\030\001 \001" + - "(\0132B.org.apache.seata.protocol.protobuf." + - "AbstractGlobalEndResponseProtoBM\n3org.ap" + - "ache.seata.core.serializer.protobuf.gene" + - "ratedB\024GlobalCommitResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractGlobalEndResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor, - new String[] { "AbstractGlobalEndResponse", }); - AbstractGlobalEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProto.java deleted file mode 100644 index f587555dfac..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalCommitResponseProto} - */ -public final class GlobalCommitResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) - GlobalCommitResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalCommitResponseProto.newBuilder() to construct. - private GlobalCommitResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalCommitResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalCommitResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalCommitResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractGlobalEndResponseProto.Builder subBuilder = null; - if (abstractGlobalEndResponse_ != null) { - subBuilder = abstractGlobalEndResponse_.toBuilder(); - } - abstractGlobalEndResponse_ = input.readMessage(AbstractGlobalEndResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractGlobalEndResponse_); - abstractGlobalEndResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalCommitResponseProto.class, Builder.class); - } - - public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; - private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - @Override - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - @Override - public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - @Override - public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - return getAbstractGlobalEndResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractGlobalEndResponse_ != null) { - output.writeMessage(1, getAbstractGlobalEndResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractGlobalEndResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractGlobalEndResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalCommitResponseProto)) { - return super.equals(obj); - } - GlobalCommitResponseProto other = (GlobalCommitResponseProto) obj; - - if (hasAbstractGlobalEndResponse() != other.hasAbstractGlobalEndResponse()) return false; - if (hasAbstractGlobalEndResponse()) { - if (!getAbstractGlobalEndResponse() - .equals(other.getAbstractGlobalEndResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractGlobalEndResponse()) { - hash = (37 * hash) + ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractGlobalEndResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalCommitResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalCommitResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalCommitResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalCommitResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalCommitResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalCommitResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalCommitResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalCommitResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalCommitResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalCommitResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalCommitResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalCommitResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalCommitResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalCommitResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) - GlobalCommitResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalCommitResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalCommitResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalCommitResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; - } - - @Override - public GlobalCommitResponseProto getDefaultInstanceForType() { - return GlobalCommitResponseProto.getDefaultInstance(); - } - - @Override - public GlobalCommitResponseProto build() { - GlobalCommitResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalCommitResponseProto buildPartial() { - GlobalCommitResponseProto result = new GlobalCommitResponseProto(this); - if (abstractGlobalEndResponseBuilder_ == null) { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; - } else { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalCommitResponseProto) { - return mergeFrom((GlobalCommitResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalCommitResponseProto other) { - if (other == GlobalCommitResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndResponse()) { - mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalCommitResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalCommitResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } else { - return abstractGlobalEndResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndResponse_ = value; - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse( - AbstractGlobalEndResponseProto.Builder builderForValue) { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder mergeAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (abstractGlobalEndResponse_ != null) { - abstractGlobalEndResponse_ = - AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndResponse_ = value; - } - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder clearAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - onChanged(); - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { - - onChanged(); - return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - if (abstractGlobalEndResponseBuilder_ != null) { - return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndResponse_ == null ? - AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> - getAbstractGlobalEndResponseFieldBuilder() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder>( - getAbstractGlobalEndResponse(), - getParentForChildren(), - isClean()); - abstractGlobalEndResponse_ = null; - } - return abstractGlobalEndResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) - private static final GlobalCommitResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalCommitResponseProto(); - } - - public static GlobalCommitResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalCommitResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalCommitResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalCommitResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java deleted file mode 100644 index 218846d7657..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalCommitResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalCommitResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - boolean hasAbstractGlobalEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequest.java deleted file mode 100644 index ff72cd8429c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalLockQueryRequest { - private GlobalLockQueryRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\034globalLockQueryRequest.proto\022\"org.apac" + - "he.seata.protocol.protobuf\032\033branchRegist" + - "erRequest.proto\"|\n\033GlobalLockQueryReques" + - "tProto\022]\n\025branchRegisterRequest\030\001 \001(\0132>." + - "org.apache.seata.protocol.protobuf.Branc" + - "hRegisterRequestProtoBO\n3org.apache.seat" + - "a.core.serializer.protobuf.generatedB\026Gl" + - "obalLockQueryRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - BranchRegisterRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor, - new String[] { "BranchRegisterRequest", }); - BranchRegisterRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProto.java deleted file mode 100644 index 9469dfd18ce..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto} - */ -public final class GlobalLockQueryRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) - GlobalLockQueryRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalLockQueryRequestProto.newBuilder() to construct. - private GlobalLockQueryRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalLockQueryRequestProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalLockQueryRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalLockQueryRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - BranchRegisterRequestProto.Builder subBuilder = null; - if (branchRegisterRequest_ != null) { - subBuilder = branchRegisterRequest_.toBuilder(); - } - branchRegisterRequest_ = input.readMessage(BranchRegisterRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(branchRegisterRequest_); - branchRegisterRequest_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalLockQueryRequestProto.class, Builder.class); - } - - public static final int BRANCHREGISTERREQUEST_FIELD_NUMBER = 1; - private BranchRegisterRequestProto branchRegisterRequest_; - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - * @return Whether the branchRegisterRequest field is set. - */ - @Override - public boolean hasBranchRegisterRequest() { - return branchRegisterRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - * @return The branchRegisterRequest. - */ - @Override - public BranchRegisterRequestProto getBranchRegisterRequest() { - return branchRegisterRequest_ == null ? BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - @Override - public BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder() { - return getBranchRegisterRequest(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (branchRegisterRequest_ != null) { - output.writeMessage(1, getBranchRegisterRequest()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (branchRegisterRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBranchRegisterRequest()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalLockQueryRequestProto)) { - return super.equals(obj); - } - GlobalLockQueryRequestProto other = (GlobalLockQueryRequestProto) obj; - - if (hasBranchRegisterRequest() != other.hasBranchRegisterRequest()) return false; - if (hasBranchRegisterRequest()) { - if (!getBranchRegisterRequest() - .equals(other.getBranchRegisterRequest())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBranchRegisterRequest()) { - hash = (37 * hash) + BRANCHREGISTERREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getBranchRegisterRequest().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalLockQueryRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalLockQueryRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalLockQueryRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalLockQueryRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalLockQueryRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalLockQueryRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalLockQueryRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalLockQueryRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalLockQueryRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalLockQueryRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalLockQueryRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalLockQueryRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalLockQueryRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) - GlobalLockQueryRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalLockQueryRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (branchRegisterRequestBuilder_ == null) { - branchRegisterRequest_ = null; - } else { - branchRegisterRequest_ = null; - branchRegisterRequestBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalLockQueryRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; - } - - @Override - public GlobalLockQueryRequestProto getDefaultInstanceForType() { - return GlobalLockQueryRequestProto.getDefaultInstance(); - } - - @Override - public GlobalLockQueryRequestProto build() { - GlobalLockQueryRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalLockQueryRequestProto buildPartial() { - GlobalLockQueryRequestProto result = new GlobalLockQueryRequestProto(this); - if (branchRegisterRequestBuilder_ == null) { - result.branchRegisterRequest_ = branchRegisterRequest_; - } else { - result.branchRegisterRequest_ = branchRegisterRequestBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalLockQueryRequestProto) { - return mergeFrom((GlobalLockQueryRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalLockQueryRequestProto other) { - if (other == GlobalLockQueryRequestProto.getDefaultInstance()) return this; - if (other.hasBranchRegisterRequest()) { - mergeBranchRegisterRequest(other.getBranchRegisterRequest()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalLockQueryRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalLockQueryRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private BranchRegisterRequestProto branchRegisterRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - BranchRegisterRequestProto, BranchRegisterRequestProto.Builder, BranchRegisterRequestProtoOrBuilder> branchRegisterRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - * @return Whether the branchRegisterRequest field is set. - */ - public boolean hasBranchRegisterRequest() { - return branchRegisterRequestBuilder_ != null || branchRegisterRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - * @return The branchRegisterRequest. - */ - public BranchRegisterRequestProto getBranchRegisterRequest() { - if (branchRegisterRequestBuilder_ == null) { - return branchRegisterRequest_ == null ? BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; - } else { - return branchRegisterRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public Builder setBranchRegisterRequest(BranchRegisterRequestProto value) { - if (branchRegisterRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - branchRegisterRequest_ = value; - onChanged(); - } else { - branchRegisterRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public Builder setBranchRegisterRequest( - BranchRegisterRequestProto.Builder builderForValue) { - if (branchRegisterRequestBuilder_ == null) { - branchRegisterRequest_ = builderForValue.build(); - onChanged(); - } else { - branchRegisterRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public Builder mergeBranchRegisterRequest(BranchRegisterRequestProto value) { - if (branchRegisterRequestBuilder_ == null) { - if (branchRegisterRequest_ != null) { - branchRegisterRequest_ = - BranchRegisterRequestProto.newBuilder(branchRegisterRequest_).mergeFrom(value).buildPartial(); - } else { - branchRegisterRequest_ = value; - } - onChanged(); - } else { - branchRegisterRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public Builder clearBranchRegisterRequest() { - if (branchRegisterRequestBuilder_ == null) { - branchRegisterRequest_ = null; - onChanged(); - } else { - branchRegisterRequest_ = null; - branchRegisterRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public BranchRegisterRequestProto.Builder getBranchRegisterRequestBuilder() { - - onChanged(); - return getBranchRegisterRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder() { - if (branchRegisterRequestBuilder_ != null) { - return branchRegisterRequestBuilder_.getMessageOrBuilder(); - } else { - return branchRegisterRequest_ == null ? - BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - BranchRegisterRequestProto, BranchRegisterRequestProto.Builder, BranchRegisterRequestProtoOrBuilder> - getBranchRegisterRequestFieldBuilder() { - if (branchRegisterRequestBuilder_ == null) { - branchRegisterRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - BranchRegisterRequestProto, BranchRegisterRequestProto.Builder, BranchRegisterRequestProtoOrBuilder>( - getBranchRegisterRequest(), - getParentForChildren(), - isClean()); - branchRegisterRequest_ = null; - } - return branchRegisterRequestBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) - private static final GlobalLockQueryRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalLockQueryRequestProto(); - } - - public static GlobalLockQueryRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalLockQueryRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalLockQueryRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalLockQueryRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java deleted file mode 100644 index 1a87b840ee6..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalLockQueryRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalLockQueryRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - * @return Whether the branchRegisterRequest field is set. - */ - boolean hasBranchRegisterRequest(); - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - * @return The branchRegisterRequest. - */ - BranchRegisterRequestProto getBranchRegisterRequest(); - /** - * .org.apache.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponse.java deleted file mode 100644 index 9b185dec692..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalLockQueryResponse { - private GlobalLockQueryResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\035globalLockQueryResponse.proto\022\"org.apa" + - "che.seata.protocol.protobuf\032!abstractTra" + - "nsactionResponse.proto\"\233\001\n\034GlobalLockQue" + - "ryResponseProto\022i\n\033abstractTransactionRe" + - "sponse\030\001 \001(\0132D.org.apache.seata.protocol" + - ".protobuf.AbstractTransactionResponsePro" + - "to\022\020\n\010lockable\030\002 \001(\010BP\n3org.apache.seata" + - ".core.serializer.protobuf.generatedB\027Glo" + - "balLockQueryResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor, - new String[] { "AbstractTransactionResponse", "Lockable", }); - AbstractTransactionResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProto.java deleted file mode 100644 index 2b75a78fc78..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProto.java +++ /dev/null @@ -1,674 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto} - */ -public final class GlobalLockQueryResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) - GlobalLockQueryResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalLockQueryResponseProto.newBuilder() to construct. - private GlobalLockQueryResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalLockQueryResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalLockQueryResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalLockQueryResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(AbstractTransactionResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionResponse_); - abstractTransactionResponse_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - lockable_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalLockQueryResponseProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - @Override - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - @Override - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - @Override - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int LOCKABLE_FIELD_NUMBER = 2; - private boolean lockable_; - /** - * bool lockable = 2; - * @return The lockable. - */ - @Override - public boolean getLockable() { - return lockable_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (lockable_ != false) { - output.writeBool(2, lockable_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionResponse()); - } - if (lockable_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, lockable_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalLockQueryResponseProto)) { - return super.equals(obj); - } - GlobalLockQueryResponseProto other = (GlobalLockQueryResponseProto) obj; - - if (hasAbstractTransactionResponse() != other.hasAbstractTransactionResponse()) return false; - if (hasAbstractTransactionResponse()) { - if (!getAbstractTransactionResponse() - .equals(other.getAbstractTransactionResponse())) return false; - } - if (getLockable() - != other.getLockable()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionResponse()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionResponse().hashCode(); - } - hash = (37 * hash) + LOCKABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getLockable()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalLockQueryResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalLockQueryResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalLockQueryResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalLockQueryResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalLockQueryResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalLockQueryResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalLockQueryResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalLockQueryResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalLockQueryResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalLockQueryResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalLockQueryResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalLockQueryResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalLockQueryResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) - GlobalLockQueryResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalLockQueryResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - lockable_ = false; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalLockQueryResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; - } - - @Override - public GlobalLockQueryResponseProto getDefaultInstanceForType() { - return GlobalLockQueryResponseProto.getDefaultInstance(); - } - - @Override - public GlobalLockQueryResponseProto build() { - GlobalLockQueryResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalLockQueryResponseProto buildPartial() { - GlobalLockQueryResponseProto result = new GlobalLockQueryResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.lockable_ = lockable_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalLockQueryResponseProto) { - return mergeFrom((GlobalLockQueryResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalLockQueryResponseProto other) { - if (other == GlobalLockQueryResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - if (other.getLockable() != false) { - setLockable(other.getLockable()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalLockQueryResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalLockQueryResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - public AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionResponseProto, AbstractTransactionResponseProto.Builder, AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private boolean lockable_ ; - /** - * bool lockable = 2; - * @return The lockable. - */ - @Override - public boolean getLockable() { - return lockable_; - } - /** - * bool lockable = 2; - * @param value The lockable to set. - * @return This builder for chaining. - */ - public Builder setLockable(boolean value) { - - lockable_ = value; - onChanged(); - return this; - } - /** - * bool lockable = 2; - * @return This builder for chaining. - */ - public Builder clearLockable() { - - lockable_ = false; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) - private static final GlobalLockQueryResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalLockQueryResponseProto(); - } - - public static GlobalLockQueryResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalLockQueryResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalLockQueryResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalLockQueryResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java deleted file mode 100644 index 4b55dc43e82..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java +++ /dev/null @@ -1,30 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalLockQueryResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalLockQueryResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return Whether the abstractTransactionResponse field is set. - */ - boolean hasAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - * @return The abstractTransactionResponse. - */ - AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * bool lockable = 2; - * @return The lockable. - */ - boolean getLockable(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequest.java deleted file mode 100644 index 90f35c83822..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequest.java +++ /dev/null @@ -1,60 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalReportRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalReportRequest { - private GlobalReportRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\031globalReportRequest.proto\022\"org.apache." + - "seata.protocol.protobuf\032\036abstractGlobalE" + - "ndRequest.proto\032\022globalStatus.proto\"\314\001\n\030" + - "GlobalReportRequestProto\022c\n\030abstractGlob" + - "alEndRequest\030\001 \001(\0132A.org.apache.seata.pr" + - "otocol.protobuf.AbstractGlobalEndRequest" + - "Proto\022K\n\014globalStatus\030\002 \001(\01625.org.apache" + - ".seata.protocol.protobuf.GlobalStatusPro" + - "toBL\n3org.apache.seata.core.serializer.p" + - "rotobuf.generatedB\023GlobalReportRequestP\001" + - "b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractGlobalEndRequest.getDescriptor(), - GlobalStatus.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor, - new String[] { "AbstractGlobalEndRequest", "GlobalStatus", }); - AbstractGlobalEndRequest.getDescriptor(); - GlobalStatus.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProto.java deleted file mode 100644 index 526fc3d6951..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProto.java +++ /dev/null @@ -1,705 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalReportRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalReportRequestProto} - */ -public final class GlobalReportRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) - GlobalReportRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalReportRequestProto.newBuilder() to construct. - private GlobalReportRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalReportRequestProto() { - globalStatus_ = 0; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalReportRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalReportRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractGlobalEndRequestProto.Builder subBuilder = null; - if (abstractGlobalEndRequest_ != null) { - subBuilder = abstractGlobalEndRequest_.toBuilder(); - } - abstractGlobalEndRequest_ = input.readMessage(AbstractGlobalEndRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractGlobalEndRequest_); - abstractGlobalEndRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - globalStatus_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalReportRequestProto.class, Builder.class); - } - - public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; - private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - @Override - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - @Override - public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - @Override - public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - return getAbstractGlobalEndRequest(); - } - - public static final int GLOBALSTATUS_FIELD_NUMBER = 2; - private int globalStatus_; - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The enum numeric value on the wire for globalStatus. - */ - @Override public int getGlobalStatusValue() { - return globalStatus_; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The globalStatus. - */ - @Override public GlobalStatusProto getGlobalStatus() { - @SuppressWarnings("deprecation") - GlobalStatusProto result = GlobalStatusProto.valueOf(globalStatus_); - return result == null ? GlobalStatusProto.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractGlobalEndRequest_ != null) { - output.writeMessage(1, getAbstractGlobalEndRequest()); - } - if (globalStatus_ != GlobalStatusProto.UnKnown.getNumber()) { - output.writeEnum(2, globalStatus_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractGlobalEndRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractGlobalEndRequest()); - } - if (globalStatus_ != GlobalStatusProto.UnKnown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, globalStatus_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalReportRequestProto)) { - return super.equals(obj); - } - GlobalReportRequestProto other = (GlobalReportRequestProto) obj; - - if (hasAbstractGlobalEndRequest() != other.hasAbstractGlobalEndRequest()) return false; - if (hasAbstractGlobalEndRequest()) { - if (!getAbstractGlobalEndRequest() - .equals(other.getAbstractGlobalEndRequest())) return false; - } - if (globalStatus_ != other.globalStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractGlobalEndRequest()) { - hash = (37 * hash) + ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractGlobalEndRequest().hashCode(); - } - hash = (37 * hash) + GLOBALSTATUS_FIELD_NUMBER; - hash = (53 * hash) + globalStatus_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalReportRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalReportRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalReportRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalReportRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalReportRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalReportRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalReportRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalReportRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalReportRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalReportRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalReportRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalReportRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalReportRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalReportRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) - GlobalReportRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalReportRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalReportRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - globalStatus_ = 0; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalReportRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalReportRequestProto_descriptor; - } - - @Override - public GlobalReportRequestProto getDefaultInstanceForType() { - return GlobalReportRequestProto.getDefaultInstance(); - } - - @Override - public GlobalReportRequestProto build() { - GlobalReportRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalReportRequestProto buildPartial() { - GlobalReportRequestProto result = new GlobalReportRequestProto(this); - if (abstractGlobalEndRequestBuilder_ == null) { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; - } else { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.build(); - } - result.globalStatus_ = globalStatus_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalReportRequestProto) { - return mergeFrom((GlobalReportRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalReportRequestProto other) { - if (other == GlobalReportRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndRequest()) { - mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); - } - if (other.globalStatus_ != 0) { - setGlobalStatusValue(other.getGlobalStatusValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalReportRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalReportRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } else { - return abstractGlobalEndRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndRequest_ = value; - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest( - AbstractGlobalEndRequestProto.Builder builderForValue) { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder mergeAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (abstractGlobalEndRequest_ != null) { - abstractGlobalEndRequest_ = - AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndRequest_ = value; - } - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder clearAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - onChanged(); - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { - - onChanged(); - return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - if (abstractGlobalEndRequestBuilder_ != null) { - return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndRequest_ == null ? - AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> - getAbstractGlobalEndRequestFieldBuilder() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder>( - getAbstractGlobalEndRequest(), - getParentForChildren(), - isClean()); - abstractGlobalEndRequest_ = null; - } - return abstractGlobalEndRequestBuilder_; - } - - private int globalStatus_ = 0; - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The enum numeric value on the wire for globalStatus. - */ - @Override public int getGlobalStatusValue() { - return globalStatus_; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @param value The enum numeric value on the wire for globalStatus to set. - * @return This builder for chaining. - */ - public Builder setGlobalStatusValue(int value) { - - globalStatus_ = value; - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The globalStatus. - */ - @Override - public GlobalStatusProto getGlobalStatus() { - @SuppressWarnings("deprecation") - GlobalStatusProto result = GlobalStatusProto.valueOf(globalStatus_); - return result == null ? GlobalStatusProto.UNRECOGNIZED : result; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @param value The globalStatus to set. - * @return This builder for chaining. - */ - public Builder setGlobalStatus(GlobalStatusProto value) { - if (value == null) { - throw new NullPointerException(); - } - - globalStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return This builder for chaining. - */ - public Builder clearGlobalStatus() { - - globalStatus_ = 0; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) - private static final GlobalReportRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalReportRequestProto(); - } - - public static GlobalReportRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalReportRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalReportRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalReportRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProtoOrBuilder.java deleted file mode 100644 index 64777f31aea..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportRequestProtoOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalReportRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalReportRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalReportRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - boolean hasAbstractGlobalEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); - - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The enum numeric value on the wire for globalStatus. - */ - int getGlobalStatusValue(); - /** - * .org.apache.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - * @return The globalStatus. - */ - GlobalStatusProto getGlobalStatus(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponse.java deleted file mode 100644 index 9229b777c32..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalReportResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalReportResponse { - private GlobalReportResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\032globalReportResponse.proto\022\"org.apache" + - ".seata.protocol.protobuf\032\037abstractGlobal" + - "EndResponse.proto\"\202\001\n\031GlobalReportRespon" + - "seProto\022e\n\031abstractGlobalEndResponse\030\001 \001" + - "(\0132B.org.apache.seata.protocol.protobuf." + - "AbstractGlobalEndResponseProtoBM\n3org.ap" + - "ache.seata.core.serializer.protobuf.gene" + - "ratedB\024GlobalReportResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractGlobalEndResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor, - new String[] { "AbstractGlobalEndResponse", }); - AbstractGlobalEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProto.java deleted file mode 100644 index e66882b6ce5..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalReportResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalReportResponseProto} - */ -public final class GlobalReportResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) - GlobalReportResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalReportResponseProto.newBuilder() to construct. - private GlobalReportResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalReportResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalReportResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalReportResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractGlobalEndResponseProto.Builder subBuilder = null; - if (abstractGlobalEndResponse_ != null) { - subBuilder = abstractGlobalEndResponse_.toBuilder(); - } - abstractGlobalEndResponse_ = input.readMessage(AbstractGlobalEndResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractGlobalEndResponse_); - abstractGlobalEndResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalReportResponseProto.class, Builder.class); - } - - public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; - private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - @Override - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - @Override - public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - @Override - public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - return getAbstractGlobalEndResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractGlobalEndResponse_ != null) { - output.writeMessage(1, getAbstractGlobalEndResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractGlobalEndResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractGlobalEndResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalReportResponseProto)) { - return super.equals(obj); - } - GlobalReportResponseProto other = (GlobalReportResponseProto) obj; - - if (hasAbstractGlobalEndResponse() != other.hasAbstractGlobalEndResponse()) return false; - if (hasAbstractGlobalEndResponse()) { - if (!getAbstractGlobalEndResponse() - .equals(other.getAbstractGlobalEndResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractGlobalEndResponse()) { - hash = (37 * hash) + ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractGlobalEndResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalReportResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalReportResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalReportResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalReportResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalReportResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalReportResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalReportResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalReportResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalReportResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalReportResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalReportResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalReportResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalReportResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalReportResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) - GlobalReportResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalReportResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalReportResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalReportResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalReportResponseProto_descriptor; - } - - @Override - public GlobalReportResponseProto getDefaultInstanceForType() { - return GlobalReportResponseProto.getDefaultInstance(); - } - - @Override - public GlobalReportResponseProto build() { - GlobalReportResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalReportResponseProto buildPartial() { - GlobalReportResponseProto result = new GlobalReportResponseProto(this); - if (abstractGlobalEndResponseBuilder_ == null) { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; - } else { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalReportResponseProto) { - return mergeFrom((GlobalReportResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalReportResponseProto other) { - if (other == GlobalReportResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndResponse()) { - mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalReportResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalReportResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } else { - return abstractGlobalEndResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndResponse_ = value; - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse( - AbstractGlobalEndResponseProto.Builder builderForValue) { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder mergeAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (abstractGlobalEndResponse_ != null) { - abstractGlobalEndResponse_ = - AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndResponse_ = value; - } - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder clearAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - onChanged(); - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { - - onChanged(); - return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - if (abstractGlobalEndResponseBuilder_ != null) { - return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndResponse_ == null ? - AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> - getAbstractGlobalEndResponseFieldBuilder() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder>( - getAbstractGlobalEndResponse(), - getParentForChildren(), - isClean()); - abstractGlobalEndResponse_ = null; - } - return abstractGlobalEndResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) - private static final GlobalReportResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalReportResponseProto(); - } - - public static GlobalReportResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalReportResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalReportResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalReportResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProtoOrBuilder.java deleted file mode 100644 index 04d4880893b..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalReportResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalReportResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalReportResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalReportResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - boolean hasAbstractGlobalEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequest.java deleted file mode 100644 index 01262c8f43c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalRollbackRequest { - private GlobalRollbackRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\033globalRollbackRequest.proto\022\"org.apach" + - "e.seata.protocol.protobuf\032\036abstractGloba" + - "lEndRequest.proto\"\201\001\n\032GlobalRollbackRequ" + - "estProto\022c\n\030abstractGlobalEndRequest\030\001 \001" + - "(\0132A.org.apache.seata.protocol.protobuf." + - "AbstractGlobalEndRequestProtoBN\n3org.apa" + - "che.seata.core.serializer.protobuf.gener" + - "atedB\025GlobalRollbackRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractGlobalEndRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor, - new String[] { "AbstractGlobalEndRequest", }); - AbstractGlobalEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProto.java deleted file mode 100644 index d54c2a357c2..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto} - */ -public final class GlobalRollbackRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) - GlobalRollbackRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalRollbackRequestProto.newBuilder() to construct. - private GlobalRollbackRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalRollbackRequestProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalRollbackRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalRollbackRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractGlobalEndRequestProto.Builder subBuilder = null; - if (abstractGlobalEndRequest_ != null) { - subBuilder = abstractGlobalEndRequest_.toBuilder(); - } - abstractGlobalEndRequest_ = input.readMessage(AbstractGlobalEndRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractGlobalEndRequest_); - abstractGlobalEndRequest_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalRollbackRequestProto.class, Builder.class); - } - - public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; - private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - @Override - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - @Override - public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - @Override - public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - return getAbstractGlobalEndRequest(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractGlobalEndRequest_ != null) { - output.writeMessage(1, getAbstractGlobalEndRequest()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractGlobalEndRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractGlobalEndRequest()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalRollbackRequestProto)) { - return super.equals(obj); - } - GlobalRollbackRequestProto other = (GlobalRollbackRequestProto) obj; - - if (hasAbstractGlobalEndRequest() != other.hasAbstractGlobalEndRequest()) return false; - if (hasAbstractGlobalEndRequest()) { - if (!getAbstractGlobalEndRequest() - .equals(other.getAbstractGlobalEndRequest())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractGlobalEndRequest()) { - hash = (37 * hash) + ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractGlobalEndRequest().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalRollbackRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalRollbackRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalRollbackRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalRollbackRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalRollbackRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalRollbackRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalRollbackRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalRollbackRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalRollbackRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalRollbackRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalRollbackRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalRollbackRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalRollbackRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) - GlobalRollbackRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalRollbackRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalRollbackRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; - } - - @Override - public GlobalRollbackRequestProto getDefaultInstanceForType() { - return GlobalRollbackRequestProto.getDefaultInstance(); - } - - @Override - public GlobalRollbackRequestProto build() { - GlobalRollbackRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalRollbackRequestProto buildPartial() { - GlobalRollbackRequestProto result = new GlobalRollbackRequestProto(this); - if (abstractGlobalEndRequestBuilder_ == null) { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; - } else { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalRollbackRequestProto) { - return mergeFrom((GlobalRollbackRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalRollbackRequestProto other) { - if (other == GlobalRollbackRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndRequest()) { - mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalRollbackRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalRollbackRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } else { - return abstractGlobalEndRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndRequest_ = value; - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest( - AbstractGlobalEndRequestProto.Builder builderForValue) { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder mergeAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (abstractGlobalEndRequest_ != null) { - abstractGlobalEndRequest_ = - AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndRequest_ = value; - } - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder clearAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - onChanged(); - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { - - onChanged(); - return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - if (abstractGlobalEndRequestBuilder_ != null) { - return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndRequest_ == null ? - AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> - getAbstractGlobalEndRequestFieldBuilder() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder>( - getAbstractGlobalEndRequest(), - getParentForChildren(), - isClean()); - abstractGlobalEndRequest_ = null; - } - return abstractGlobalEndRequestBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) - private static final GlobalRollbackRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalRollbackRequestProto(); - } - - public static GlobalRollbackRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalRollbackRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalRollbackRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalRollbackRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java deleted file mode 100644 index ef97ce18099..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalRollbackRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalRollbackRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - boolean hasAbstractGlobalEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponse.java deleted file mode 100644 index 1d0f9d68aaa..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalRollbackResponse { - private GlobalRollbackResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\034globalRollbackResponse.proto\022\"org.apac" + - "he.seata.protocol.protobuf\032\037abstractGlob" + - "alEndResponse.proto\"\204\001\n\033GlobalRollbackRe" + - "sponseProto\022e\n\031abstractGlobalEndResponse" + - "\030\001 \001(\0132B.org.apache.seata.protocol.proto" + - "buf.AbstractGlobalEndResponseProtoBO\n3or" + - "g.apache.seata.core.serializer.protobuf." + - "generatedB\026GlobalRollbackResponseP\001b\006pro" + - "to3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractGlobalEndResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor, - new String[] { "AbstractGlobalEndResponse", }); - AbstractGlobalEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProto.java deleted file mode 100644 index 0e8fe5addeb..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto} - */ -public final class GlobalRollbackResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) - GlobalRollbackResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalRollbackResponseProto.newBuilder() to construct. - private GlobalRollbackResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalRollbackResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalRollbackResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalRollbackResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractGlobalEndResponseProto.Builder subBuilder = null; - if (abstractGlobalEndResponse_ != null) { - subBuilder = abstractGlobalEndResponse_.toBuilder(); - } - abstractGlobalEndResponse_ = input.readMessage(AbstractGlobalEndResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractGlobalEndResponse_); - abstractGlobalEndResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalRollbackResponseProto.class, Builder.class); - } - - public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; - private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - @Override - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - @Override - public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - @Override - public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - return getAbstractGlobalEndResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractGlobalEndResponse_ != null) { - output.writeMessage(1, getAbstractGlobalEndResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractGlobalEndResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractGlobalEndResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalRollbackResponseProto)) { - return super.equals(obj); - } - GlobalRollbackResponseProto other = (GlobalRollbackResponseProto) obj; - - if (hasAbstractGlobalEndResponse() != other.hasAbstractGlobalEndResponse()) return false; - if (hasAbstractGlobalEndResponse()) { - if (!getAbstractGlobalEndResponse() - .equals(other.getAbstractGlobalEndResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractGlobalEndResponse()) { - hash = (37 * hash) + ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractGlobalEndResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalRollbackResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalRollbackResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalRollbackResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalRollbackResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalRollbackResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalRollbackResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalRollbackResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalRollbackResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalRollbackResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalRollbackResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalRollbackResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalRollbackResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalRollbackResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) - GlobalRollbackResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalRollbackResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalRollbackResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; - } - - @Override - public GlobalRollbackResponseProto getDefaultInstanceForType() { - return GlobalRollbackResponseProto.getDefaultInstance(); - } - - @Override - public GlobalRollbackResponseProto build() { - GlobalRollbackResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalRollbackResponseProto buildPartial() { - GlobalRollbackResponseProto result = new GlobalRollbackResponseProto(this); - if (abstractGlobalEndResponseBuilder_ == null) { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; - } else { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalRollbackResponseProto) { - return mergeFrom((GlobalRollbackResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalRollbackResponseProto other) { - if (other == GlobalRollbackResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndResponse()) { - mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalRollbackResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalRollbackResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } else { - return abstractGlobalEndResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndResponse_ = value; - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse( - AbstractGlobalEndResponseProto.Builder builderForValue) { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder mergeAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (abstractGlobalEndResponse_ != null) { - abstractGlobalEndResponse_ = - AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndResponse_ = value; - } - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder clearAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - onChanged(); - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { - - onChanged(); - return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - if (abstractGlobalEndResponseBuilder_ != null) { - return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndResponse_ == null ? - AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> - getAbstractGlobalEndResponseFieldBuilder() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder>( - getAbstractGlobalEndResponse(), - getParentForChildren(), - isClean()); - abstractGlobalEndResponse_ = null; - } - return abstractGlobalEndResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) - private static final GlobalRollbackResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalRollbackResponseProto(); - } - - public static GlobalRollbackResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalRollbackResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalRollbackResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalRollbackResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java deleted file mode 100644 index 75c55f4bb32..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalRollbackResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalRollbackResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - boolean hasAbstractGlobalEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatus.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatus.java deleted file mode 100644 index 6725a2d0ddb..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatus.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatus.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalStatus { - private GlobalStatus() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\022globalStatus.proto\022\"org.apache.seata.p" + - "rotocol.protobuf*\305\002\n\021GlobalStatusProto\022\013" + - "\n\007UnKnown\020\000\022\t\n\005Begin\020\001\022\016\n\nCommitting\020\002\022\022" + - "\n\016CommitRetrying\020\003\022\017\n\013Rollbacking\020\004\022\024\n\020R" + - "ollbackRetrying\020\005\022\026\n\022TimeoutRollbacking\020" + - "\006\022\033\n\027TimeoutRollbackRetrying\020\007\022\023\n\017AsyncC" + - "ommitting\020\010\022\r\n\tCommitted\020\t\022\020\n\014CommitFail" + - "ed\020\n\022\016\n\nRollbacked\020\013\022\022\n\016RollbackFailed\020\014" + - "\022\025\n\021TimeoutRollbacked\020\r\022\031\n\025TimeoutRollba" + - "ckFailed\020\016\022\014\n\010Finished\020\017BE\n3org.apache.s" + - "eata.core.serializer.protobuf.generatedB" + - "\014GlobalStatusP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusProto.java deleted file mode 100644 index 1f85255d03d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusProto.java +++ /dev/null @@ -1,375 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatus.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code org.apache.seata.protocol.protobuf.GlobalStatusProto} - */ -public enum GlobalStatusProto - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unknown
-   * 
- * - * UnKnown = 0; - */ - UnKnown(0), - /** - *
-   * PHASE 1: can accept new branch registering.
-   * 
- * - * Begin = 1; - */ - Begin(1), - /** - *
-   * Committing.
-   * 
- * - * Committing = 2; - */ - Committing(2), - /** - *
-   * Retrying commit after a recoverable failure.
-   * 
- * - * CommitRetrying = 3; - */ - CommitRetrying(3), - /** - *
-   * Rollbacking
-   * 
- * - * Rollbacking = 4; - */ - Rollbacking(4), - /** - *
-   * Retrying rollback after a recoverable failure.
-   * 
- * - * RollbackRetrying = 5; - */ - RollbackRetrying(5), - /** - *
-   * Rollbacking since timeout
-   * 
- * - * TimeoutRollbacking = 6; - */ - TimeoutRollbacking(6), - /** - *
-   * Retrying rollback (since timeout) after a recoverable failure.
-   * 
- * - * TimeoutRollbackRetrying = 7; - */ - TimeoutRollbackRetrying(7), - /** - *
-   **
-   * All branches can be async committed. The committing is NOT done yet, but it can be seen as committed for TM/RM
-   * client.
-   * 
- * - * AsyncCommitting = 8; - */ - AsyncCommitting(8), - /** - *
-   * Finally: global transaction is successfully committed.
-   * 
- * - * Committed = 9; - */ - Committed(9), - /** - *
-   * Finally: failed to commit
-   * 
- * - * CommitFailed = 10; - */ - CommitFailed(10), - /** - *
-   * Finally: global transaction is successfully rollbacked.
-   * 
- * - * Rollbacked = 11; - */ - Rollbacked(11), - /** - *
-   * Finally: failed to rollback
-   * 
- * - * RollbackFailed = 12; - */ - RollbackFailed(12), - /** - *
-   * Finally: global transaction is successfully rollbacked since timeout.
-   * 
- * - * TimeoutRollbacked = 13; - */ - TimeoutRollbacked(13), - /** - *
-   * Finally: failed to rollback since timeout
-   * 
- * - * TimeoutRollbackFailed = 14; - */ - TimeoutRollbackFailed(14), - /** - *
-   * Not managed in session MAP any more
-   * 
- * - * Finished = 15; - */ - Finished(15), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unknown
-   * 
- * - * UnKnown = 0; - */ - public static final int UnKnown_VALUE = 0; - /** - *
-   * PHASE 1: can accept new branch registering.
-   * 
- * - * Begin = 1; - */ - public static final int Begin_VALUE = 1; - /** - *
-   * Committing.
-   * 
- * - * Committing = 2; - */ - public static final int Committing_VALUE = 2; - /** - *
-   * Retrying commit after a recoverable failure.
-   * 
- * - * CommitRetrying = 3; - */ - public static final int CommitRetrying_VALUE = 3; - /** - *
-   * Rollbacking
-   * 
- * - * Rollbacking = 4; - */ - public static final int Rollbacking_VALUE = 4; - /** - *
-   * Retrying rollback after a recoverable failure.
-   * 
- * - * RollbackRetrying = 5; - */ - public static final int RollbackRetrying_VALUE = 5; - /** - *
-   * Rollbacking since timeout
-   * 
- * - * TimeoutRollbacking = 6; - */ - public static final int TimeoutRollbacking_VALUE = 6; - /** - *
-   * Retrying rollback (since timeout) after a recoverable failure.
-   * 
- * - * TimeoutRollbackRetrying = 7; - */ - public static final int TimeoutRollbackRetrying_VALUE = 7; - /** - *
-   **
-   * All branches can be async committed. The committing is NOT done yet, but it can be seen as committed for TM/RM
-   * client.
-   * 
- * - * AsyncCommitting = 8; - */ - public static final int AsyncCommitting_VALUE = 8; - /** - *
-   * Finally: global transaction is successfully committed.
-   * 
- * - * Committed = 9; - */ - public static final int Committed_VALUE = 9; - /** - *
-   * Finally: failed to commit
-   * 
- * - * CommitFailed = 10; - */ - public static final int CommitFailed_VALUE = 10; - /** - *
-   * Finally: global transaction is successfully rollbacked.
-   * 
- * - * Rollbacked = 11; - */ - public static final int Rollbacked_VALUE = 11; - /** - *
-   * Finally: failed to rollback
-   * 
- * - * RollbackFailed = 12; - */ - public static final int RollbackFailed_VALUE = 12; - /** - *
-   * Finally: global transaction is successfully rollbacked since timeout.
-   * 
- * - * TimeoutRollbacked = 13; - */ - public static final int TimeoutRollbacked_VALUE = 13; - /** - *
-   * Finally: failed to rollback since timeout
-   * 
- * - * TimeoutRollbackFailed = 14; - */ - public static final int TimeoutRollbackFailed_VALUE = 14; - /** - *
-   * Not managed in session MAP any more
-   * 
- * - * Finished = 15; - */ - public static final int Finished_VALUE = 15; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @Deprecated - public static GlobalStatusProto valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static GlobalStatusProto forNumber(int value) { - switch (value) { - case 0: return UnKnown; - case 1: return Begin; - case 2: return Committing; - case 3: return CommitRetrying; - case 4: return Rollbacking; - case 5: return RollbackRetrying; - case 6: return TimeoutRollbacking; - case 7: return TimeoutRollbackRetrying; - case 8: return AsyncCommitting; - case 9: return Committed; - case 10: return CommitFailed; - case 11: return Rollbacked; - case 12: return RollbackFailed; - case 13: return TimeoutRollbacked; - case 14: return TimeoutRollbackFailed; - case 15: return Finished; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - GlobalStatusProto> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public GlobalStatusProto findValueByNumber(int number) { - return GlobalStatusProto.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return GlobalStatus.getDescriptor().getEnumTypes().get(0); - } - - private static final GlobalStatusProto[] VALUES = values(); - - public static GlobalStatusProto valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private GlobalStatusProto(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.GlobalStatusProto) -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequest.java deleted file mode 100644 index 3dfb30ff420..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalStatusRequest { - private GlobalStatusRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\031globalStatusRequest.proto\022\"org.apache." + - "seata.protocol.protobuf\032\036abstractGlobalE" + - "ndRequest.proto\"\177\n\030GlobalStatusRequestPr" + - "oto\022c\n\030abstractGlobalEndRequest\030\001 \001(\0132A." + - "org.apache.seata.protocol.protobuf.Abstr" + - "actGlobalEndRequestProtoBL\n3org.apache.s" + - "eata.core.serializer.protobuf.generatedB" + - "\023GlobalStatusRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractGlobalEndRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor, - new String[] { "AbstractGlobalEndRequest", }); - AbstractGlobalEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProto.java deleted file mode 100644 index 75f070a8798..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalStatusRequestProto} - */ -public final class GlobalStatusRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) - GlobalStatusRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalStatusRequestProto.newBuilder() to construct. - private GlobalStatusRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalStatusRequestProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalStatusRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalStatusRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractGlobalEndRequestProto.Builder subBuilder = null; - if (abstractGlobalEndRequest_ != null) { - subBuilder = abstractGlobalEndRequest_.toBuilder(); - } - abstractGlobalEndRequest_ = input.readMessage(AbstractGlobalEndRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractGlobalEndRequest_); - abstractGlobalEndRequest_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalStatusRequestProto.class, Builder.class); - } - - public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; - private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - @Override - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - @Override - public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - @Override - public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - return getAbstractGlobalEndRequest(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractGlobalEndRequest_ != null) { - output.writeMessage(1, getAbstractGlobalEndRequest()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractGlobalEndRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractGlobalEndRequest()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalStatusRequestProto)) { - return super.equals(obj); - } - GlobalStatusRequestProto other = (GlobalStatusRequestProto) obj; - - if (hasAbstractGlobalEndRequest() != other.hasAbstractGlobalEndRequest()) return false; - if (hasAbstractGlobalEndRequest()) { - if (!getAbstractGlobalEndRequest() - .equals(other.getAbstractGlobalEndRequest())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractGlobalEndRequest()) { - hash = (37 * hash) + ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractGlobalEndRequest().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalStatusRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalStatusRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalStatusRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalStatusRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalStatusRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalStatusRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalStatusRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalStatusRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalStatusRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalStatusRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalStatusRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalStatusRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalStatusRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalStatusRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) - GlobalStatusRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalStatusRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalStatusRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalStatusRequest.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; - } - - @Override - public GlobalStatusRequestProto getDefaultInstanceForType() { - return GlobalStatusRequestProto.getDefaultInstance(); - } - - @Override - public GlobalStatusRequestProto build() { - GlobalStatusRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalStatusRequestProto buildPartial() { - GlobalStatusRequestProto result = new GlobalStatusRequestProto(this); - if (abstractGlobalEndRequestBuilder_ == null) { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; - } else { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalStatusRequestProto) { - return mergeFrom((GlobalStatusRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalStatusRequestProto other) { - if (other == GlobalStatusRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndRequest()) { - mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalStatusRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalStatusRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - public AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - return abstractGlobalEndRequest_ == null ? AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } else { - return abstractGlobalEndRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndRequest_ = value; - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest( - AbstractGlobalEndRequestProto.Builder builderForValue) { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder mergeAbstractGlobalEndRequest(AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (abstractGlobalEndRequest_ != null) { - abstractGlobalEndRequest_ = - AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndRequest_ = value; - } - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder clearAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - onChanged(); - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { - - onChanged(); - return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - if (abstractGlobalEndRequestBuilder_ != null) { - return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndRequest_ == null ? - AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder> - getAbstractGlobalEndRequestFieldBuilder() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndRequestProto, AbstractGlobalEndRequestProto.Builder, AbstractGlobalEndRequestProtoOrBuilder>( - getAbstractGlobalEndRequest(), - getParentForChildren(), - isClean()); - abstractGlobalEndRequest_ = null; - } - return abstractGlobalEndRequestBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) - private static final GlobalStatusRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalStatusRequestProto(); - } - - public static GlobalStatusRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalStatusRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalStatusRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalStatusRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java deleted file mode 100644 index f014d6e6739..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalStatusRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalStatusRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return Whether the abstractGlobalEndRequest field is set. - */ - boolean hasAbstractGlobalEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - * @return The abstractGlobalEndRequest. - */ - AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponse.java deleted file mode 100644 index fc5b88e93b8..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class GlobalStatusResponse { - private GlobalStatusResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\032globalStatusResponse.proto\022\"org.apache" + - ".seata.protocol.protobuf\032\037abstractGlobal" + - "EndResponse.proto\"\202\001\n\031GlobalStatusRespon" + - "seProto\022e\n\031abstractGlobalEndResponse\030\001 \001" + - "(\0132B.org.apache.seata.protocol.protobuf." + - "AbstractGlobalEndResponseProtoBM\n3org.ap" + - "ache.seata.core.serializer.protobuf.gene" + - "ratedB\024GlobalStatusResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractGlobalEndResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor, - new String[] { "AbstractGlobalEndResponse", }); - AbstractGlobalEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProto.java deleted file mode 100644 index ec72179b4f2..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProto.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalStatusResponseProto} - */ -public final class GlobalStatusResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) - GlobalStatusResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GlobalStatusResponseProto.newBuilder() to construct. - private GlobalStatusResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GlobalStatusResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GlobalStatusResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GlobalStatusResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractGlobalEndResponseProto.Builder subBuilder = null; - if (abstractGlobalEndResponse_ != null) { - subBuilder = abstractGlobalEndResponse_.toBuilder(); - } - abstractGlobalEndResponse_ = input.readMessage(AbstractGlobalEndResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractGlobalEndResponse_); - abstractGlobalEndResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalStatusResponseProto.class, Builder.class); - } - - public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; - private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - @Override - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - @Override - public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - @Override - public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - return getAbstractGlobalEndResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractGlobalEndResponse_ != null) { - output.writeMessage(1, getAbstractGlobalEndResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractGlobalEndResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractGlobalEndResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GlobalStatusResponseProto)) { - return super.equals(obj); - } - GlobalStatusResponseProto other = (GlobalStatusResponseProto) obj; - - if (hasAbstractGlobalEndResponse() != other.hasAbstractGlobalEndResponse()) return false; - if (hasAbstractGlobalEndResponse()) { - if (!getAbstractGlobalEndResponse() - .equals(other.getAbstractGlobalEndResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractGlobalEndResponse()) { - hash = (37 * hash) + ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractGlobalEndResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GlobalStatusResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalStatusResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalStatusResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalStatusResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalStatusResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GlobalStatusResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GlobalStatusResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalStatusResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalStatusResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GlobalStatusResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GlobalStatusResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GlobalStatusResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GlobalStatusResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.protocol.protobuf.GlobalStatusResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) - GlobalStatusResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GlobalStatusResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.GlobalStatusResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GlobalStatusResponse.internal_static_org_apache_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; - } - - @Override - public GlobalStatusResponseProto getDefaultInstanceForType() { - return GlobalStatusResponseProto.getDefaultInstance(); - } - - @Override - public GlobalStatusResponseProto build() { - GlobalStatusResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GlobalStatusResponseProto buildPartial() { - GlobalStatusResponseProto result = new GlobalStatusResponseProto(this); - if (abstractGlobalEndResponseBuilder_ == null) { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; - } else { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GlobalStatusResponseProto) { - return mergeFrom((GlobalStatusResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GlobalStatusResponseProto other) { - if (other == GlobalStatusResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndResponse()) { - mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GlobalStatusResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GlobalStatusResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - public AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - return abstractGlobalEndResponse_ == null ? AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } else { - return abstractGlobalEndResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndResponse_ = value; - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse( - AbstractGlobalEndResponseProto.Builder builderForValue) { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder mergeAbstractGlobalEndResponse(AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (abstractGlobalEndResponse_ != null) { - abstractGlobalEndResponse_ = - AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndResponse_ = value; - } - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder clearAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - onChanged(); - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { - - onChanged(); - return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - if (abstractGlobalEndResponseBuilder_ != null) { - return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndResponse_ == null ? - AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder> - getAbstractGlobalEndResponseFieldBuilder() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractGlobalEndResponseProto, AbstractGlobalEndResponseProto.Builder, AbstractGlobalEndResponseProtoOrBuilder>( - getAbstractGlobalEndResponse(), - getParentForChildren(), - isClean()); - abstractGlobalEndResponse_ = null; - } - return abstractGlobalEndResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) - private static final GlobalStatusResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GlobalStatusResponseProto(); - } - - public static GlobalStatusResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GlobalStatusResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalStatusResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GlobalStatusResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java deleted file mode 100644 index 6f464e64c0f..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface GlobalStatusResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.GlobalStatusResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return Whether the abstractGlobalEndResponse field is set. - */ - boolean hasAbstractGlobalEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - * @return The abstractGlobalEndResponse. - */ - AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessage.java deleted file mode 100644 index cf810c2d588..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessage.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: heartbeatMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class HeartbeatMessage { - private HeartbeatMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\026heartbeatMessage.proto\022\"org.apache.sea" + - "ta.protocol.protobuf\"%\n\025HeartbeatMessage" + - "Proto\022\014\n\004ping\030\001 \001(\010BI\n3org.apache.seata." + - "core.serializer.protobuf.generatedB\020Hear" + - "tbeatMessageP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor, - new String[] { "Ping", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProto.java deleted file mode 100644 index 4e574f4dfbf..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProto.java +++ /dev/null @@ -1,494 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: heartbeatMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.HeartbeatMessageProto} - */ -public final class HeartbeatMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) - HeartbeatMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use HeartbeatMessageProto.newBuilder() to construct. - private HeartbeatMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HeartbeatMessageProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new HeartbeatMessageProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HeartbeatMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - ping_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - HeartbeatMessageProto.class, Builder.class); - } - - public static final int PING_FIELD_NUMBER = 1; - private boolean ping_; - /** - * bool ping = 1; - * @return The ping. - */ - @Override - public boolean getPing() { - return ping_; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (ping_ != false) { - output.writeBool(1, ping_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (ping_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, ping_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof HeartbeatMessageProto)) { - return super.equals(obj); - } - HeartbeatMessageProto other = (HeartbeatMessageProto) obj; - - if (getPing() - != other.getPing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getPing()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static HeartbeatMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeartbeatMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeartbeatMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeartbeatMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeartbeatMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static HeartbeatMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static HeartbeatMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static HeartbeatMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static HeartbeatMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static HeartbeatMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static HeartbeatMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static HeartbeatMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(HeartbeatMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.HeartbeatMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) - HeartbeatMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - HeartbeatMessageProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.HeartbeatMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - ping_ = false; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return HeartbeatMessage.internal_static_org_apache_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; - } - - @Override - public HeartbeatMessageProto getDefaultInstanceForType() { - return HeartbeatMessageProto.getDefaultInstance(); - } - - @Override - public HeartbeatMessageProto build() { - HeartbeatMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public HeartbeatMessageProto buildPartial() { - HeartbeatMessageProto result = new HeartbeatMessageProto(this); - result.ping_ = ping_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof HeartbeatMessageProto) { - return mergeFrom((HeartbeatMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(HeartbeatMessageProto other) { - if (other == HeartbeatMessageProto.getDefaultInstance()) return this; - if (other.getPing() != false) { - setPing(other.getPing()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - HeartbeatMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (HeartbeatMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean ping_ ; - /** - * bool ping = 1; - * @return The ping. - */ - @Override - public boolean getPing() { - return ping_; - } - /** - * bool ping = 1; - * @param value The ping to set. - * @return This builder for chaining. - */ - public Builder setPing(boolean value) { - - ping_ = value; - onChanged(); - return this; - } - /** - * bool ping = 1; - * @return This builder for chaining. - */ - public Builder clearPing() { - - ping_ = false; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) - private static final HeartbeatMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new HeartbeatMessageProto(); - } - - public static HeartbeatMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public HeartbeatMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HeartbeatMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public HeartbeatMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProtoOrBuilder.java deleted file mode 100644 index 6536b326835..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/HeartbeatMessageProtoOrBuilder.java +++ /dev/null @@ -1,15 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: heartbeatMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface HeartbeatMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.HeartbeatMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * bool ping = 1; - * @return The ping. - */ - boolean getPing(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessage.java deleted file mode 100644 index 8704a26d9c7..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessage.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class MergedResultMessage { - private MergedResultMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\031mergedResultMessage.proto\022\"org.apache." + - "seata.protocol.protobuf\032\025abstractMessage" + - ".proto\032\031google/protobuf/any.proto\"\221\001\n\030Me" + - "rgedResultMessageProto\022Q\n\017abstractMessag" + - "e\030\001 \001(\01328.org.apache.seata.protocol.prot" + - "obuf.AbstractMessageProto\022\"\n\004msgs\030\002 \003(\0132" + - "\024.google.protobuf.AnyBL\n3org.apache.seat" + - "a.core.serializer.protobuf.generatedB\023Me" + - "rgedResultMessageP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractMessage.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor, - new String[] { "AbstractMessage", "Msgs", }); - AbstractMessage.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProto.java deleted file mode 100644 index b9c0a0b3c8c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProto.java +++ /dev/null @@ -1,968 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.MergedResultMessageProto} - */ -public final class MergedResultMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.MergedResultMessageProto) - MergedResultMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use MergedResultMessageProto.newBuilder() to construct. - private MergedResultMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MergedResultMessageProto() { - msgs_ = java.util.Collections.emptyList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new MergedResultMessageProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MergedResultMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - msgs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - msgs_.add( - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - msgs_ = java.util.Collections.unmodifiableList(msgs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - MergedResultMessageProto.class, Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private AbstractMessageProto abstractMessage_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - @Override - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - @Override - public AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - @Override - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int MSGS_FIELD_NUMBER = 2; - private java.util.List msgs_; - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public java.util.List getMsgsList() { - return msgs_; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public java.util.List - getMsgsOrBuilderList() { - return msgs_; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public int getMsgsCount() { - return msgs_.size(); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public com.google.protobuf.Any getMsgs(int index) { - return msgs_.get(index); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( - int index) { - return msgs_.get(index); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - for (int i = 0; i < msgs_.size(); i++) { - output.writeMessage(2, msgs_.get(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractMessage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractMessage()); - } - for (int i = 0; i < msgs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, msgs_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof MergedResultMessageProto)) { - return super.equals(obj); - } - MergedResultMessageProto other = (MergedResultMessageProto) obj; - - if (hasAbstractMessage() != other.hasAbstractMessage()) return false; - if (hasAbstractMessage()) { - if (!getAbstractMessage() - .equals(other.getAbstractMessage())) return false; - } - if (!getMsgsList() - .equals(other.getMsgsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractMessage()) { - hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractMessage().hashCode(); - } - if (getMsgsCount() > 0) { - hash = (37 * hash) + MSGS_FIELD_NUMBER; - hash = (53 * hash) + getMsgsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static MergedResultMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static MergedResultMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static MergedResultMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static MergedResultMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static MergedResultMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static MergedResultMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static MergedResultMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static MergedResultMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static MergedResultMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static MergedResultMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static MergedResultMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static MergedResultMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(MergedResultMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.MergedResultMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.MergedResultMessageProto) - MergedResultMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - MergedResultMessageProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.MergedResultMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMsgsFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - if (msgsBuilder_ == null) { - msgs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - msgsBuilder_.clear(); - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return MergedResultMessage.internal_static_org_apache_seata_protocol_protobuf_MergedResultMessageProto_descriptor; - } - - @Override - public MergedResultMessageProto getDefaultInstanceForType() { - return MergedResultMessageProto.getDefaultInstance(); - } - - @Override - public MergedResultMessageProto build() { - MergedResultMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public MergedResultMessageProto buildPartial() { - MergedResultMessageProto result = new MergedResultMessageProto(this); - int from_bitField0_ = bitField0_; - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - if (msgsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - msgs_ = java.util.Collections.unmodifiableList(msgs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.msgs_ = msgs_; - } else { - result.msgs_ = msgsBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof MergedResultMessageProto) { - return mergeFrom((MergedResultMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(MergedResultMessageProto other) { - if (other == MergedResultMessageProto.getDefaultInstance()) return this; - if (other.hasAbstractMessage()) { - mergeAbstractMessage(other.getAbstractMessage()); - } - if (msgsBuilder_ == null) { - if (!other.msgs_.isEmpty()) { - if (msgs_.isEmpty()) { - msgs_ = other.msgs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMsgsIsMutable(); - msgs_.addAll(other.msgs_); - } - onChanged(); - } - } else { - if (!other.msgs_.isEmpty()) { - if (msgsBuilder_.isEmpty()) { - msgsBuilder_.dispose(); - msgsBuilder_ = null; - msgs_ = other.msgs_; - bitField0_ = (bitField0_ & ~0x00000001); - msgsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMsgsFieldBuilder() : null; - } else { - msgsBuilder_.addAllMessages(other.msgs_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - MergedResultMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (MergedResultMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - public AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private java.util.List msgs_ = - java.util.Collections.emptyList(); - private void ensureMsgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - msgs_ = new java.util.ArrayList(msgs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> msgsBuilder_; - - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List getMsgsList() { - if (msgsBuilder_ == null) { - return java.util.Collections.unmodifiableList(msgs_); - } else { - return msgsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public int getMsgsCount() { - if (msgsBuilder_ == null) { - return msgs_.size(); - } else { - return msgsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any getMsgs(int index) { - if (msgsBuilder_ == null) { - return msgs_.get(index); - } else { - return msgsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder setMsgs( - int index, com.google.protobuf.Any value) { - if (msgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMsgsIsMutable(); - msgs_.set(index, value); - onChanged(); - } else { - msgsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder setMsgs( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - msgs_.set(index, builderForValue.build()); - onChanged(); - } else { - msgsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addMsgs(com.google.protobuf.Any value) { - if (msgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMsgsIsMutable(); - msgs_.add(value); - onChanged(); - } else { - msgsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addMsgs( - int index, com.google.protobuf.Any value) { - if (msgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMsgsIsMutable(); - msgs_.add(index, value); - onChanged(); - } else { - msgsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addMsgs( - com.google.protobuf.Any.Builder builderForValue) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - msgs_.add(builderForValue.build()); - onChanged(); - } else { - msgsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addMsgs( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - msgs_.add(index, builderForValue.build()); - onChanged(); - } else { - msgsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addAllMsgs( - Iterable values) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, msgs_); - onChanged(); - } else { - msgsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder clearMsgs() { - if (msgsBuilder_ == null) { - msgs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - msgsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder removeMsgs(int index) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - msgs_.remove(index); - onChanged(); - } else { - msgsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any.Builder getMsgsBuilder( - int index) { - return getMsgsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( - int index) { - if (msgsBuilder_ == null) { - return msgs_.get(index); } else { - return msgsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List - getMsgsOrBuilderList() { - if (msgsBuilder_ != null) { - return msgsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(msgs_); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any.Builder addMsgsBuilder() { - return getMsgsFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any.Builder addMsgsBuilder( - int index) { - return getMsgsFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List - getMsgsBuilderList() { - return getMsgsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getMsgsFieldBuilder() { - if (msgsBuilder_ == null) { - msgsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - msgs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - msgs_ = null; - } - return msgsBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.MergedResultMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.MergedResultMessageProto) - private static final MergedResultMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new MergedResultMessageProto(); - } - - public static MergedResultMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public MergedResultMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MergedResultMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public MergedResultMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProtoOrBuilder.java deleted file mode 100644 index a804c2cf48c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedResultMessageProtoOrBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedResultMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface MergedResultMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.MergedResultMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - boolean hasAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - AbstractMessageProto getAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); - - /** - * repeated .google.protobuf.Any msgs = 2; - */ - java.util.List - getMsgsList(); - /** - * repeated .google.protobuf.Any msgs = 2; - */ - com.google.protobuf.Any getMsgs(int index); - /** - * repeated .google.protobuf.Any msgs = 2; - */ - int getMsgsCount(); - /** - * repeated .google.protobuf.Any msgs = 2; - */ - java.util.List - getMsgsOrBuilderList(); - /** - * repeated .google.protobuf.Any msgs = 2; - */ - com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( - int index); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessage.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessage.java deleted file mode 100644 index 2d5758832dd..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessage.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedWarpMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class MergedWarpMessage { - private MergedWarpMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\027mergedWarpMessage.proto\022\"org.apache.se" + - "ata.protocol.protobuf\032\025abstractMessage.p" + - "roto\032\031google/protobuf/any.proto\"\237\001\n\026Merg" + - "edWarpMessageProto\022Q\n\017abstractMessage\030\001 " + - "\001(\01328.org.apache.seata.protocol.protobuf" + - ".AbstractMessageProto\022\"\n\004msgs\030\002 \003(\0132\024.go" + - "ogle.protobuf.Any\022\016\n\006msgIds\030\003 \003(\005BJ\n3org" + - ".apache.seata.core.serializer.protobuf.g" + - "eneratedB\021MergedWarpMessageP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractMessage.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor, - new String[] { "AbstractMessage", "Msgs", "MsgIds", }); - AbstractMessage.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProto.java deleted file mode 100644 index bafcfcd1c92..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProto.java +++ /dev/null @@ -1,1145 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedWarpMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.MergedWarpMessageProto} - */ -public final class MergedWarpMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) - MergedWarpMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use MergedWarpMessageProto.newBuilder() to construct. - private MergedWarpMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MergedWarpMessageProto() { - msgs_ = java.util.Collections.emptyList(); - msgIds_ = emptyIntList(); - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new MergedWarpMessageProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MergedWarpMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - msgs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - msgs_.add( - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - msgIds_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - msgIds_.addInt(input.readInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - msgIds_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - msgIds_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - msgs_ = java.util.Collections.unmodifiableList(msgs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - msgIds_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - MergedWarpMessageProto.class, Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private AbstractMessageProto abstractMessage_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - @Override - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - @Override - public AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - @Override - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int MSGS_FIELD_NUMBER = 2; - private java.util.List msgs_; - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public java.util.List getMsgsList() { - return msgs_; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public java.util.List - getMsgsOrBuilderList() { - return msgs_; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public int getMsgsCount() { - return msgs_.size(); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public com.google.protobuf.Any getMsgs(int index) { - return msgs_.get(index); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - @Override - public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( - int index) { - return msgs_.get(index); - } - - public static final int MSGIDS_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.IntList msgIds_; - /** - * repeated int32 msgIds = 3; - * @return A list containing the msgIds. - */ - @Override - public java.util.List - getMsgIdsList() { - return msgIds_; - } - /** - * repeated int32 msgIds = 3; - * @return The count of msgIds. - */ - public int getMsgIdsCount() { - return msgIds_.size(); - } - /** - * repeated int32 msgIds = 3; - * @param index The index of the element to return. - * @return The msgIds at the given index. - */ - public int getMsgIds(int index) { - return msgIds_.getInt(index); - } - private int msgIdsMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - for (int i = 0; i < msgs_.size(); i++) { - output.writeMessage(2, msgs_.get(i)); - } - if (getMsgIdsList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(msgIdsMemoizedSerializedSize); - } - for (int i = 0; i < msgIds_.size(); i++) { - output.writeInt32NoTag(msgIds_.getInt(i)); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractMessage_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractMessage()); - } - for (int i = 0; i < msgs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, msgs_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < msgIds_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(msgIds_.getInt(i)); - } - size += dataSize; - if (!getMsgIdsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - msgIdsMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof MergedWarpMessageProto)) { - return super.equals(obj); - } - MergedWarpMessageProto other = (MergedWarpMessageProto) obj; - - if (hasAbstractMessage() != other.hasAbstractMessage()) return false; - if (hasAbstractMessage()) { - if (!getAbstractMessage() - .equals(other.getAbstractMessage())) return false; - } - if (!getMsgsList() - .equals(other.getMsgsList())) return false; - if (!getMsgIdsList() - .equals(other.getMsgIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractMessage()) { - hash = (37 * hash) + ABSTRACTMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractMessage().hashCode(); - } - if (getMsgsCount() > 0) { - hash = (37 * hash) + MSGS_FIELD_NUMBER; - hash = (53 * hash) + getMsgsList().hashCode(); - } - if (getMsgIdsCount() > 0) { - hash = (37 * hash) + MSGIDS_FIELD_NUMBER; - hash = (53 * hash) + getMsgIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static MergedWarpMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static MergedWarpMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static MergedWarpMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static MergedWarpMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static MergedWarpMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static MergedWarpMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static MergedWarpMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static MergedWarpMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static MergedWarpMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static MergedWarpMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static MergedWarpMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static MergedWarpMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(MergedWarpMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.MergedWarpMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) - MergedWarpMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - MergedWarpMessageProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.MergedWarpMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMsgsFieldBuilder(); - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - if (msgsBuilder_ == null) { - msgs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - msgsBuilder_.clear(); - } - msgIds_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return MergedWarpMessage.internal_static_org_apache_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; - } - - @Override - public MergedWarpMessageProto getDefaultInstanceForType() { - return MergedWarpMessageProto.getDefaultInstance(); - } - - @Override - public MergedWarpMessageProto build() { - MergedWarpMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public MergedWarpMessageProto buildPartial() { - MergedWarpMessageProto result = new MergedWarpMessageProto(this); - int from_bitField0_ = bitField0_; - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - if (msgsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - msgs_ = java.util.Collections.unmodifiableList(msgs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.msgs_ = msgs_; - } else { - result.msgs_ = msgsBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - msgIds_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.msgIds_ = msgIds_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof MergedWarpMessageProto) { - return mergeFrom((MergedWarpMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(MergedWarpMessageProto other) { - if (other == MergedWarpMessageProto.getDefaultInstance()) return this; - if (other.hasAbstractMessage()) { - mergeAbstractMessage(other.getAbstractMessage()); - } - if (msgsBuilder_ == null) { - if (!other.msgs_.isEmpty()) { - if (msgs_.isEmpty()) { - msgs_ = other.msgs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMsgsIsMutable(); - msgs_.addAll(other.msgs_); - } - onChanged(); - } - } else { - if (!other.msgs_.isEmpty()) { - if (msgsBuilder_.isEmpty()) { - msgsBuilder_.dispose(); - msgsBuilder_ = null; - msgs_ = other.msgs_; - bitField0_ = (bitField0_ & ~0x00000001); - msgsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMsgsFieldBuilder() : null; - } else { - msgsBuilder_.addAllMessages(other.msgs_); - } - } - } - if (!other.msgIds_.isEmpty()) { - if (msgIds_.isEmpty()) { - msgIds_ = other.msgIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMsgIdsIsMutable(); - msgIds_.addAll(other.msgIds_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - MergedWarpMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (MergedWarpMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - public AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractMessageProto, AbstractMessageProto.Builder, AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private java.util.List msgs_ = - java.util.Collections.emptyList(); - private void ensureMsgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - msgs_ = new java.util.ArrayList(msgs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> msgsBuilder_; - - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List getMsgsList() { - if (msgsBuilder_ == null) { - return java.util.Collections.unmodifiableList(msgs_); - } else { - return msgsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public int getMsgsCount() { - if (msgsBuilder_ == null) { - return msgs_.size(); - } else { - return msgsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any getMsgs(int index) { - if (msgsBuilder_ == null) { - return msgs_.get(index); - } else { - return msgsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder setMsgs( - int index, com.google.protobuf.Any value) { - if (msgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMsgsIsMutable(); - msgs_.set(index, value); - onChanged(); - } else { - msgsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder setMsgs( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - msgs_.set(index, builderForValue.build()); - onChanged(); - } else { - msgsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addMsgs(com.google.protobuf.Any value) { - if (msgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMsgsIsMutable(); - msgs_.add(value); - onChanged(); - } else { - msgsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addMsgs( - int index, com.google.protobuf.Any value) { - if (msgsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMsgsIsMutable(); - msgs_.add(index, value); - onChanged(); - } else { - msgsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addMsgs( - com.google.protobuf.Any.Builder builderForValue) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - msgs_.add(builderForValue.build()); - onChanged(); - } else { - msgsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addMsgs( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - msgs_.add(index, builderForValue.build()); - onChanged(); - } else { - msgsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder addAllMsgs( - Iterable values) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, msgs_); - onChanged(); - } else { - msgsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder clearMsgs() { - if (msgsBuilder_ == null) { - msgs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - msgsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public Builder removeMsgs(int index) { - if (msgsBuilder_ == null) { - ensureMsgsIsMutable(); - msgs_.remove(index); - onChanged(); - } else { - msgsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any.Builder getMsgsBuilder( - int index) { - return getMsgsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( - int index) { - if (msgsBuilder_ == null) { - return msgs_.get(index); } else { - return msgsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List - getMsgsOrBuilderList() { - if (msgsBuilder_ != null) { - return msgsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(msgs_); - } - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any.Builder addMsgsBuilder() { - return getMsgsFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any.Builder addMsgsBuilder( - int index) { - return getMsgsFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List - getMsgsBuilderList() { - return getMsgsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getMsgsFieldBuilder() { - if (msgsBuilder_ == null) { - msgsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - msgs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - msgs_ = null; - } - return msgsBuilder_; - } - - private com.google.protobuf.Internal.IntList msgIds_ = emptyIntList(); - private void ensureMsgIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - msgIds_ = mutableCopy(msgIds_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated int32 msgIds = 3; - * @return A list containing the msgIds. - */ - public java.util.List - getMsgIdsList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(msgIds_) : msgIds_; - } - /** - * repeated int32 msgIds = 3; - * @return The count of msgIds. - */ - public int getMsgIdsCount() { - return msgIds_.size(); - } - /** - * repeated int32 msgIds = 3; - * @param index The index of the element to return. - * @return The msgIds at the given index. - */ - public int getMsgIds(int index) { - return msgIds_.getInt(index); - } - /** - * repeated int32 msgIds = 3; - * @param index The index to set the value at. - * @param value The msgIds to set. - * @return This builder for chaining. - */ - public Builder setMsgIds( - int index, int value) { - ensureMsgIdsIsMutable(); - msgIds_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - * @param value The msgIds to add. - * @return This builder for chaining. - */ - public Builder addMsgIds(int value) { - ensureMsgIdsIsMutable(); - msgIds_.addInt(value); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - * @param values The msgIds to add. - * @return This builder for chaining. - */ - public Builder addAllMsgIds( - Iterable values) { - ensureMsgIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, msgIds_); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - * @return This builder for chaining. - */ - public Builder clearMsgIds() { - msgIds_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) - private static final MergedWarpMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new MergedWarpMessageProto(); - } - - public static MergedWarpMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public MergedWarpMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MergedWarpMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public MergedWarpMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProtoOrBuilder.java deleted file mode 100644 index fd78b4e996c..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MergedWarpMessageProtoOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedWarpMessage.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface MergedWarpMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.MergedWarpMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return Whether the abstractMessage field is set. - */ - boolean hasAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - * @return The abstractMessage. - */ - AbstractMessageProto getAbstractMessage(); - /** - * .org.apache.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); - - /** - * repeated .google.protobuf.Any msgs = 2; - */ - java.util.List - getMsgsList(); - /** - * repeated .google.protobuf.Any msgs = 2; - */ - com.google.protobuf.Any getMsgs(int index); - /** - * repeated .google.protobuf.Any msgs = 2; - */ - int getMsgsCount(); - /** - * repeated .google.protobuf.Any msgs = 2; - */ - java.util.List - getMsgsOrBuilderList(); - /** - * repeated .google.protobuf.Any msgs = 2; - */ - com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( - int index); - - /** - * repeated int32 msgIds = 3; - * @return A list containing the msgIds. - */ - java.util.List getMsgIdsList(); - /** - * repeated int32 msgIds = 3; - * @return The count of msgIds. - */ - int getMsgIdsCount(); - /** - * repeated int32 msgIds = 3; - * @param index The index of the element to return. - * @return The msgIds at the given index. - */ - int getMsgIds(int index); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageType.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageType.java deleted file mode 100644 index 6ea1ae6cb5d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageType.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: messageType.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class MessageType { - private MessageType() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\021messageType.proto\022\"org.apache.seata.pr" + - "otocol.protobuf*\257\006\n\020MessageTypeProto\022\031\n\025" + - "TYPE_GLOBAL_PRESERVED\020\000\022\025\n\021TYPE_GLOBAL_B" + - "EGIN\020\001\022\034\n\030TYPE_GLOBAL_BEGIN_RESULT\020\002\022\026\n\022" + - "TYPE_GLOBAL_COMMIT\020\007\022\035\n\031TYPE_GLOBAL_COMM" + - "IT_RESULT\020\010\022\030\n\024TYPE_GLOBAL_ROLLBACK\020\t\022\037\n" + - "\033TYPE_GLOBAL_ROLLBACK_RESULT\020\n\022\026\n\022TYPE_G" + - "LOBAL_STATUS\020\017\022\035\n\031TYPE_GLOBAL_STATUS_RES" + - "ULT\020\020\022\026\n\022TYPE_GLOBAL_REPORT\020\021\022\035\n\031TYPE_GL" + - "OBAL_REPORT_RESULT\020\022\022\032\n\026TYPE_GLOBAL_LOCK" + - "_QUERY\020\025\022!\n\035TYPE_GLOBAL_LOCK_QUERY_RESUL" + - "T\020\026\022\026\n\022TYPE_BRANCH_COMMIT\020\003\022\035\n\031TYPE_BRAN" + - "CH_COMMIT_RESULT\020\004\022\030\n\024TYPE_BRANCH_ROLLBA" + - "CK\020\005\022\037\n\033TYPE_BRANCH_ROLLBACK_RESULT\020\006\022\030\n" + - "\024TYPE_BRANCH_REGISTER\020\013\022\037\n\033TYPE_BRANCH_R" + - "EGISTER_RESULT\020\014\022\035\n\031TYPE_BRANCH_STATUS_R" + - "EPORT\020\r\022$\n TYPE_BRANCH_STATUS_REPORT_RES" + - "ULT\020\016\022\024\n\020TYPE_SEATA_MERGE\020;\022\033\n\027TYPE_SEAT" + - "A_MERGE_RESULT\020<\022\020\n\014TYPE_REG_CLT\020e\022\027\n\023TY" + - "PE_REG_CLT_RESULT\020f\022\017\n\013TYPE_REG_RM\020g\022\026\n\022" + - "TYPE_REG_RM_RESULT\020h\022\030\n\024TYPE_UNDO_LOG_DE" + - "LETE\020o\022\031\n\025TYPE_BATCH_RESULT_MSG\020yBD\n3org" + - ".apache.seata.core.serializer.protobuf.g" + - "eneratedB\013MessageTypeP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageTypeProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageTypeProto.java deleted file mode 100644 index 3a4617142eb..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/MessageTypeProto.java +++ /dev/null @@ -1,620 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: messageType.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code org.apache.seata.protocol.protobuf.MessageTypeProto} - */ -public enum MessageTypeProto - implements com.google.protobuf.ProtocolMessageEnum { - /** - * TYPE_GLOBAL_PRESERVED = 0; - */ - TYPE_GLOBAL_PRESERVED(0), - /** - * TYPE_GLOBAL_BEGIN = 1; - */ - TYPE_GLOBAL_BEGIN(1), - /** - * TYPE_GLOBAL_BEGIN_RESULT = 2; - */ - TYPE_GLOBAL_BEGIN_RESULT(2), - /** - *
-   **
-   * The constant TYPE_GLOBAL_COMMIT.
-   * 
- * - * TYPE_GLOBAL_COMMIT = 7; - */ - TYPE_GLOBAL_COMMIT(7), - /** - *
-   **
-   * The constant TYPE_GLOBAL_COMMIT_RESULT.
-   * 
- * - * TYPE_GLOBAL_COMMIT_RESULT = 8; - */ - TYPE_GLOBAL_COMMIT_RESULT(8), - /** - *
-   **
-   * The constant TYPE_GLOBAL_ROLLBACK.
-   * 
- * - * TYPE_GLOBAL_ROLLBACK = 9; - */ - TYPE_GLOBAL_ROLLBACK(9), - /** - *
-   **
-   * The constant TYPE_GLOBAL_ROLLBACK_RESULT.
-   * 
- * - * TYPE_GLOBAL_ROLLBACK_RESULT = 10; - */ - TYPE_GLOBAL_ROLLBACK_RESULT(10), - /** - *
-   **
-   * The constant TYPE_GLOBAL_STATUS.
-   * 
- * - * TYPE_GLOBAL_STATUS = 15; - */ - TYPE_GLOBAL_STATUS(15), - /** - *
-   **
-   * The constant TYPE_GLOBAL_STATUS_RESULT.
-   * 
- * - * TYPE_GLOBAL_STATUS_RESULT = 16; - */ - TYPE_GLOBAL_STATUS_RESULT(16), - /** - *
-   **
-   * The constant TYPE_GLOBAL_REPORT.
-   * 
- * - * TYPE_GLOBAL_REPORT = 17; - */ - TYPE_GLOBAL_REPORT(17), - /** - *
-   **
-   * The constant TYPE_GLOBAL_REPORT_RESULT.
-   * 
- * - * TYPE_GLOBAL_REPORT_RESULT = 18; - */ - TYPE_GLOBAL_REPORT_RESULT(18), - /** - *
-   **
-   * The constant TYPE_GLOBAL_LOCK_QUERY.
-   * 
- * - * TYPE_GLOBAL_LOCK_QUERY = 21; - */ - TYPE_GLOBAL_LOCK_QUERY(21), - /** - *
-   **
-   * The constant TYPE_GLOBAL_LOCK_QUERY_RESULT.
-   * 
- * - * TYPE_GLOBAL_LOCK_QUERY_RESULT = 22; - */ - TYPE_GLOBAL_LOCK_QUERY_RESULT(22), - /** - *
-   **
-   * The constant TYPE_BRANCH_COMMIT.
-   * 
- * - * TYPE_BRANCH_COMMIT = 3; - */ - TYPE_BRANCH_COMMIT(3), - /** - *
-   **
-   * The constant TYPE_BRANCH_COMMIT_RESULT.
-   * 
- * - * TYPE_BRANCH_COMMIT_RESULT = 4; - */ - TYPE_BRANCH_COMMIT_RESULT(4), - /** - *
-   **
-   * The constant TYPE_BRANCH_ROLLBACK.
-   * 
- * - * TYPE_BRANCH_ROLLBACK = 5; - */ - TYPE_BRANCH_ROLLBACK(5), - /** - *
-   **
-   * The constant TYPE_BRANCH_ROLLBACK_RESULT.
-   * 
- * - * TYPE_BRANCH_ROLLBACK_RESULT = 6; - */ - TYPE_BRANCH_ROLLBACK_RESULT(6), - /** - *
-   **
-   * The constant TYPE_BRANCH_REGISTER.
-   * 
- * - * TYPE_BRANCH_REGISTER = 11; - */ - TYPE_BRANCH_REGISTER(11), - /** - *
-   **
-   * The constant TYPE_BRANCH_REGISTER_RESULT.
-   * 
- * - * TYPE_BRANCH_REGISTER_RESULT = 12; - */ - TYPE_BRANCH_REGISTER_RESULT(12), - /** - *
-   **
-   * The constant TYPE_BRANCH_STATUS_REPORT.
-   * 
- * - * TYPE_BRANCH_STATUS_REPORT = 13; - */ - TYPE_BRANCH_STATUS_REPORT(13), - /** - *
-   **
-   * The constant TYPE_BRANCH_STATUS_REPORT_RESULT.
-   * 
- * - * TYPE_BRANCH_STATUS_REPORT_RESULT = 14; - */ - TYPE_BRANCH_STATUS_REPORT_RESULT(14), - /** - *
-   **
-   * The constant TYPE_SEATA_MERGE.
-   * 
- * - * TYPE_SEATA_MERGE = 59; - */ - TYPE_SEATA_MERGE(59), - /** - *
-   **
-   * The constant TYPE_SEATA_MERGE_RESULT.
-   * 
- * - * TYPE_SEATA_MERGE_RESULT = 60; - */ - TYPE_SEATA_MERGE_RESULT(60), - /** - *
-   **
-   * The constant TYPE_REG_CLT.
-   * 
- * - * TYPE_REG_CLT = 101; - */ - TYPE_REG_CLT(101), - /** - *
-   **
-   * The constant TYPE_REG_CLT_RESULT.
-   * 
- * - * TYPE_REG_CLT_RESULT = 102; - */ - TYPE_REG_CLT_RESULT(102), - /** - *
-   **
-   * The constant TYPE_REG_RM.
-   * 
- * - * TYPE_REG_RM = 103; - */ - TYPE_REG_RM(103), - /** - *
-   **
-   * The constant TYPE_REG_RM_RESULT.
-   * 
- * - * TYPE_REG_RM_RESULT = 104; - */ - TYPE_REG_RM_RESULT(104), - /** - *
-   **
-   * The constant TYPE_UNDO_LOG_DELETE.
-   * 
- * - * TYPE_UNDO_LOG_DELETE = 111; - */ - TYPE_UNDO_LOG_DELETE(111), - /** - *
-   **
-   * the constant TYPE_BATCH_RESULT_MSG
-   * 
- * - * TYPE_BATCH_RESULT_MSG = 121; - */ - TYPE_BATCH_RESULT_MSG(121), - UNRECOGNIZED(-1), - ; - - /** - * TYPE_GLOBAL_PRESERVED = 0; - */ - public static final int TYPE_GLOBAL_PRESERVED_VALUE = 0; - /** - * TYPE_GLOBAL_BEGIN = 1; - */ - public static final int TYPE_GLOBAL_BEGIN_VALUE = 1; - /** - * TYPE_GLOBAL_BEGIN_RESULT = 2; - */ - public static final int TYPE_GLOBAL_BEGIN_RESULT_VALUE = 2; - /** - *
-   **
-   * The constant TYPE_GLOBAL_COMMIT.
-   * 
- * - * TYPE_GLOBAL_COMMIT = 7; - */ - public static final int TYPE_GLOBAL_COMMIT_VALUE = 7; - /** - *
-   **
-   * The constant TYPE_GLOBAL_COMMIT_RESULT.
-   * 
- * - * TYPE_GLOBAL_COMMIT_RESULT = 8; - */ - public static final int TYPE_GLOBAL_COMMIT_RESULT_VALUE = 8; - /** - *
-   **
-   * The constant TYPE_GLOBAL_ROLLBACK.
-   * 
- * - * TYPE_GLOBAL_ROLLBACK = 9; - */ - public static final int TYPE_GLOBAL_ROLLBACK_VALUE = 9; - /** - *
-   **
-   * The constant TYPE_GLOBAL_ROLLBACK_RESULT.
-   * 
- * - * TYPE_GLOBAL_ROLLBACK_RESULT = 10; - */ - public static final int TYPE_GLOBAL_ROLLBACK_RESULT_VALUE = 10; - /** - *
-   **
-   * The constant TYPE_GLOBAL_STATUS.
-   * 
- * - * TYPE_GLOBAL_STATUS = 15; - */ - public static final int TYPE_GLOBAL_STATUS_VALUE = 15; - /** - *
-   **
-   * The constant TYPE_GLOBAL_STATUS_RESULT.
-   * 
- * - * TYPE_GLOBAL_STATUS_RESULT = 16; - */ - public static final int TYPE_GLOBAL_STATUS_RESULT_VALUE = 16; - /** - *
-   **
-   * The constant TYPE_GLOBAL_REPORT.
-   * 
- * - * TYPE_GLOBAL_REPORT = 17; - */ - public static final int TYPE_GLOBAL_REPORT_VALUE = 17; - /** - *
-   **
-   * The constant TYPE_GLOBAL_REPORT_RESULT.
-   * 
- * - * TYPE_GLOBAL_REPORT_RESULT = 18; - */ - public static final int TYPE_GLOBAL_REPORT_RESULT_VALUE = 18; - /** - *
-   **
-   * The constant TYPE_GLOBAL_LOCK_QUERY.
-   * 
- * - * TYPE_GLOBAL_LOCK_QUERY = 21; - */ - public static final int TYPE_GLOBAL_LOCK_QUERY_VALUE = 21; - /** - *
-   **
-   * The constant TYPE_GLOBAL_LOCK_QUERY_RESULT.
-   * 
- * - * TYPE_GLOBAL_LOCK_QUERY_RESULT = 22; - */ - public static final int TYPE_GLOBAL_LOCK_QUERY_RESULT_VALUE = 22; - /** - *
-   **
-   * The constant TYPE_BRANCH_COMMIT.
-   * 
- * - * TYPE_BRANCH_COMMIT = 3; - */ - public static final int TYPE_BRANCH_COMMIT_VALUE = 3; - /** - *
-   **
-   * The constant TYPE_BRANCH_COMMIT_RESULT.
-   * 
- * - * TYPE_BRANCH_COMMIT_RESULT = 4; - */ - public static final int TYPE_BRANCH_COMMIT_RESULT_VALUE = 4; - /** - *
-   **
-   * The constant TYPE_BRANCH_ROLLBACK.
-   * 
- * - * TYPE_BRANCH_ROLLBACK = 5; - */ - public static final int TYPE_BRANCH_ROLLBACK_VALUE = 5; - /** - *
-   **
-   * The constant TYPE_BRANCH_ROLLBACK_RESULT.
-   * 
- * - * TYPE_BRANCH_ROLLBACK_RESULT = 6; - */ - public static final int TYPE_BRANCH_ROLLBACK_RESULT_VALUE = 6; - /** - *
-   **
-   * The constant TYPE_BRANCH_REGISTER.
-   * 
- * - * TYPE_BRANCH_REGISTER = 11; - */ - public static final int TYPE_BRANCH_REGISTER_VALUE = 11; - /** - *
-   **
-   * The constant TYPE_BRANCH_REGISTER_RESULT.
-   * 
- * - * TYPE_BRANCH_REGISTER_RESULT = 12; - */ - public static final int TYPE_BRANCH_REGISTER_RESULT_VALUE = 12; - /** - *
-   **
-   * The constant TYPE_BRANCH_STATUS_REPORT.
-   * 
- * - * TYPE_BRANCH_STATUS_REPORT = 13; - */ - public static final int TYPE_BRANCH_STATUS_REPORT_VALUE = 13; - /** - *
-   **
-   * The constant TYPE_BRANCH_STATUS_REPORT_RESULT.
-   * 
- * - * TYPE_BRANCH_STATUS_REPORT_RESULT = 14; - */ - public static final int TYPE_BRANCH_STATUS_REPORT_RESULT_VALUE = 14; - /** - *
-   **
-   * The constant TYPE_SEATA_MERGE.
-   * 
- * - * TYPE_SEATA_MERGE = 59; - */ - public static final int TYPE_SEATA_MERGE_VALUE = 59; - /** - *
-   **
-   * The constant TYPE_SEATA_MERGE_RESULT.
-   * 
- * - * TYPE_SEATA_MERGE_RESULT = 60; - */ - public static final int TYPE_SEATA_MERGE_RESULT_VALUE = 60; - /** - *
-   **
-   * The constant TYPE_REG_CLT.
-   * 
- * - * TYPE_REG_CLT = 101; - */ - public static final int TYPE_REG_CLT_VALUE = 101; - /** - *
-   **
-   * The constant TYPE_REG_CLT_RESULT.
-   * 
- * - * TYPE_REG_CLT_RESULT = 102; - */ - public static final int TYPE_REG_CLT_RESULT_VALUE = 102; - /** - *
-   **
-   * The constant TYPE_REG_RM.
-   * 
- * - * TYPE_REG_RM = 103; - */ - public static final int TYPE_REG_RM_VALUE = 103; - /** - *
-   **
-   * The constant TYPE_REG_RM_RESULT.
-   * 
- * - * TYPE_REG_RM_RESULT = 104; - */ - public static final int TYPE_REG_RM_RESULT_VALUE = 104; - /** - *
-   **
-   * The constant TYPE_UNDO_LOG_DELETE.
-   * 
- * - * TYPE_UNDO_LOG_DELETE = 111; - */ - public static final int TYPE_UNDO_LOG_DELETE_VALUE = 111; - /** - *
-   **
-   * the constant TYPE_BATCH_RESULT_MSG
-   * 
- * - * TYPE_BATCH_RESULT_MSG = 121; - */ - public static final int TYPE_BATCH_RESULT_MSG_VALUE = 121; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @Deprecated - public static MessageTypeProto valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MessageTypeProto forNumber(int value) { - switch (value) { - case 0: return TYPE_GLOBAL_PRESERVED; - case 1: return TYPE_GLOBAL_BEGIN; - case 2: return TYPE_GLOBAL_BEGIN_RESULT; - case 7: return TYPE_GLOBAL_COMMIT; - case 8: return TYPE_GLOBAL_COMMIT_RESULT; - case 9: return TYPE_GLOBAL_ROLLBACK; - case 10: return TYPE_GLOBAL_ROLLBACK_RESULT; - case 15: return TYPE_GLOBAL_STATUS; - case 16: return TYPE_GLOBAL_STATUS_RESULT; - case 17: return TYPE_GLOBAL_REPORT; - case 18: return TYPE_GLOBAL_REPORT_RESULT; - case 21: return TYPE_GLOBAL_LOCK_QUERY; - case 22: return TYPE_GLOBAL_LOCK_QUERY_RESULT; - case 3: return TYPE_BRANCH_COMMIT; - case 4: return TYPE_BRANCH_COMMIT_RESULT; - case 5: return TYPE_BRANCH_ROLLBACK; - case 6: return TYPE_BRANCH_ROLLBACK_RESULT; - case 11: return TYPE_BRANCH_REGISTER; - case 12: return TYPE_BRANCH_REGISTER_RESULT; - case 13: return TYPE_BRANCH_STATUS_REPORT; - case 14: return TYPE_BRANCH_STATUS_REPORT_RESULT; - case 59: return TYPE_SEATA_MERGE; - case 60: return TYPE_SEATA_MERGE_RESULT; - case 101: return TYPE_REG_CLT; - case 102: return TYPE_REG_CLT_RESULT; - case 103: return TYPE_REG_RM; - case 104: return TYPE_REG_RM_RESULT; - case 111: return TYPE_UNDO_LOG_DELETE; - case 121: return TYPE_BATCH_RESULT_MSG; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - MessageTypeProto> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MessageTypeProto findValueByNumber(int number) { - return MessageTypeProto.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return MessageType.getDescriptor().getEnumTypes().get(0); - } - - private static final MessageTypeProto[] VALUES = values(); - - public static MessageTypeProto valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MessageTypeProto(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.MessageTypeProto) -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequest.java deleted file mode 100644 index cf3c8ebcaa2..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequest.java +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class RegisterRMRequest { - private RegisterRMRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\027registerRMRequest.proto\022\"org.apache.se" + - "ata.protocol.protobuf\032\035abstractIdentifyR" + - "equest.proto\"\220\001\n\026RegisterRMRequestProto\022" + - "a\n\027abstractIdentifyRequest\030\001 \001(\0132@.org.a" + - "pache.seata.protocol.protobuf.AbstractId" + - "entifyRequestProto\022\023\n\013resourceIds\030\002 \001(\tB" + - "J\n3org.apache.seata.core.serializer.prot" + - "obuf.generatedB\021RegisterRMRequestP\001b\006pro" + - "to3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractIdentifyRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor, - new String[] { "AbstractIdentifyRequest", "ResourceIds", }); - AbstractIdentifyRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProto.java deleted file mode 100644 index 178cc220691..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProto.java +++ /dev/null @@ -1,755 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterRMRequestProto} - */ -public final class RegisterRMRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) - RegisterRMRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use RegisterRMRequestProto.newBuilder() to construct. - private RegisterRMRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RegisterRMRequestProto() { - resourceIds_ = ""; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new RegisterRMRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RegisterRMRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractIdentifyRequestProto.Builder subBuilder = null; - if (abstractIdentifyRequest_ != null) { - subBuilder = abstractIdentifyRequest_.toBuilder(); - } - abstractIdentifyRequest_ = input.readMessage(AbstractIdentifyRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractIdentifyRequest_); - abstractIdentifyRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - resourceIds_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - RegisterRMRequestProto.class, Builder.class); - } - - public static final int ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER = 1; - private AbstractIdentifyRequestProto abstractIdentifyRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return Whether the abstractIdentifyRequest field is set. - */ - @Override - public boolean hasAbstractIdentifyRequest() { - return abstractIdentifyRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return The abstractIdentifyRequest. - */ - @Override - public AbstractIdentifyRequestProto getAbstractIdentifyRequest() { - return abstractIdentifyRequest_ == null ? AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - @Override - public AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { - return getAbstractIdentifyRequest(); - } - - public static final int RESOURCEIDS_FIELD_NUMBER = 2; - private volatile Object resourceIds_; - /** - * string resourceIds = 2; - * @return The resourceIds. - */ - @Override - public String getResourceIds() { - Object ref = resourceIds_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceIds_ = s; - return s; - } - } - /** - * string resourceIds = 2; - * @return The bytes for resourceIds. - */ - @Override - public com.google.protobuf.ByteString - getResourceIdsBytes() { - Object ref = resourceIds_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceIds_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractIdentifyRequest_ != null) { - output.writeMessage(1, getAbstractIdentifyRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceIds_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceIds_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractIdentifyRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractIdentifyRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceIds_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceIds_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof RegisterRMRequestProto)) { - return super.equals(obj); - } - RegisterRMRequestProto other = (RegisterRMRequestProto) obj; - - if (hasAbstractIdentifyRequest() != other.hasAbstractIdentifyRequest()) return false; - if (hasAbstractIdentifyRequest()) { - if (!getAbstractIdentifyRequest() - .equals(other.getAbstractIdentifyRequest())) return false; - } - if (!getResourceIds() - .equals(other.getResourceIds())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractIdentifyRequest()) { - hash = (37 * hash) + ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractIdentifyRequest().hashCode(); - } - hash = (37 * hash) + RESOURCEIDS_FIELD_NUMBER; - hash = (53 * hash) + getResourceIds().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static RegisterRMRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterRMRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterRMRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterRMRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterRMRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterRMRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterRMRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static RegisterRMRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static RegisterRMRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static RegisterRMRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static RegisterRMRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static RegisterRMRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(RegisterRMRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterRMRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) - RegisterRMRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - RegisterRMRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.RegisterRMRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = null; - } else { - abstractIdentifyRequest_ = null; - abstractIdentifyRequestBuilder_ = null; - } - resourceIds_ = ""; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return RegisterRMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; - } - - @Override - public RegisterRMRequestProto getDefaultInstanceForType() { - return RegisterRMRequestProto.getDefaultInstance(); - } - - @Override - public RegisterRMRequestProto build() { - RegisterRMRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public RegisterRMRequestProto buildPartial() { - RegisterRMRequestProto result = new RegisterRMRequestProto(this); - if (abstractIdentifyRequestBuilder_ == null) { - result.abstractIdentifyRequest_ = abstractIdentifyRequest_; - } else { - result.abstractIdentifyRequest_ = abstractIdentifyRequestBuilder_.build(); - } - result.resourceIds_ = resourceIds_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof RegisterRMRequestProto) { - return mergeFrom((RegisterRMRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(RegisterRMRequestProto other) { - if (other == RegisterRMRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractIdentifyRequest()) { - mergeAbstractIdentifyRequest(other.getAbstractIdentifyRequest()); - } - if (!other.getResourceIds().isEmpty()) { - resourceIds_ = other.resourceIds_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - RegisterRMRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (RegisterRMRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractIdentifyRequestProto abstractIdentifyRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder> abstractIdentifyRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return Whether the abstractIdentifyRequest field is set. - */ - public boolean hasAbstractIdentifyRequest() { - return abstractIdentifyRequestBuilder_ != null || abstractIdentifyRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return The abstractIdentifyRequest. - */ - public AbstractIdentifyRequestProto getAbstractIdentifyRequest() { - if (abstractIdentifyRequestBuilder_ == null) { - return abstractIdentifyRequest_ == null ? AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } else { - return abstractIdentifyRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder setAbstractIdentifyRequest(AbstractIdentifyRequestProto value) { - if (abstractIdentifyRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractIdentifyRequest_ = value; - onChanged(); - } else { - abstractIdentifyRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder setAbstractIdentifyRequest( - AbstractIdentifyRequestProto.Builder builderForValue) { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractIdentifyRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder mergeAbstractIdentifyRequest(AbstractIdentifyRequestProto value) { - if (abstractIdentifyRequestBuilder_ == null) { - if (abstractIdentifyRequest_ != null) { - abstractIdentifyRequest_ = - AbstractIdentifyRequestProto.newBuilder(abstractIdentifyRequest_).mergeFrom(value).buildPartial(); - } else { - abstractIdentifyRequest_ = value; - } - onChanged(); - } else { - abstractIdentifyRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder clearAbstractIdentifyRequest() { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = null; - onChanged(); - } else { - abstractIdentifyRequest_ = null; - abstractIdentifyRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public AbstractIdentifyRequestProto.Builder getAbstractIdentifyRequestBuilder() { - - onChanged(); - return getAbstractIdentifyRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { - if (abstractIdentifyRequestBuilder_ != null) { - return abstractIdentifyRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractIdentifyRequest_ == null ? - AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder> - getAbstractIdentifyRequestFieldBuilder() { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder>( - getAbstractIdentifyRequest(), - getParentForChildren(), - isClean()); - abstractIdentifyRequest_ = null; - } - return abstractIdentifyRequestBuilder_; - } - - private Object resourceIds_ = ""; - /** - * string resourceIds = 2; - * @return The resourceIds. - */ - public String getResourceIds() { - Object ref = resourceIds_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceIds_ = s; - return s; - } else { - return (String) ref; - } - } - /** - * string resourceIds = 2; - * @return The bytes for resourceIds. - */ - public com.google.protobuf.ByteString - getResourceIdsBytes() { - Object ref = resourceIds_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceIds_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resourceIds = 2; - * @param value The resourceIds to set. - * @return This builder for chaining. - */ - public Builder setResourceIds( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceIds_ = value; - onChanged(); - return this; - } - /** - * string resourceIds = 2; - * @return This builder for chaining. - */ - public Builder clearResourceIds() { - - resourceIds_ = getDefaultInstance().getResourceIds(); - onChanged(); - return this; - } - /** - * string resourceIds = 2; - * @param value The bytes for resourceIds to set. - * @return This builder for chaining. - */ - public Builder setResourceIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceIds_ = value; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) - private static final RegisterRMRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new RegisterRMRequestProto(); - } - - public static RegisterRMRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public RegisterRMRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RegisterRMRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public RegisterRMRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProtoOrBuilder.java deleted file mode 100644 index 087969c347a..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMRequestProtoOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface RegisterRMRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.RegisterRMRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return Whether the abstractIdentifyRequest field is set. - */ - boolean hasAbstractIdentifyRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return The abstractIdentifyRequest. - */ - AbstractIdentifyRequestProto getAbstractIdentifyRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder(); - - /** - * string resourceIds = 2; - * @return The resourceIds. - */ - String getResourceIds(); - /** - * string resourceIds = 2; - * @return The bytes for resourceIds. - */ - com.google.protobuf.ByteString - getResourceIdsBytes(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponse.java deleted file mode 100644 index f05fef75ab9..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class RegisterRMResponse { - private RegisterRMResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\030registerRMResponse.proto\022\"org.apache.s" + - "eata.protocol.protobuf\032\036abstractIdentify" + - "Response.proto\"~\n\027RegisterRMResponseProt" + - "o\022c\n\030abstractIdentifyResponse\030\001 \001(\0132A.or" + - "g.apache.seata.protocol.protobuf.Abstrac" + - "tIdentifyResponseProtoBK\n3org.apache.sea" + - "ta.core.serializer.protobuf.generatedB\022R" + - "egisterRMResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractIdentifyResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor, - new String[] { "AbstractIdentifyResponse", }); - AbstractIdentifyResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProto.java deleted file mode 100644 index 1d1be68a69d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProto.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterRMResponseProto} - */ -public final class RegisterRMResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) - RegisterRMResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use RegisterRMResponseProto.newBuilder() to construct. - private RegisterRMResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RegisterRMResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new RegisterRMResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RegisterRMResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractIdentifyResponseProto.Builder subBuilder = null; - if (abstractIdentifyResponse_ != null) { - subBuilder = abstractIdentifyResponse_.toBuilder(); - } - abstractIdentifyResponse_ = input.readMessage(AbstractIdentifyResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractIdentifyResponse_); - abstractIdentifyResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - RegisterRMResponseProto.class, Builder.class); - } - - public static final int ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER = 1; - private AbstractIdentifyResponseProto abstractIdentifyResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return Whether the abstractIdentifyResponse field is set. - */ - @Override - public boolean hasAbstractIdentifyResponse() { - return abstractIdentifyResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return The abstractIdentifyResponse. - */ - @Override - public AbstractIdentifyResponseProto getAbstractIdentifyResponse() { - return abstractIdentifyResponse_ == null ? AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - @Override - public AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { - return getAbstractIdentifyResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractIdentifyResponse_ != null) { - output.writeMessage(1, getAbstractIdentifyResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractIdentifyResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractIdentifyResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof RegisterRMResponseProto)) { - return super.equals(obj); - } - RegisterRMResponseProto other = (RegisterRMResponseProto) obj; - - if (hasAbstractIdentifyResponse() != other.hasAbstractIdentifyResponse()) return false; - if (hasAbstractIdentifyResponse()) { - if (!getAbstractIdentifyResponse() - .equals(other.getAbstractIdentifyResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractIdentifyResponse()) { - hash = (37 * hash) + ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractIdentifyResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static RegisterRMResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterRMResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterRMResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterRMResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterRMResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterRMResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterRMResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static RegisterRMResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static RegisterRMResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static RegisterRMResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static RegisterRMResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static RegisterRMResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(RegisterRMResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterRMResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) - RegisterRMResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - RegisterRMResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.RegisterRMResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = null; - } else { - abstractIdentifyResponse_ = null; - abstractIdentifyResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return RegisterRMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; - } - - @Override - public RegisterRMResponseProto getDefaultInstanceForType() { - return RegisterRMResponseProto.getDefaultInstance(); - } - - @Override - public RegisterRMResponseProto build() { - RegisterRMResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public RegisterRMResponseProto buildPartial() { - RegisterRMResponseProto result = new RegisterRMResponseProto(this); - if (abstractIdentifyResponseBuilder_ == null) { - result.abstractIdentifyResponse_ = abstractIdentifyResponse_; - } else { - result.abstractIdentifyResponse_ = abstractIdentifyResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof RegisterRMResponseProto) { - return mergeFrom((RegisterRMResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(RegisterRMResponseProto other) { - if (other == RegisterRMResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractIdentifyResponse()) { - mergeAbstractIdentifyResponse(other.getAbstractIdentifyResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - RegisterRMResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (RegisterRMResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractIdentifyResponseProto abstractIdentifyResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder> abstractIdentifyResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return Whether the abstractIdentifyResponse field is set. - */ - public boolean hasAbstractIdentifyResponse() { - return abstractIdentifyResponseBuilder_ != null || abstractIdentifyResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return The abstractIdentifyResponse. - */ - public AbstractIdentifyResponseProto getAbstractIdentifyResponse() { - if (abstractIdentifyResponseBuilder_ == null) { - return abstractIdentifyResponse_ == null ? AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } else { - return abstractIdentifyResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder setAbstractIdentifyResponse(AbstractIdentifyResponseProto value) { - if (abstractIdentifyResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractIdentifyResponse_ = value; - onChanged(); - } else { - abstractIdentifyResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder setAbstractIdentifyResponse( - AbstractIdentifyResponseProto.Builder builderForValue) { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractIdentifyResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder mergeAbstractIdentifyResponse(AbstractIdentifyResponseProto value) { - if (abstractIdentifyResponseBuilder_ == null) { - if (abstractIdentifyResponse_ != null) { - abstractIdentifyResponse_ = - AbstractIdentifyResponseProto.newBuilder(abstractIdentifyResponse_).mergeFrom(value).buildPartial(); - } else { - abstractIdentifyResponse_ = value; - } - onChanged(); - } else { - abstractIdentifyResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder clearAbstractIdentifyResponse() { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = null; - onChanged(); - } else { - abstractIdentifyResponse_ = null; - abstractIdentifyResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public AbstractIdentifyResponseProto.Builder getAbstractIdentifyResponseBuilder() { - - onChanged(); - return getAbstractIdentifyResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { - if (abstractIdentifyResponseBuilder_ != null) { - return abstractIdentifyResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractIdentifyResponse_ == null ? - AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder> - getAbstractIdentifyResponseFieldBuilder() { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder>( - getAbstractIdentifyResponse(), - getParentForChildren(), - isClean()); - abstractIdentifyResponse_ = null; - } - return abstractIdentifyResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) - private static final RegisterRMResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new RegisterRMResponseProto(); - } - - public static RegisterRMResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public RegisterRMResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RegisterRMResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public RegisterRMResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProtoOrBuilder.java deleted file mode 100644 index a1c45cc5375..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterRMResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface RegisterRMResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.RegisterRMResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return Whether the abstractIdentifyResponse field is set. - */ - boolean hasAbstractIdentifyResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return The abstractIdentifyResponse. - */ - AbstractIdentifyResponseProto getAbstractIdentifyResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequest.java deleted file mode 100644 index c7eb423de4b..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class RegisterTMRequest { - private RegisterTMRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\027registerTMRequest.proto\022\"org.apache.se" + - "ata.protocol.protobuf\032\035abstractIdentifyR" + - "equest.proto\"{\n\026RegisterTMRequestProto\022a" + - "\n\027abstractIdentifyRequest\030\001 \001(\0132@.org.ap" + - "ache.seata.protocol.protobuf.AbstractIde" + - "ntifyRequestProtoBJ\n3org.apache.seata.co" + - "re.serializer.protobuf.generatedB\021Regist" + - "erTMRequestP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractIdentifyRequest.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor, - new String[] { "AbstractIdentifyRequest", }); - AbstractIdentifyRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProto.java deleted file mode 100644 index a70a66f1e54..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProto.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterTMRequestProto} - */ -public final class RegisterTMRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) - RegisterTMRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use RegisterTMRequestProto.newBuilder() to construct. - private RegisterTMRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RegisterTMRequestProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new RegisterTMRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RegisterTMRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractIdentifyRequestProto.Builder subBuilder = null; - if (abstractIdentifyRequest_ != null) { - subBuilder = abstractIdentifyRequest_.toBuilder(); - } - abstractIdentifyRequest_ = input.readMessage(AbstractIdentifyRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractIdentifyRequest_); - abstractIdentifyRequest_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - RegisterTMRequestProto.class, Builder.class); - } - - public static final int ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER = 1; - private AbstractIdentifyRequestProto abstractIdentifyRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return Whether the abstractIdentifyRequest field is set. - */ - @Override - public boolean hasAbstractIdentifyRequest() { - return abstractIdentifyRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return The abstractIdentifyRequest. - */ - @Override - public AbstractIdentifyRequestProto getAbstractIdentifyRequest() { - return abstractIdentifyRequest_ == null ? AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - @Override - public AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { - return getAbstractIdentifyRequest(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractIdentifyRequest_ != null) { - output.writeMessage(1, getAbstractIdentifyRequest()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractIdentifyRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractIdentifyRequest()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof RegisterTMRequestProto)) { - return super.equals(obj); - } - RegisterTMRequestProto other = (RegisterTMRequestProto) obj; - - if (hasAbstractIdentifyRequest() != other.hasAbstractIdentifyRequest()) return false; - if (hasAbstractIdentifyRequest()) { - if (!getAbstractIdentifyRequest() - .equals(other.getAbstractIdentifyRequest())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractIdentifyRequest()) { - hash = (37 * hash) + ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractIdentifyRequest().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static RegisterTMRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterTMRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterTMRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterTMRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterTMRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterTMRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterTMRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static RegisterTMRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static RegisterTMRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static RegisterTMRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static RegisterTMRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static RegisterTMRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(RegisterTMRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterTMRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) - RegisterTMRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - RegisterTMRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = null; - } else { - abstractIdentifyRequest_ = null; - abstractIdentifyRequestBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return RegisterTMRequest.internal_static_org_apache_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; - } - - @Override - public RegisterTMRequestProto getDefaultInstanceForType() { - return RegisterTMRequestProto.getDefaultInstance(); - } - - @Override - public RegisterTMRequestProto build() { - RegisterTMRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public RegisterTMRequestProto buildPartial() { - RegisterTMRequestProto result = new RegisterTMRequestProto(this); - if (abstractIdentifyRequestBuilder_ == null) { - result.abstractIdentifyRequest_ = abstractIdentifyRequest_; - } else { - result.abstractIdentifyRequest_ = abstractIdentifyRequestBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof RegisterTMRequestProto) { - return mergeFrom((RegisterTMRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(RegisterTMRequestProto other) { - if (other == RegisterTMRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractIdentifyRequest()) { - mergeAbstractIdentifyRequest(other.getAbstractIdentifyRequest()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - RegisterTMRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (RegisterTMRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractIdentifyRequestProto abstractIdentifyRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder> abstractIdentifyRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return Whether the abstractIdentifyRequest field is set. - */ - public boolean hasAbstractIdentifyRequest() { - return abstractIdentifyRequestBuilder_ != null || abstractIdentifyRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return The abstractIdentifyRequest. - */ - public AbstractIdentifyRequestProto getAbstractIdentifyRequest() { - if (abstractIdentifyRequestBuilder_ == null) { - return abstractIdentifyRequest_ == null ? AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } else { - return abstractIdentifyRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder setAbstractIdentifyRequest(AbstractIdentifyRequestProto value) { - if (abstractIdentifyRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractIdentifyRequest_ = value; - onChanged(); - } else { - abstractIdentifyRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder setAbstractIdentifyRequest( - AbstractIdentifyRequestProto.Builder builderForValue) { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractIdentifyRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder mergeAbstractIdentifyRequest(AbstractIdentifyRequestProto value) { - if (abstractIdentifyRequestBuilder_ == null) { - if (abstractIdentifyRequest_ != null) { - abstractIdentifyRequest_ = - AbstractIdentifyRequestProto.newBuilder(abstractIdentifyRequest_).mergeFrom(value).buildPartial(); - } else { - abstractIdentifyRequest_ = value; - } - onChanged(); - } else { - abstractIdentifyRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder clearAbstractIdentifyRequest() { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = null; - onChanged(); - } else { - abstractIdentifyRequest_ = null; - abstractIdentifyRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public AbstractIdentifyRequestProto.Builder getAbstractIdentifyRequestBuilder() { - - onChanged(); - return getAbstractIdentifyRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { - if (abstractIdentifyRequestBuilder_ != null) { - return abstractIdentifyRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractIdentifyRequest_ == null ? - AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder> - getAbstractIdentifyRequestFieldBuilder() { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyRequestProto, AbstractIdentifyRequestProto.Builder, AbstractIdentifyRequestProtoOrBuilder>( - getAbstractIdentifyRequest(), - getParentForChildren(), - isClean()); - abstractIdentifyRequest_ = null; - } - return abstractIdentifyRequestBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) - private static final RegisterTMRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new RegisterTMRequestProto(); - } - - public static RegisterTMRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public RegisterTMRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RegisterTMRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public RegisterTMRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProtoOrBuilder.java deleted file mode 100644 index 0c2284ad14d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMRequestProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface RegisterTMRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.RegisterTMRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return Whether the abstractIdentifyRequest field is set. - */ - boolean hasAbstractIdentifyRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - * @return The abstractIdentifyRequest. - */ - AbstractIdentifyRequestProto getAbstractIdentifyRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponse.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponse.java deleted file mode 100644 index 08d8871964a..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class RegisterTMResponse { - private RegisterTMResponse() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\030registerTMResponse.proto\022\"org.apache.s" + - "eata.protocol.protobuf\032\036abstractIdentify" + - "Response.proto\"~\n\027RegisterTMResponseProt" + - "o\022c\n\030abstractIdentifyResponse\030\001 \001(\0132A.or" + - "g.apache.seata.protocol.protobuf.Abstrac" + - "tIdentifyResponseProtoBK\n3org.apache.sea" + - "ta.core.serializer.protobuf.generatedB\022R" + - "egisterTMResponseP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractIdentifyResponse.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor, - new String[] { "AbstractIdentifyResponse", }); - AbstractIdentifyResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProto.java deleted file mode 100644 index 341f8cdb824..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProto.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterTMResponseProto} - */ -public final class RegisterTMResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) - RegisterTMResponseProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use RegisterTMResponseProto.newBuilder() to construct. - private RegisterTMResponseProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RegisterTMResponseProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new RegisterTMResponseProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RegisterTMResponseProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractIdentifyResponseProto.Builder subBuilder = null; - if (abstractIdentifyResponse_ != null) { - subBuilder = abstractIdentifyResponse_.toBuilder(); - } - abstractIdentifyResponse_ = input.readMessage(AbstractIdentifyResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractIdentifyResponse_); - abstractIdentifyResponse_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - RegisterTMResponseProto.class, Builder.class); - } - - public static final int ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER = 1; - private AbstractIdentifyResponseProto abstractIdentifyResponse_; - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return Whether the abstractIdentifyResponse field is set. - */ - @Override - public boolean hasAbstractIdentifyResponse() { - return abstractIdentifyResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return The abstractIdentifyResponse. - */ - @Override - public AbstractIdentifyResponseProto getAbstractIdentifyResponse() { - return abstractIdentifyResponse_ == null ? AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - @Override - public AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { - return getAbstractIdentifyResponse(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractIdentifyResponse_ != null) { - output.writeMessage(1, getAbstractIdentifyResponse()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractIdentifyResponse_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractIdentifyResponse()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof RegisterTMResponseProto)) { - return super.equals(obj); - } - RegisterTMResponseProto other = (RegisterTMResponseProto) obj; - - if (hasAbstractIdentifyResponse() != other.hasAbstractIdentifyResponse()) return false; - if (hasAbstractIdentifyResponse()) { - if (!getAbstractIdentifyResponse() - .equals(other.getAbstractIdentifyResponse())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractIdentifyResponse()) { - hash = (37 * hash) + ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER; - hash = (53 * hash) + getAbstractIdentifyResponse().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static RegisterTMResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterTMResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterTMResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterTMResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterTMResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static RegisterTMResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static RegisterTMResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static RegisterTMResponseProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static RegisterTMResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static RegisterTMResponseProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static RegisterTMResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static RegisterTMResponseProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(RegisterTMResponseProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.RegisterTMResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) - RegisterTMResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - RegisterTMResponseProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.RegisterTMResponseProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = null; - } else { - abstractIdentifyResponse_ = null; - abstractIdentifyResponseBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return RegisterTMResponse.internal_static_org_apache_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; - } - - @Override - public RegisterTMResponseProto getDefaultInstanceForType() { - return RegisterTMResponseProto.getDefaultInstance(); - } - - @Override - public RegisterTMResponseProto build() { - RegisterTMResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public RegisterTMResponseProto buildPartial() { - RegisterTMResponseProto result = new RegisterTMResponseProto(this); - if (abstractIdentifyResponseBuilder_ == null) { - result.abstractIdentifyResponse_ = abstractIdentifyResponse_; - } else { - result.abstractIdentifyResponse_ = abstractIdentifyResponseBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof RegisterTMResponseProto) { - return mergeFrom((RegisterTMResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(RegisterTMResponseProto other) { - if (other == RegisterTMResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractIdentifyResponse()) { - mergeAbstractIdentifyResponse(other.getAbstractIdentifyResponse()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - RegisterTMResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (RegisterTMResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractIdentifyResponseProto abstractIdentifyResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder> abstractIdentifyResponseBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return Whether the abstractIdentifyResponse field is set. - */ - public boolean hasAbstractIdentifyResponse() { - return abstractIdentifyResponseBuilder_ != null || abstractIdentifyResponse_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return The abstractIdentifyResponse. - */ - public AbstractIdentifyResponseProto getAbstractIdentifyResponse() { - if (abstractIdentifyResponseBuilder_ == null) { - return abstractIdentifyResponse_ == null ? AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } else { - return abstractIdentifyResponseBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder setAbstractIdentifyResponse(AbstractIdentifyResponseProto value) { - if (abstractIdentifyResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractIdentifyResponse_ = value; - onChanged(); - } else { - abstractIdentifyResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder setAbstractIdentifyResponse( - AbstractIdentifyResponseProto.Builder builderForValue) { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractIdentifyResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder mergeAbstractIdentifyResponse(AbstractIdentifyResponseProto value) { - if (abstractIdentifyResponseBuilder_ == null) { - if (abstractIdentifyResponse_ != null) { - abstractIdentifyResponse_ = - AbstractIdentifyResponseProto.newBuilder(abstractIdentifyResponse_).mergeFrom(value).buildPartial(); - } else { - abstractIdentifyResponse_ = value; - } - onChanged(); - } else { - abstractIdentifyResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder clearAbstractIdentifyResponse() { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = null; - onChanged(); - } else { - abstractIdentifyResponse_ = null; - abstractIdentifyResponseBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public AbstractIdentifyResponseProto.Builder getAbstractIdentifyResponseBuilder() { - - onChanged(); - return getAbstractIdentifyResponseFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { - if (abstractIdentifyResponseBuilder_ != null) { - return abstractIdentifyResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractIdentifyResponse_ == null ? - AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder> - getAbstractIdentifyResponseFieldBuilder() { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractIdentifyResponseProto, AbstractIdentifyResponseProto.Builder, AbstractIdentifyResponseProtoOrBuilder>( - getAbstractIdentifyResponse(), - getParentForChildren(), - isClean()); - abstractIdentifyResponse_ = null; - } - return abstractIdentifyResponseBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) - private static final RegisterTMResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new RegisterTMResponseProto(); - } - - public static RegisterTMResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public RegisterTMResponseProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RegisterTMResponseProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public RegisterTMResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProtoOrBuilder.java deleted file mode 100644 index 0681423a25d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/RegisterTMResponseProtoOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMResponse.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface RegisterTMResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.RegisterTMResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return Whether the abstractIdentifyResponse field is set. - */ - boolean hasAbstractIdentifyResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - * @return The abstractIdentifyResponse. - */ - AbstractIdentifyResponseProto getAbstractIdentifyResponse(); - /** - * .org.apache.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCode.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCode.java deleted file mode 100644 index e0e672a4c1e..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCode.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: resultCode.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class ResultCode { - private ResultCode() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\020resultCode.proto\022\"org.apache.seata.pro" + - "tocol.protobuf**\n\017ResultCodeProto\022\n\n\006Fai" + - "led\020\000\022\013\n\007Success\020\001BC\n3org.apache.seata.c" + - "ore.serializer.protobuf.generatedB\nResul" + - "tCodeP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCodeProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCodeProto.java deleted file mode 100644 index e2a8ba7e049..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/ResultCodeProto.java +++ /dev/null @@ -1,117 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: resultCode.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code org.apache.seata.protocol.protobuf.ResultCodeProto} - */ -public enum ResultCodeProto - implements com.google.protobuf.ProtocolMessageEnum { - /** - * Failed = 0; - */ - Failed(0), - /** - * Success = 1; - */ - Success(1), - UNRECOGNIZED(-1), - ; - - /** - * Failed = 0; - */ - public static final int Failed_VALUE = 0; - /** - * Success = 1; - */ - public static final int Success_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @Deprecated - public static ResultCodeProto valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ResultCodeProto forNumber(int value) { - switch (value) { - case 0: return Failed; - case 1: return Success; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ResultCodeProto> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ResultCodeProto findValueByNumber(int number) { - return ResultCodeProto.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return ResultCode.getDescriptor().getEnumTypes().get(0); - } - - private static final ResultCodeProto[] VALUES = values(); - - public static ResultCodeProto valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ResultCodeProto(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.ResultCodeProto) -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCode.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCode.java deleted file mode 100644 index 6e97b12dead..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: transactionExceptionCode.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class TransactionExceptionCode { - private TransactionExceptionCode() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\036transactionExceptionCode.proto\022\"org.ap" + - "ache.seata.protocol.protobuf*\215\004\n\035Transac" + - "tionExceptionCodeProto\022\013\n\007Unknown\020\000\022\023\n\017L" + - "ockKeyConflict\020\001\022\006\n\002IO\020\002\022\"\n\036BranchRollba" + - "ckFailed_Retriable\020\003\022$\n BranchRollbackFa" + - "iled_Unretriable\020\004\022\030\n\024BranchRegisterFail" + - "ed\020\005\022\026\n\022BranchReportFailed\020\006\022\027\n\023Lockable" + - "CheckFailed\020\007\022\035\n\031BranchTransactionNotExi" + - "st\020\010\022\035\n\031GlobalTransactionNotExist\020\t\022\036\n\032G" + - "lobalTransactionNotActive\020\n\022\"\n\036GlobalTra" + - "nsactionStatusInvalid\020\013\022#\n\037FailedToSendB" + - "ranchCommitRequest\020\014\022%\n!FailedToSendBran" + - "chRollbackRequest\020\r\022\025\n\021FailedToAddBranch" + - "\020\016\022\037\n\033FailedLockGlobalTranscation\020\017\022\026\n\022F" + - "ailedWriteSession\020\020\022\017\n\013FailedStore\020\021BQ\n3" + - "org.apache.seata.core.serializer.protobu" + - "f.generatedB\030TransactionExceptionCodeP\001b" + - "\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCodeProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCodeProto.java deleted file mode 100644 index cd663ba4c4e..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/TransactionExceptionCodeProto.java +++ /dev/null @@ -1,381 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: transactionExceptionCode.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto} - */ -public enum TransactionExceptionCodeProto - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * 
- * - * Unknown = 0; - */ - Unknown(0), - /** - *
-   * 
- * - * LockKeyConflict = 1; - */ - LockKeyConflict(1), - /** - *
-   * 
- * - * IO = 2; - */ - IO(2), - /** - *
-   * 
- * - * BranchRollbackFailed_Retriable = 3; - */ - BranchRollbackFailed_Retriable(3), - /** - *
-   * 
- * - * BranchRollbackFailed_Unretriable = 4; - */ - BranchRollbackFailed_Unretriable(4), - /** - *
-   * 
- * - * BranchRegisterFailed = 5; - */ - BranchRegisterFailed(5), - /** - *
-   * 
- * - * BranchReportFailed = 6; - */ - BranchReportFailed(6), - /** - *
-   * 
- * - * LockableCheckFailed = 7; - */ - LockableCheckFailed(7), - /** - *
-   * 
- * - * BranchTransactionNotExist = 8; - */ - BranchTransactionNotExist(8), - /** - *
-   * 
- * - * GlobalTransactionNotExist = 9; - */ - GlobalTransactionNotExist(9), - /** - *
-   * 
- * - * GlobalTransactionNotActive = 10; - */ - GlobalTransactionNotActive(10), - /** - *
-   * 
- * - * GlobalTransactionStatusInvalid = 11; - */ - GlobalTransactionStatusInvalid(11), - /** - *
-   * 
- * - * FailedToSendBranchCommitRequest = 12; - */ - FailedToSendBranchCommitRequest(12), - /** - *
-   * 
- * - * FailedToSendBranchRollbackRequest = 13; - */ - FailedToSendBranchRollbackRequest(13), - /** - *
-   * 
- * - * FailedToAddBranch = 14; - */ - FailedToAddBranch(14), - /** - *
-   **
-   *  Failed to lock global transaction exception code.
-   * 
- * - * FailedLockGlobalTranscation = 15; - */ - FailedLockGlobalTranscation(15), - /** - *
-   **
-   * FailedWriteSession
-   * 
- * - * FailedWriteSession = 16; - */ - FailedWriteSession(16), - /** - *
-   **
-   * FailedStore
-   * 
- * - * FailedStore = 17; - */ - FailedStore(17), - UNRECOGNIZED(-1), - ; - - /** - *
-   * 
- * - * Unknown = 0; - */ - public static final int Unknown_VALUE = 0; - /** - *
-   * 
- * - * LockKeyConflict = 1; - */ - public static final int LockKeyConflict_VALUE = 1; - /** - *
-   * 
- * - * IO = 2; - */ - public static final int IO_VALUE = 2; - /** - *
-   * 
- * - * BranchRollbackFailed_Retriable = 3; - */ - public static final int BranchRollbackFailed_Retriable_VALUE = 3; - /** - *
-   * 
- * - * BranchRollbackFailed_Unretriable = 4; - */ - public static final int BranchRollbackFailed_Unretriable_VALUE = 4; - /** - *
-   * 
- * - * BranchRegisterFailed = 5; - */ - public static final int BranchRegisterFailed_VALUE = 5; - /** - *
-   * 
- * - * BranchReportFailed = 6; - */ - public static final int BranchReportFailed_VALUE = 6; - /** - *
-   * 
- * - * LockableCheckFailed = 7; - */ - public static final int LockableCheckFailed_VALUE = 7; - /** - *
-   * 
- * - * BranchTransactionNotExist = 8; - */ - public static final int BranchTransactionNotExist_VALUE = 8; - /** - *
-   * 
- * - * GlobalTransactionNotExist = 9; - */ - public static final int GlobalTransactionNotExist_VALUE = 9; - /** - *
-   * 
- * - * GlobalTransactionNotActive = 10; - */ - public static final int GlobalTransactionNotActive_VALUE = 10; - /** - *
-   * 
- * - * GlobalTransactionStatusInvalid = 11; - */ - public static final int GlobalTransactionStatusInvalid_VALUE = 11; - /** - *
-   * 
- * - * FailedToSendBranchCommitRequest = 12; - */ - public static final int FailedToSendBranchCommitRequest_VALUE = 12; - /** - *
-   * 
- * - * FailedToSendBranchRollbackRequest = 13; - */ - public static final int FailedToSendBranchRollbackRequest_VALUE = 13; - /** - *
-   * 
- * - * FailedToAddBranch = 14; - */ - public static final int FailedToAddBranch_VALUE = 14; - /** - *
-   **
-   *  Failed to lock global transaction exception code.
-   * 
- * - * FailedLockGlobalTranscation = 15; - */ - public static final int FailedLockGlobalTranscation_VALUE = 15; - /** - *
-   **
-   * FailedWriteSession
-   * 
- * - * FailedWriteSession = 16; - */ - public static final int FailedWriteSession_VALUE = 16; - /** - *
-   **
-   * FailedStore
-   * 
- * - * FailedStore = 17; - */ - public static final int FailedStore_VALUE = 17; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @Deprecated - public static TransactionExceptionCodeProto valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static TransactionExceptionCodeProto forNumber(int value) { - switch (value) { - case 0: return Unknown; - case 1: return LockKeyConflict; - case 2: return IO; - case 3: return BranchRollbackFailed_Retriable; - case 4: return BranchRollbackFailed_Unretriable; - case 5: return BranchRegisterFailed; - case 6: return BranchReportFailed; - case 7: return LockableCheckFailed; - case 8: return BranchTransactionNotExist; - case 9: return GlobalTransactionNotExist; - case 10: return GlobalTransactionNotActive; - case 11: return GlobalTransactionStatusInvalid; - case 12: return FailedToSendBranchCommitRequest; - case 13: return FailedToSendBranchRollbackRequest; - case 14: return FailedToAddBranch; - case 15: return FailedLockGlobalTranscation; - case 16: return FailedWriteSession; - case 17: return FailedStore; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - TransactionExceptionCodeProto> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TransactionExceptionCodeProto findValueByNumber(int number) { - return TransactionExceptionCodeProto.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return TransactionExceptionCode.getDescriptor().getEnumTypes().get(0); - } - - private static final TransactionExceptionCodeProto[] VALUES = values(); - - public static TransactionExceptionCodeProto valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private TransactionExceptionCodeProto(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.apache.seata.protocol.protobuf.TransactionExceptionCodeProto) -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequest.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequest.java deleted file mode 100644 index 526493de53d..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequest.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: undoLogDeleteRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public final class UndoLogDeleteRequest { - private UndoLogDeleteRequest() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\032undoLogDeleteRequest.proto\022\"org.apache" + - ".seata.protocol.protobuf\032 abstractTransa" + - "ctionRequest.proto\032\020branchType.proto\"\363\001\n" + - "\031UndoLogDeleteRequestProto\022g\n\032abstractTr" + - "ansactionRequest\030\001 \001(\0132C.org.apache.seat" + - "a.protocol.protobuf.AbstractTransactionR" + - "equestProto\022\022\n\nresourceId\030\002 \001(\t\022\020\n\010saveD" + - "ays\030\003 \001(\005\022G\n\nbranchType\030\004 \001(\01623.org.apac" + - "he.seata.protocol.protobuf.BranchTypePro" + - "toBM\n3org.apache.seata.core.serializer.p" + - "rotobuf.generatedB\024UndoLogDeleteRequestP" + - "\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - AbstractTransactionRequest.getDescriptor(), - BranchType.getDescriptor(), - }); - internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor, - new String[] { "AbstractTransactionRequest", "ResourceId", "SaveDays", "BranchType", }); - AbstractTransactionRequest.getDescriptor(); - BranchType.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProto.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProto.java deleted file mode 100644 index 5caeda30a70..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProto.java +++ /dev/null @@ -1,1005 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: undoLogDeleteRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto} - */ -public final class UndoLogDeleteRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) - UndoLogDeleteRequestProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use UndoLogDeleteRequestProto.newBuilder() to construct. - private UndoLogDeleteRequestProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UndoLogDeleteRequestProto() { - resourceId_ = ""; - branchType_ = 0; - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new UndoLogDeleteRequestProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UndoLogDeleteRequestProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - resourceId_ = s; - break; - } - case 24: { - - saveDays_ = input.readInt32(); - break; - } - case 32: { - int rawValue = input.readEnum(); - - branchType_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - UndoLogDeleteRequestProto.class, Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - @Override - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - @Override - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - @Override - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int RESOURCEID_FIELD_NUMBER = 2; - private volatile Object resourceId_; - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 2; - * @return The resourceId. - */ - @Override - public String getResourceId() { - Object ref = resourceId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } - } - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 2; - * @return The bytes for resourceId. - */ - @Override - public com.google.protobuf.ByteString - getResourceIdBytes() { - Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SAVEDAYS_FIELD_NUMBER = 3; - private int saveDays_; - /** - *
-   **
-   * The SaveDays data.
-   * 
- * - * int32 saveDays = 3; - * @return The saveDays. - */ - @Override - public int getSaveDays() { - return saveDays_; - } - - public static final int BRANCHTYPE_FIELD_NUMBER = 4; - private int branchType_; - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The enum numeric value on the wire for branchType. - */ - @Override public int getBranchTypeValue() { - return branchType_; - } - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The branchType. - */ - @Override public BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - BranchTypeProto result = BranchTypeProto.valueOf(branchType_); - return result == null ? BranchTypeProto.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceId_); - } - if (saveDays_ != 0) { - output.writeInt32(3, saveDays_); - } - if (branchType_ != BranchTypeProto.AT.getNumber()) { - output.writeEnum(4, branchType_); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (abstractTransactionRequest_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAbstractTransactionRequest()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceId_); - } - if (saveDays_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, saveDays_); - } - if (branchType_ != BranchTypeProto.AT.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, branchType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof UndoLogDeleteRequestProto)) { - return super.equals(obj); - } - UndoLogDeleteRequestProto other = (UndoLogDeleteRequestProto) obj; - - if (hasAbstractTransactionRequest() != other.hasAbstractTransactionRequest()) return false; - if (hasAbstractTransactionRequest()) { - if (!getAbstractTransactionRequest() - .equals(other.getAbstractTransactionRequest())) return false; - } - if (!getResourceId() - .equals(other.getResourceId())) return false; - if (getSaveDays() - != other.getSaveDays()) return false; - if (branchType_ != other.branchType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAbstractTransactionRequest()) { - hash = (37 * hash) + ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER; - hash = (53 * hash) + getAbstractTransactionRequest().hashCode(); - } - hash = (37 * hash) + RESOURCEID_FIELD_NUMBER; - hash = (53 * hash) + getResourceId().hashCode(); - hash = (37 * hash) + SAVEDAYS_FIELD_NUMBER; - hash = (53 * hash) + getSaveDays(); - hash = (37 * hash) + BRANCHTYPE_FIELD_NUMBER; - hash = (53 * hash) + branchType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static UndoLogDeleteRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static UndoLogDeleteRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static UndoLogDeleteRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static UndoLogDeleteRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static UndoLogDeleteRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static UndoLogDeleteRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static UndoLogDeleteRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static UndoLogDeleteRequestProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static UndoLogDeleteRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static UndoLogDeleteRequestProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static UndoLogDeleteRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static UndoLogDeleteRequestProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(UndoLogDeleteRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) - UndoLogDeleteRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; - } - - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - UndoLogDeleteRequestProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.serializer.protobuf.generated.UndoLogDeleteRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - resourceId_ = ""; - - saveDays_ = 0; - - branchType_ = 0; - - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return UndoLogDeleteRequest.internal_static_org_apache_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; - } - - @Override - public UndoLogDeleteRequestProto getDefaultInstanceForType() { - return UndoLogDeleteRequestProto.getDefaultInstance(); - } - - @Override - public UndoLogDeleteRequestProto build() { - UndoLogDeleteRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public UndoLogDeleteRequestProto buildPartial() { - UndoLogDeleteRequestProto result = new UndoLogDeleteRequestProto(this); - if (abstractTransactionRequestBuilder_ == null) { - result.abstractTransactionRequest_ = abstractTransactionRequest_; - } else { - result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); - } - result.resourceId_ = resourceId_; - result.saveDays_ = saveDays_; - result.branchType_ = branchType_; - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof UndoLogDeleteRequestProto) { - return mergeFrom((UndoLogDeleteRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(UndoLogDeleteRequestProto other) { - if (other == UndoLogDeleteRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionRequest()) { - mergeAbstractTransactionRequest(other.getAbstractTransactionRequest()); - } - if (!other.getResourceId().isEmpty()) { - resourceId_ = other.resourceId_; - onChanged(); - } - if (other.getSaveDays() != 0) { - setSaveDays(other.getSaveDays()); - } - if (other.branchType_ != 0) { - setBranchTypeValue(other.getBranchTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - UndoLogDeleteRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (UndoLogDeleteRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - public AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - AbstractTransactionRequestProto, AbstractTransactionRequestProto.Builder, AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private Object resourceId_ = ""; - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 2; - * @return The resourceId. - */ - public String getResourceId() { - Object ref = resourceId_; - if (!(ref instanceof String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } else { - return (String) ref; - } - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 2; - * @return The bytes for resourceId. - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 2; - * @param value The resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceId( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceId_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 2; - * @return This builder for chaining. - */ - public Builder clearResourceId() { - - resourceId_ = getDefaultInstance().getResourceId(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 2; - * @param value The bytes for resourceId to set. - * @return This builder for chaining. - */ - public Builder setResourceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceId_ = value; - onChanged(); - return this; - } - - private int saveDays_ ; - /** - *
-     **
-     * The SaveDays data.
-     * 
- * - * int32 saveDays = 3; - * @return The saveDays. - */ - @Override - public int getSaveDays() { - return saveDays_; - } - /** - *
-     **
-     * The SaveDays data.
-     * 
- * - * int32 saveDays = 3; - * @param value The saveDays to set. - * @return This builder for chaining. - */ - public Builder setSaveDays(int value) { - - saveDays_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The SaveDays data.
-     * 
- * - * int32 saveDays = 3; - * @return This builder for chaining. - */ - public Builder clearSaveDays() { - - saveDays_ = 0; - onChanged(); - return this; - } - - private int branchType_ = 0; - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The enum numeric value on the wire for branchType. - */ - @Override public int getBranchTypeValue() { - return branchType_; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @param value The enum numeric value on the wire for branchType to set. - * @return This builder for chaining. - */ - public Builder setBranchTypeValue(int value) { - - branchType_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The branchType. - */ - @Override - public BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - BranchTypeProto result = BranchTypeProto.valueOf(branchType_); - return result == null ? BranchTypeProto.UNRECOGNIZED : result; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @param value The branchType to set. - * @return This builder for chaining. - */ - public Builder setBranchType(BranchTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return This builder for chaining. - */ - public Builder clearBranchType() { - - branchType_ = 0; - onChanged(); - return this; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) - private static final UndoLogDeleteRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new UndoLogDeleteRequestProto(); - } - - public static UndoLogDeleteRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public UndoLogDeleteRequestProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UndoLogDeleteRequestProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public UndoLogDeleteRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java deleted file mode 100644 index 9799076d6cc..00000000000 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: undoLogDeleteRequest.proto - -package org.apache.seata.core.serializer.protobuf.generated; - -public interface UndoLogDeleteRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.protocol.protobuf.UndoLogDeleteRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return Whether the abstractTransactionRequest field is set. - */ - boolean hasAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - * @return The abstractTransactionRequest. - */ - AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .org.apache.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 2; - * @return The resourceId. - */ - String getResourceId(); - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 2; - * @return The bytes for resourceId. - */ - com.google.protobuf.ByteString - getResourceIdBytes(); - - /** - *
-   **
-   * The SaveDays data.
-   * 
- * - * int32 saveDays = 3; - * @return The saveDays. - */ - int getSaveDays(); - - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The enum numeric value on the wire for branchType. - */ - int getBranchTypeValue(); - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .org.apache.seata.protocol.protobuf.BranchTypeProto branchType = 4; - * @return The branchType. - */ - BranchTypeProto getBranchType(); -} diff --git a/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java b/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java deleted file mode 100644 index ff396ebee16..00000000000 --- a/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.core.serializer; - -import org.apache.seata.core.protocol.HeartbeatMessage; -import org.apache.seata.core.protocol.Version; -import org.apache.seata.core.protocol.transaction.AbstractBranchEndRequest; -import org.apache.seata.core.protocol.transaction.BranchCommitRequest; -import org.apache.seata.core.protocol.transaction.BranchCommitResponse; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - - -public class SerializerSecurityRegistryTest { - @Test - public void getAllowClassType() { - Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(Long.class)); - Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(Integer.class)); - Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(HeartbeatMessage.class)); - Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(BranchCommitRequest.class)); - Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(BranchCommitResponse.class)); - Assertions.assertFalse(SerializerSecurityRegistry.getAllowClassType().contains(AbstractBranchEndRequest.class)); - Assertions.assertFalse(SerializerSecurityRegistry.getAllowClassType().contains(Version.class)); - } - - @Test - public void getAllowClassPattern() { - Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(Long.class.getCanonicalName())); - Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(Integer.class.getCanonicalName())); - Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(HeartbeatMessage.class.getCanonicalName())); - Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(BranchCommitRequest.class.getCanonicalName())); - Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(BranchCommitResponse.class.getCanonicalName())); - Assertions.assertFalse(SerializerSecurityRegistry.getAllowClassPattern() - .contains(AbstractBranchEndRequest.class.getCanonicalName())); - Assertions.assertFalse( - SerializerSecurityRegistry.getAllowClassPattern().contains(Version.class.getCanonicalName())); - Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassPattern().contains("org.apache.seata.*")); - } -} diff --git a/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 57d4d691b1d..3964346fdc6 100644 --- a/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -179,7 +179,7 @@ { "name": "handle-as", "parameters": { - "target": "org.apache.seata.core.serializer.SerializerType" + "target": "org.apache.seata.serializer.SerializerType" } } ] diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java index ae0077ef309..a03af70027e 100644 --- a/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java +++ b/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java @@ -4,8 +4,8 @@ import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.stub.StreamObserver; -import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyRequestProto; +import org.apache.seata.serializer.protobuf.generated.RegisterTMRequestProto; import org.apache.seata.grpc.generated.GrpcMessageProto; import org.apache.seata.grpc.generated.SeataServiceGrpc; diff --git a/serializer/seata-serializer-protobuf/pom.xml b/serializer/seata-serializer-protobuf/pom.xml index 96c13b38873..d3117161ef8 100644 --- a/serializer/seata-serializer-protobuf/pom.xml +++ b/serializer/seata-serializer-protobuf/pom.xml @@ -55,7 +55,7 @@ org.xolstice.maven.plugins protobuf-maven-plugin - ../../core/src/main/resources/protobuf/org/apache/seata/protocol/transcation/ + ${project.basedir}/src/main/resources/protobuf/org/apache/seata/protocol/transcation/ com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java new file mode 100644 index 00000000000..d07cea8d4bf --- /dev/null +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java @@ -0,0 +1,44 @@ +package org.apache.seata.serializer.protobuf; + +import com.google.protobuf.Any; +import com.google.protobuf.Message; +import org.apache.seata.common.exception.ShouldNeverHappenException; +import org.apache.seata.common.loader.LoadLevel; +import org.apache.seata.core.serializer.Serializer; +import org.apache.seata.serializer.protobuf.convertor.PbConvertor; +import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; + +@LoadLevel(name = "GRPC") +public class GrpcSerializer implements Serializer { + @Override + public byte[] serialize(T t) { + PbConvertor pbConvertor = ProtobufConvertManager.getInstance() + .fetchConvertor(t.getClass().getName()); + Any grpcBody = Any.pack((Message) pbConvertor.convert2Proto(t)); + + return grpcBody.toByteArray(); + } + + @Override + public T deserialize(byte[] bytes) { + try { + Any body = Any.parseFrom(bytes); + final Class clazz = ProtobufConvertManager.getInstance().fetchProtoClass(getTypeNameFromTypeUrl(body.getTypeUrl())); + if (body.is(clazz)) { + Object ob = body.unpack(clazz); + PbConvertor pbConvertor = ProtobufConvertManager.getInstance().fetchReversedConvertor(clazz.getName()); + + return (T) pbConvertor.convert2Model(ob); + } + } catch (Throwable e) { + throw new ShouldNeverHappenException("GrpcSerializer deserialize error", e); + } + + return null; + } + + private String getTypeNameFromTypeUrl(String typeUri) { + int pos = typeUri.lastIndexOf('/'); + return pos == -1 ? "" : typeUri.substring(pos + 1); + } +} diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufHelper.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufHelper.java similarity index 98% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufHelper.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufHelper.java index eec464ca148..9989195e45b 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufHelper.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufHelper.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf; +package org.apache.seata.serializer.protobuf; import com.google.protobuf.MessageLite; import org.apache.seata.common.exception.ShouldNeverHappenException; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufInnerSerializer.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufInnerSerializer.java similarity index 98% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufInnerSerializer.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufInnerSerializer.java index fe973fe22f7..435295dc478 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufInnerSerializer.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufInnerSerializer.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf; +package org.apache.seata.serializer.protobuf; import org.apache.seata.common.exception.ShouldNeverHappenException; import org.apache.seata.common.util.CollectionUtils; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufSerializer.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufSerializer.java similarity index 94% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufSerializer.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufSerializer.java index 802de77d078..767baff3d7b 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/ProtobufSerializer.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/ProtobufSerializer.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf; +package org.apache.seata.serializer.protobuf; import java.nio.ByteBuffer; import java.nio.charset.Charset; @@ -25,8 +25,8 @@ import org.apache.seata.common.loader.LoadLevel; import org.apache.seata.common.util.BufferUtils; import org.apache.seata.core.serializer.Serializer; -import org.apache.seata.core.serializer.protobuf.convertor.PbConvertor; -import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.serializer.protobuf.convertor.PbConvertor; +import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; /** * The type Protobuf codec. diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BatchResultMessageConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertor.java similarity index 90% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BatchResultMessageConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertor.java index 2c3449eb9b3..397617b12c0 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BatchResultMessageConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import java.util.ArrayList; import java.util.List; @@ -25,10 +25,10 @@ import org.apache.seata.common.exception.ShouldNeverHappenException; import org.apache.seata.core.protocol.AbstractResultMessage; import org.apache.seata.core.protocol.BatchResultMessage; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.BatchResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.BatchResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; /** * The type batch result message protobuf convertor. diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertor.java similarity index 85% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertor.java index 34d366d28ac..41918760cce 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertor.java @@ -14,15 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.model.BranchType; -import org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchCommitRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractBranchEndRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchCommitRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.BranchCommitRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertor.java similarity index 83% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertor.java index 4b4c86328c6..62c49fcf594 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchCommitResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchCommitResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchStatusProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractBranchEndResponseProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchCommitResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchStatusProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.BranchCommitResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java similarity index 86% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java index 9a472322510..5212b1a8110 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchRegisterRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchRegisterRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java similarity index 83% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java index 73016a27088..2e507248248 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchRegisterResponseProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.BranchRegisterResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertor.java similarity index 85% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertor.java index 7e88962fcd1..29557dc4479 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchReportRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchStatusProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchReportRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchStatusProto; +import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchReportRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertor.java similarity index 82% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertor.java index 86673528b8a..ee36dab6f81 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchReportResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertor.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchReportResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchReportResponseProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.BranchReportResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java similarity index 85% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java index 3dc73b9c75f..14ff6f5f7c5 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertor.java @@ -14,15 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.model.BranchType; -import org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractBranchEndRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchRollbackRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.BranchRollbackRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java similarity index 83% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java index 9d8cbacf5b9..fc49341f788 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.core.serializer.protobuf.generated.AbstractBranchEndResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchStatusProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractBranchEndResponseProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchRollbackResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchStatusProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.BranchRollbackResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java similarity index 84% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java index e07ec61d447..599b191b46b 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalBeginRequestProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.GlobalBeginRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java similarity index 84% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java index b305edaefc0..f57bea7b2db 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertor.java @@ -14,15 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalBeginResponseProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.GlobalBeginResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java similarity index 83% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java index ae8ed39220b..58be1c15f6c 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalCommitRequestProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.GlobalCommitRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java similarity index 82% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java index 954798a4325..9a7d0bfe712 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalCommitResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.GlobalCommitResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java similarity index 85% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java index 2481478e33e..e4a6a927951 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchRegisterRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryRequestProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.GlobalLockQueryRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java similarity index 84% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java index c2a16ff87cd..1b12ce470a1 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertor.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryResponseProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.GlobalLockQueryResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportRequestConvertor.java similarity index 83% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportRequestConvertor.java index b41e35a3d35..ce6bd382fa6 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportRequestConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; - -import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalReportRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +package org.apache.seata.serializer.protobuf.convertor; + +import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalReportRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.transaction.GlobalReportRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportResponseConvertor.java similarity index 82% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportResponseConvertor.java index 9535828b108..fadc3d2b3ad 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalReportResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalReportResponseConvertor.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalReportResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalReportResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java similarity index 83% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java index 701d114e84a..fbe6fba9286 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalRollbackRequestProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.GlobalRollbackRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java similarity index 82% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java index 12aee7237f4..7659abe2058 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalRollbackResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.GlobalRollbackResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java similarity index 83% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java index a94ebb82693..deca92d824c 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusRequestProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; import org.apache.seata.core.protocol.transaction.GlobalStatusRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java similarity index 82% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java index c011e5a863d..b43bb336cd4 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertor.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; -import org.apache.seata.core.serializer.protobuf.generated.AbstractGlobalEndResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; -import org.apache.seata.core.serializer.protobuf.generated.TransactionExceptionCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusResponseProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.TransactionExceptionCodeProto; import org.apache.seata.core.protocol.transaction.GlobalStatusResponse; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/HeartbeatMessageConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertor.java similarity index 90% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/HeartbeatMessageConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertor.java index 0e23548fca8..3a35c8b2379 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/HeartbeatMessageConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertor.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.HeartbeatMessageProto; +import org.apache.seata.serializer.protobuf.generated.HeartbeatMessageProto; import org.apache.seata.core.protocol.HeartbeatMessage; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergeResultMessageConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertor.java similarity index 90% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergeResultMessageConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertor.java index 41dca016d3a..ecd1e951bc7 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergeResultMessageConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import java.util.ArrayList; import java.util.List; @@ -26,10 +26,10 @@ import org.apache.seata.core.protocol.AbstractMessage; import org.apache.seata.core.protocol.AbstractResultMessage; import org.apache.seata.core.protocol.MergeResultMessage; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MergedResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.MergedResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; public class MergeResultMessageConvertor implements PbConvertor { diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergedWarpMessageConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergedWarpMessageConvertor.java similarity index 89% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergedWarpMessageConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergedWarpMessageConvertor.java index 29b68ae5ccc..9e48d545df3 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/MergedWarpMessageConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/MergedWarpMessageConvertor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import java.util.ArrayList; import java.util.List; @@ -25,10 +25,10 @@ import org.apache.seata.common.exception.ShouldNeverHappenException; import org.apache.seata.core.protocol.AbstractMessage; import org.apache.seata.core.protocol.MergedWarpMessage; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MergedWarpMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.manager.ProtobufConvertManager; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.MergedWarpMessageProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; public class MergedWarpMessageConvertor implements PbConvertor { diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/PbConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/PbConvertor.java similarity index 93% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/PbConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/PbConvertor.java index dd3c9803026..6c28b996f0d 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/PbConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/PbConvertor.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; public interface PbConvertor { diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertor.java similarity index 87% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertor.java index 28a73507eef..dcab8ba0317 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertor.java @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterRMRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.RegisterRMRequestProto; import org.apache.seata.core.protocol.RegisterRMRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertor.java similarity index 86% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertor.java index be9a4f5ef28..f1c436f6a93 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterRMResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterRMResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyResponseProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.RegisterRMResponseProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; import org.apache.seata.core.protocol.RegisterRMResponse; import org.apache.seata.core.protocol.ResultCode; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertor.java similarity index 87% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertor.java index 6616acea9a7..f707a996377 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.protocol.RegisterTMRequest; -import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.RegisterTMRequestProto; public class RegisterTMRequestConvertor implements PbConvertor { diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMResponseConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertor.java similarity index 86% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMResponseConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertor.java index 3c97e7ba64e..54211055f12 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/RegisterTMResponseConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertor.java @@ -14,14 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractIdentifyResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterTMResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.ResultCodeProto; +import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyResponseProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.RegisterTMResponseProto; +import org.apache.seata.serializer.protobuf.generated.ResultCodeProto; import org.apache.seata.core.protocol.RegisterTMResponse; import org.apache.seata.core.protocol.ResultCode; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java similarity index 84% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java index d425bc5c008..c8a21d3e1b8 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertor.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.AbstractMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.AbstractTransactionRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.MessageTypeProto; -import org.apache.seata.core.serializer.protobuf.generated.UndoLogDeleteRequestProto; +import org.apache.seata.serializer.protobuf.generated.AbstractMessageProto; +import org.apache.seata.serializer.protobuf.generated.AbstractTransactionRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchTypeProto; +import org.apache.seata.serializer.protobuf.generated.MessageTypeProto; +import org.apache.seata.serializer.protobuf.generated.UndoLogDeleteRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.UndoLogDeleteRequest; diff --git a/core/src/main/java/org/apache/seata/core/serializer/protobuf/manager/ProtobufConvertManager.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/manager/ProtobufConvertManager.java similarity index 76% rename from core/src/main/java/org/apache/seata/core/serializer/protobuf/manager/ProtobufConvertManager.java rename to serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/manager/ProtobufConvertManager.java index cfea2925e9a..4ce861b155a 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/protobuf/manager/ProtobufConvertManager.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/manager/ProtobufConvertManager.java @@ -14,41 +14,41 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.manager; +package org.apache.seata.serializer.protobuf.manager; import org.apache.seata.core.protocol.BatchResultMessage; -import org.apache.seata.core.serializer.protobuf.convertor.BatchResultMessageConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.BranchCommitRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.BranchCommitResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.BranchRegisterRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.BranchRegisterResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.BranchReportRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.BranchReportResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.BranchRollbackRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.BranchRollbackResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalBeginRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalBeginResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalCommitRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalCommitResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalLockQueryRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalLockQueryResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalReportRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalReportResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalRollbackRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalRollbackResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalStatusRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.GlobalStatusResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.HeartbeatMessageConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.MergeResultMessageConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.MergedWarpMessageConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.PbConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.RegisterRMRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.RegisterRMResponseConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.RegisterTMRequestConvertor; -import org.apache.seata.core.serializer.protobuf.convertor.RegisterTMResponseConvertor; -import org.apache.seata.core.serializer.protobuf.generated.BatchResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalReportRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalReportResponseProto; +import org.apache.seata.serializer.protobuf.convertor.BatchResultMessageConvertor; +import org.apache.seata.serializer.protobuf.convertor.BranchCommitRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.BranchCommitResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.BranchRegisterRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.BranchRegisterResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.BranchReportRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.BranchReportResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.BranchRollbackRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.BranchRollbackResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalBeginRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalBeginResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalCommitRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalCommitResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalLockQueryRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalLockQueryResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalReportRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalReportResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalRollbackRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalRollbackResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalStatusRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.GlobalStatusResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.HeartbeatMessageConvertor; +import org.apache.seata.serializer.protobuf.convertor.MergeResultMessageConvertor; +import org.apache.seata.serializer.protobuf.convertor.MergedWarpMessageConvertor; +import org.apache.seata.serializer.protobuf.convertor.PbConvertor; +import org.apache.seata.serializer.protobuf.convertor.RegisterRMRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.RegisterRMResponseConvertor; +import org.apache.seata.serializer.protobuf.convertor.RegisterTMRequestConvertor; +import org.apache.seata.serializer.protobuf.convertor.RegisterTMResponseConvertor; +import org.apache.seata.serializer.protobuf.generated.BatchResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.GlobalReportRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalReportResponseProto; import org.apache.seata.core.protocol.HeartbeatMessage; import org.apache.seata.core.protocol.MergeResultMessage; import org.apache.seata.core.protocol.MergedWarpMessage; @@ -56,33 +56,33 @@ import org.apache.seata.core.protocol.RegisterRMResponse; import org.apache.seata.core.protocol.RegisterTMRequest; import org.apache.seata.core.protocol.RegisterTMResponse; -import org.apache.seata.core.serializer.protobuf.convertor.UndoLogDeleteRequestConvertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchCommitRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchCommitResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchReportRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchReportResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.HeartbeatMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MergedResultMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.MergedWarpMessageProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterRMRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterRMResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto; -import org.apache.seata.core.serializer.protobuf.generated.RegisterTMResponseProto; -import org.apache.seata.core.serializer.protobuf.generated.UndoLogDeleteRequestProto; +import org.apache.seata.serializer.protobuf.convertor.UndoLogDeleteRequestConvertor; +import org.apache.seata.serializer.protobuf.generated.BranchCommitRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchCommitResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchRegisterRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchRegisterResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchReportRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchReportResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchRollbackRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchRollbackResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalBeginRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalBeginResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalCommitRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalCommitResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalRollbackRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalRollbackResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusResponseProto; +import org.apache.seata.serializer.protobuf.generated.HeartbeatMessageProto; +import org.apache.seata.serializer.protobuf.generated.MergedResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.MergedWarpMessageProto; +import org.apache.seata.serializer.protobuf.generated.RegisterRMRequestProto; +import org.apache.seata.serializer.protobuf.generated.RegisterRMResponseProto; +import org.apache.seata.serializer.protobuf.generated.RegisterTMRequestProto; +import org.apache.seata.serializer.protobuf.generated.RegisterTMResponseProto; +import org.apache.seata.serializer.protobuf.generated.UndoLogDeleteRequestProto; import org.apache.seata.core.protocol.transaction.BranchCommitRequest; import org.apache.seata.core.protocol.transaction.BranchCommitResponse; import org.apache.seata.core.protocol.transaction.BranchRegisterRequest; diff --git a/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer b/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer index 71098c53674..f6fbf709dea 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer +++ b/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer @@ -14,4 +14,5 @@ # See the License for the specific language governing permissions and # limitations under the License. # -org.apache.seata.serializer.protobuf.ProtobufSerializer \ No newline at end of file +org.apache.seata.serializer.protobuf.ProtobufSerializer +org.apache.seata.serializer.protobuf.GrpcSerializer \ No newline at end of file diff --git a/core/src/main/proto/abstractBranchEndRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto similarity index 95% rename from core/src/main/proto/abstractBranchEndRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto index bdd33937c49..b691f74e55c 100644 --- a/core/src/main/proto/abstractBranchEndRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto @@ -23,7 +23,7 @@ import "branchType.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractBranchEndRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractBranchEndRequestProto { diff --git a/core/src/main/proto/abstractBranchEndResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto similarity index 94% rename from core/src/main/proto/abstractBranchEndResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto index 30edebede18..22b5f60b5b5 100644 --- a/core/src/main/proto/abstractBranchEndResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto @@ -23,7 +23,7 @@ import "branchStatus.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractBranchEndResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractBranchEndResponseProto { diff --git a/core/src/main/proto/abstractGlobalEndRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto similarity index 93% rename from core/src/main/proto/abstractGlobalEndRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto index 16b560c1a20..0523db0070e 100644 --- a/core/src/main/proto/abstractGlobalEndRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto @@ -22,7 +22,7 @@ import "abstractTransactionRequest.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractGlobalEndRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractGlobalEndRequestProto { diff --git a/core/src/main/proto/abstractGlobalEndResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto similarity index 94% rename from core/src/main/proto/abstractGlobalEndResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto index 57f319b0343..3d8107e8f35 100644 --- a/core/src/main/proto/abstractGlobalEndResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto @@ -23,7 +23,7 @@ import "globalStatus.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractGlobalEndResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractGlobalEndResponseProto { diff --git a/core/src/main/proto/abstractIdentifyRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto similarity index 94% rename from core/src/main/proto/abstractIdentifyRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto index f6bde34de64..bef0d19d8ed 100644 --- a/core/src/main/proto/abstractIdentifyRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto @@ -22,7 +22,7 @@ import "abstractMessage.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractIdentifyRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractIdentifyRequestProto { diff --git a/core/src/main/proto/abstractIdentifyResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto similarity index 94% rename from core/src/main/proto/abstractIdentifyResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto index ad27d75289a..c2b80c900de 100644 --- a/core/src/main/proto/abstractIdentifyResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto @@ -22,7 +22,7 @@ import "abstractResultMessage.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractIdentifyResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractIdentifyResponseProto { diff --git a/core/src/main/proto/abstractMessage.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto similarity index 93% rename from core/src/main/proto/abstractMessage.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto index 68e217372c4..8ec011daf3f 100644 --- a/core/src/main/proto/abstractMessage.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto @@ -22,7 +22,7 @@ import "messageType.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractMessage"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractMessageProto { diff --git a/core/src/main/proto/abstractResultMessage.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto similarity index 93% rename from core/src/main/proto/abstractResultMessage.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto index 6882fe4136d..a04f9b56dda 100644 --- a/core/src/main/proto/abstractResultMessage.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto @@ -22,7 +22,7 @@ import "resultCode.proto"; import "abstractMessage.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractResultMessage"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractResultMessageProto { diff --git a/core/src/main/proto/abstractTransactionRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto similarity index 93% rename from core/src/main/proto/abstractTransactionRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto index 7651968cac1..a964917a20b 100644 --- a/core/src/main/proto/abstractTransactionRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto @@ -23,7 +23,7 @@ import "abstractMessage.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractTransactionRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractTransactionRequestProto { diff --git a/core/src/main/proto/abstractTransactionResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto similarity index 94% rename from core/src/main/proto/abstractTransactionResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto index 29b5f8e844c..a31caaa00bf 100644 --- a/core/src/main/proto/abstractTransactionResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto @@ -24,7 +24,7 @@ import "transactionExceptionCode.proto"; option java_multiple_files = true; option java_outer_classname = "AbstractTransactionResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message AbstractTransactionResponseProto { diff --git a/core/src/main/proto/batchResultMessage.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto similarity index 94% rename from core/src/main/proto/batchResultMessage.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto index ceba6762973..c36f75a7972 100644 --- a/core/src/main/proto/batchResultMessage.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto @@ -23,7 +23,7 @@ import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "BatchResultMessage"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message BatchResultMessageProto { diff --git a/core/src/main/proto/branchCommitRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto similarity index 93% rename from core/src/main/proto/branchCommitRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto index f1e92b41b73..1a2adbe630d 100644 --- a/core/src/main/proto/branchCommitRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto @@ -23,7 +23,7 @@ import "abstractBranchEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "BranchCommitRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchCommitRequestProto { diff --git a/core/src/main/proto/branchCommitResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto similarity index 93% rename from core/src/main/proto/branchCommitResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto index 29c0027ec77..96070ab6a91 100644 --- a/core/src/main/proto/branchCommitResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto @@ -23,7 +23,7 @@ import "abstractBranchEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "BranchCommitResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchCommitResponseProto { diff --git a/core/src/main/proto/branchRegisterRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto similarity index 94% rename from core/src/main/proto/branchRegisterRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto index 803f9dac993..d527d8b7843 100644 --- a/core/src/main/proto/branchRegisterRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto @@ -23,7 +23,7 @@ import "abstractTransactionRequest.proto"; option java_multiple_files = true; option java_outer_classname = "BranchRegisterRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchRegisterRequestProto { diff --git a/core/src/main/proto/branchRegisterResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto similarity index 93% rename from core/src/main/proto/branchRegisterResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto index 23861306d2f..7ce95f34d1f 100644 --- a/core/src/main/proto/branchRegisterResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto @@ -23,7 +23,7 @@ import "abstractTransactionResponse.proto"; option java_multiple_files = true; option java_outer_classname = "BranchRegisterResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchRegisterResponseProto { diff --git a/core/src/main/proto/branchReportRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto similarity index 94% rename from core/src/main/proto/branchReportRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto index e83c36e63fb..788454048ef 100644 --- a/core/src/main/proto/branchReportRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto @@ -25,7 +25,7 @@ import "abstractTransactionRequest.proto"; option java_multiple_files = true; option java_outer_classname = "BranchReportRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message BranchReportRequestProto { diff --git a/core/src/main/proto/branchReportResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto similarity index 93% rename from core/src/main/proto/branchReportResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto index c51e555db2c..42a29e47615 100644 --- a/core/src/main/proto/branchReportResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto @@ -23,7 +23,7 @@ import "abstractTransactionResponse.proto"; option java_multiple_files = true; option java_outer_classname = "BranchReportResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message BranchReportResponseProto { AbstractTransactionResponseProto abstractTransactionResponse = 1; diff --git a/core/src/main/proto/branchRollbackRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto similarity index 93% rename from core/src/main/proto/branchRollbackRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto index 01ae58d428c..ca42def06d3 100644 --- a/core/src/main/proto/branchRollbackRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto @@ -23,7 +23,7 @@ import "abstractBranchEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "BranchRollbackRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchRollbackRequestProto { diff --git a/core/src/main/proto/branchRollbackResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto similarity index 93% rename from core/src/main/proto/branchRollbackResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto index 8eedcbe8aff..5c31966dda4 100644 --- a/core/src/main/proto/branchRollbackResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto @@ -23,7 +23,7 @@ import "abstractBranchEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "BranchRollbackResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message BranchRollbackResponseProto { diff --git a/core/src/main/proto/branchStatus.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto similarity index 97% rename from core/src/main/proto/branchStatus.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto index 4f3ccd8feb1..425b38d47fc 100644 --- a/core/src/main/proto/branchStatus.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "BranchStatus"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. enum BranchStatusProto { diff --git a/core/src/main/proto/branchType.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto similarity index 93% rename from core/src/main/proto/branchType.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto index acbde786e2a..dbe0a436199 100644 --- a/core/src/main/proto/branchType.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "BranchType"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. enum BranchTypeProto { diff --git a/core/src/main/proto/globalBeginRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto similarity index 93% rename from core/src/main/proto/globalBeginRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto index f08daed80dc..828a1b3e24c 100644 --- a/core/src/main/proto/globalBeginRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto @@ -23,7 +23,7 @@ import "abstractTransactionRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalBeginRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalBeginRequestProto { AbstractTransactionRequestProto abstractTransactionRequest=1; diff --git a/core/src/main/proto/globalBeginResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto similarity index 93% rename from core/src/main/proto/globalBeginResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto index e8b3c7db297..5bdf87ecb83 100644 --- a/core/src/main/proto/globalBeginResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto @@ -23,7 +23,7 @@ import "abstractTransactionResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalBeginResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalBeginResponseProto { AbstractTransactionResponseProto abstractTransactionResponse =1; diff --git a/core/src/main/proto/globalCommitRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto similarity index 93% rename from core/src/main/proto/globalCommitRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto index 9b9f15c4908..0c1958156d6 100644 --- a/core/src/main/proto/globalCommitRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalCommitRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalCommitRequestProto { AbstractGlobalEndRequestProto abstractGlobalEndRequest =1; diff --git a/core/src/main/proto/globalCommitResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto similarity index 93% rename from core/src/main/proto/globalCommitResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto index 473d010282b..650a2f3337d 100644 --- a/core/src/main/proto/globalCommitResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalCommitResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalCommitResponseProto { AbstractGlobalEndResponseProto abstractGlobalEndResponse =1; diff --git a/core/src/main/proto/globalLockQueryRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto similarity index 93% rename from core/src/main/proto/globalLockQueryRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto index f50d462c1b2..469147eca0f 100644 --- a/core/src/main/proto/globalLockQueryRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto @@ -22,7 +22,7 @@ import "branchRegisterRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalLockQueryRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalLockQueryRequestProto { BranchRegisterRequestProto branchRegisterRequest =1; diff --git a/core/src/main/proto/globalLockQueryResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto similarity index 93% rename from core/src/main/proto/globalLockQueryResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto index 9d2acc7b31a..e9b5fb5409a 100644 --- a/core/src/main/proto/globalLockQueryResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto @@ -22,7 +22,7 @@ import "abstractTransactionResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalLockQueryResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalLockQueryResponseProto { AbstractTransactionResponseProto abstractTransactionResponse = 1; diff --git a/core/src/main/proto/globalReportRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto similarity index 93% rename from core/src/main/proto/globalReportRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto index be1810e1fdc..64435f2049c 100644 --- a/core/src/main/proto/globalReportRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto @@ -23,7 +23,7 @@ import "globalStatus.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalReportRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalReportRequestProto { AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; diff --git a/core/src/main/proto/globalReportResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto similarity index 93% rename from core/src/main/proto/globalReportResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto index 79ae2899602..3a5b5611aad 100644 --- a/core/src/main/proto/globalReportResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalReportResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalReportResponseProto { AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; diff --git a/core/src/main/proto/globalRollbackRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto similarity index 93% rename from core/src/main/proto/globalRollbackRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto index 2e1391d252e..2acdbdd99cf 100644 --- a/core/src/main/proto/globalRollbackRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalRollbackRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalRollbackRequestProto { AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; diff --git a/core/src/main/proto/globalRollbackResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto similarity index 93% rename from core/src/main/proto/globalRollbackResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto index 6d5591f63b5..78bb4d2b567 100644 --- a/core/src/main/proto/globalRollbackResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalRollbackResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalRollbackResponseProto { AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; diff --git a/core/src/main/proto/globalStatus.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto similarity index 97% rename from core/src/main/proto/globalStatus.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto index 3a45f790511..9de4108f5b6 100644 --- a/core/src/main/proto/globalStatus.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "GlobalStatus"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. enum GlobalStatusProto { diff --git a/core/src/main/proto/globalStatusRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto similarity index 93% rename from core/src/main/proto/globalStatusRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto index b538bcf020f..f267e6efeee 100644 --- a/core/src/main/proto/globalStatusRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndRequest.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalStatusRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalStatusRequestProto { AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; diff --git a/core/src/main/proto/globalStatusResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto similarity index 93% rename from core/src/main/proto/globalStatusResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto index 99e80844251..cf6def540fd 100644 --- a/core/src/main/proto/globalStatusResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto @@ -22,7 +22,7 @@ import "abstractGlobalEndResponse.proto"; option java_multiple_files = true; option java_outer_classname = "GlobalStatusResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GlobalStatusResponseProto { AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; diff --git a/core/src/main/proto/heartbeatMessage.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto similarity index 93% rename from core/src/main/proto/heartbeatMessage.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto index a2690426897..fec1e295213 100644 --- a/core/src/main/proto/heartbeatMessage.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "HeartbeatMessage"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message HeartbeatMessageProto { diff --git a/core/src/main/proto/mergedResultMessage.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto similarity index 93% rename from core/src/main/proto/mergedResultMessage.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto index 1661fdc820f..774fc69ce4a 100644 --- a/core/src/main/proto/mergedResultMessage.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto @@ -23,7 +23,7 @@ import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "MergedResultMessage"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message MergedResultMessageProto { diff --git a/core/src/main/proto/mergedWarpMessage.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto similarity index 94% rename from core/src/main/proto/mergedWarpMessage.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto index 9dd235633b6..f84d5d31df8 100644 --- a/core/src/main/proto/mergedWarpMessage.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto @@ -23,7 +23,7 @@ import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "MergedWarpMessage"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message MergedWarpMessageProto { diff --git a/core/src/main/proto/messageType.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto similarity index 97% rename from core/src/main/proto/messageType.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto index 4971b7acb52..754ce1173c0 100644 --- a/core/src/main/proto/messageType.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "MessageType"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. enum MessageTypeProto { diff --git a/core/src/main/proto/registerRMRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto similarity index 93% rename from core/src/main/proto/registerRMRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto index e3a95a8febb..d4a3db78667 100644 --- a/core/src/main/proto/registerRMRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto @@ -22,7 +22,7 @@ import "abstractIdentifyRequest.proto"; option java_multiple_files = true; option java_outer_classname = "RegisterRMRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message RegisterRMRequestProto { diff --git a/core/src/main/proto/registerRMResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto similarity index 93% rename from core/src/main/proto/registerRMResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto index 0eb63cc1188..378f0a1ed2b 100644 --- a/core/src/main/proto/registerRMResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto @@ -22,7 +22,7 @@ import "abstractIdentifyResponse.proto"; option java_multiple_files = true; option java_outer_classname = "RegisterRMResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message RegisterRMResponseProto { diff --git a/core/src/main/proto/registerTMRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto similarity index 93% rename from core/src/main/proto/registerTMRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto index 56ffb30ee7b..d18e1c41bce 100644 --- a/core/src/main/proto/registerTMRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto @@ -22,7 +22,7 @@ import "abstractIdentifyRequest.proto"; option java_multiple_files = true; option java_outer_classname = "RegisterTMRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message RegisterTMRequestProto { diff --git a/core/src/main/proto/registerTMResponse.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto similarity index 93% rename from core/src/main/proto/registerTMResponse.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto index ca8fc1a8cb4..e8f354c20a0 100644 --- a/core/src/main/proto/registerTMResponse.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto @@ -22,7 +22,7 @@ import "abstractIdentifyResponse.proto"; option java_multiple_files = true; option java_outer_classname = "RegisterTMResponse"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message RegisterTMResponseProto { diff --git a/core/src/main/proto/resultCode.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto similarity index 93% rename from core/src/main/proto/resultCode.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto index c0919e99478..4bd9ff3bd11 100644 --- a/core/src/main/proto/resultCode.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "ResultCode"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. enum ResultCodeProto { diff --git a/core/src/main/proto/transactionExceptionCode.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto similarity index 97% rename from core/src/main/proto/transactionExceptionCode.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto index dbbbd441856..6cb20b0905c 100644 --- a/core/src/main/proto/transactionExceptionCode.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto @@ -20,7 +20,7 @@ package org.apache.seata.protocol.protobuf; option java_multiple_files = true; option java_outer_classname = "TransactionExceptionCode"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. enum TransactionExceptionCodeProto { diff --git a/core/src/main/proto/undoLogDeleteRequest.proto b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto similarity index 94% rename from core/src/main/proto/undoLogDeleteRequest.proto rename to serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto index 2781348edfe..86624613096 100644 --- a/core/src/main/proto/undoLogDeleteRequest.proto +++ b/serializer/seata-serializer-protobuf/src/main/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto @@ -23,7 +23,7 @@ import "branchType.proto"; option java_multiple_files = true; option java_outer_classname = "UndoLogDeleteRequest"; -option java_package = "org.apache.seata.core.serializer.protobuf.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; // PublishRequest is a publish request. message UndoLogDeleteRequestProto { diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertorTest.java index 2fb5b18f47b..d85891663e2 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BatchResultMessageConvertorTest.java @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.BatchResultMessage; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.BranchCommitResponse; -import org.apache.seata.core.serializer.protobuf.generated.BatchResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.BatchResultMessageProto; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertorTest.java index 40196667089..a0f811248a6 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchCommitRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchCommitRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchCommitRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertorTest.java index 7c4d040f06f..6a1dc52e251 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchCommitResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchCommitResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchCommitResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertorTest.java index e161f747560..e0de4e6675a 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchRegisterRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchRegisterRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java index 520fb4fdec5..2ef597237f2 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchRegisterResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchRegisterResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.BranchRegisterResponse; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java index f3c3aa5d774..4085a16e532 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchReportRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchReportRequestProto; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchReportRequest; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertorTest.java index 29c5ae2ebe2..5726329ab33 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchReportResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchReportResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchReportResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.BranchReportResponse; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertorTest.java index 09b8e2cecd6..b618d17f4d1 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackRequestProto; +import org.apache.seata.serializer.protobuf.generated.BranchRollbackRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.BranchRollbackRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java index 9f93007a558..6457ab173bb 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.BranchRollbackResponseProto; +import org.apache.seata.serializer.protobuf.generated.BranchRollbackResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.BranchStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java index 30e47787012..c46abae4f38 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalBeginRequestProto; import org.apache.seata.core.protocol.transaction.GlobalBeginRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertorTest.java index b715b218654..95914c664ca 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalBeginResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalBeginResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalBeginResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.GlobalBeginResponse; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertorTest.java index fcf1a760682..1da1e87b569 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalCommitRequestProto; import org.apache.seata.core.protocol.transaction.GlobalCommitRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertorTest.java index f0b95f7b216..38c9297fa43 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalCommitResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalCommitResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalCommitResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java index b1b69b2d790..da632fac999 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.GlobalLockQueryRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java index 92008c341e3..44353889be2 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalLockQueryResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalLockQueryResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.protocol.ResultCode; import org.apache.seata.core.protocol.transaction.GlobalLockQueryResponse; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertorTest.java index 494455eded8..d0c5a096e99 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalRollbackRequestProto; import org.apache.seata.core.protocol.transaction.GlobalRollbackRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertorTest.java index 0f0f7923718..e20a92acd72 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalRollbackResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalRollbackResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalRollbackResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertorTest.java index 65f5f0b4fc8..50fd4ea1d46 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusRequestProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusRequestProto; import org.apache.seata.core.protocol.transaction.GlobalStatusRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertorTest.java index dc813c68323..0d59b81172c 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/GlobalStatusResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.GlobalStatusResponseProto; +import org.apache.seata.serializer.protobuf.generated.GlobalStatusResponseProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.ResultCode; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertorTest.java index 31eba4123bc..bfacdcf2ca8 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/HeartbeatMessageConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.HeartbeatMessageProto; +import org.apache.seata.serializer.protobuf.generated.HeartbeatMessageProto; import org.apache.seata.core.protocol.HeartbeatMessage; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeMessageConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeMessageConvertorTest.java index 1a7495c1e9c..5c2bf1dc6bd 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeMessageConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeMessageConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.MergedWarpMessageProto; +import org.apache.seata.serializer.protobuf.generated.MergedWarpMessageProto; import org.apache.seata.core.protocol.AbstractMessage; import org.apache.seata.core.protocol.MergedWarpMessage; import org.apache.seata.core.protocol.transaction.GlobalBeginRequest; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertorTest.java index c51de4bd48b..c42efb3d5c5 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/MergeResultMessageConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.MergedResultMessageProto; +import org.apache.seata.serializer.protobuf.generated.MergedResultMessageProto; import org.apache.seata.core.exception.TransactionExceptionCode; import org.apache.seata.core.model.GlobalStatus; import org.apache.seata.core.protocol.AbstractResultMessage; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java index 4a0ed55430d..173e258a029 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.RegisterRMRequestProto; +import org.apache.seata.serializer.protobuf.generated.RegisterRMRequestProto; import org.apache.seata.core.protocol.RegisterRMRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertorTest.java index d464e0149e7..3ce78b78261 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterRMResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.RegisterRMResponseProto; +import org.apache.seata.serializer.protobuf.generated.RegisterRMResponseProto; import org.apache.seata.core.protocol.RegisterRMResponse; import org.apache.seata.core.protocol.ResultCode; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertorTest.java index 3590e736b67..f7e22774f1f 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.RegisterTMRequestProto; +import org.apache.seata.serializer.protobuf.generated.RegisterTMRequestProto; import org.apache.seata.core.protocol.RegisterTMRequest; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertorTest.java index f3a8f04e94b..73e073676d6 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/RegisterTMResponseConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.RegisterTMResponseProto; +import org.apache.seata.serializer.protobuf.generated.RegisterTMResponseProto; import org.apache.seata.core.protocol.RegisterTMResponse; import org.apache.seata.core.protocol.ResultCode; import org.junit.jupiter.api.Test; diff --git a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertorTest.java b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertorTest.java index 556f2c89bdb..a4fb3f5c184 100644 --- a/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertorTest.java +++ b/serializer/seata-serializer-protobuf/src/test/java/org/apache/seata/serializer/protobuf/convertor/UndoLogDeleteRequestConvertorTest.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.core.serializer.protobuf.convertor; +package org.apache.seata.serializer.protobuf.convertor; -import org.apache.seata.core.serializer.protobuf.generated.UndoLogDeleteRequestProto; +import org.apache.seata.serializer.protobuf.generated.UndoLogDeleteRequestProto; import org.apache.seata.core.model.BranchType; import org.apache.seata.core.protocol.transaction.UndoLogDeleteRequest; import org.junit.jupiter.api.Test; From be0448a0ffc1e75a6045eb0f584ea80e9548ec8c Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Fri, 16 Aug 2024 22:41:03 +0800 Subject: [PATCH 03/42] grpc protocol --- all/pom.xml | 7 +++++++ bom/pom.xml | 5 +++++ .../apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java | 6 +++--- .../apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java | 6 +++--- .../seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java | 2 +- .../apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java | 6 +++--- .../apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java | 6 +++--- .../seata/core/serializer/SerializerServiceLoader.java | 2 +- .../META-INF/additional-spring-configuration-metadata.json | 2 +- 9 files changed, 27 insertions(+), 15 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 418256e2cf6..e25f728d8b5 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -240,6 +240,13 @@ seata-serializer-seata ${project.version}
+ + org.apache.seata + seata-serializer-protobuf + ${project.version} + + provided + org.apache.seata seata-grpc diff --git a/bom/pom.xml b/bom/pom.xml index e1ba3fe69b8..514d4f048bb 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -258,6 +258,11 @@ seata-serializer-all ${project.version} + + org.apache.seata + seata-serializer-protobuf + ${project.version} + org.apache.seata seata-serializer-seata diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java index 92a40b99740..8c28ad96c2b 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolDecoderV0.java @@ -25,9 +25,9 @@ import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.rpc.netty.ProtocolDecoder; -import org.apache.seata.serializer.Serializer; -import org.apache.seata.serializer.SerializerServiceLoader; -import org.apache.seata.serializer.SerializerType; +import org.apache.seata.core.serializer.Serializer; +import org.apache.seata.core.serializer.SerializerServiceLoader; +import org.apache.seata.core.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java index a717e382061..f217a843294 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolEncoderV0.java @@ -24,9 +24,9 @@ import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.rpc.netty.ProtocolEncoder; -import org.apache.seata.serializer.Serializer; -import org.apache.seata.serializer.SerializerServiceLoader; -import org.apache.seata.serializer.SerializerType; +import org.apache.seata.core.serializer.Serializer; +import org.apache.seata.core.serializer.SerializerServiceLoader; +import org.apache.seata.core.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java index 9f085ff208b..cea2d7e6f71 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v0/ProtocolRpcMessageV0.java @@ -20,7 +20,7 @@ import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.rpc.netty.ProtocolRpcMessage; -import org.apache.seata.serializer.SerializerType; +import org.apache.seata.core.serializer.SerializerType; import java.util.concurrent.atomic.AtomicLong; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java index b296b762846..ce48b3ce8ca 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java @@ -29,9 +29,9 @@ import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.rpc.netty.ProtocolDecoder; -import org.apache.seata.serializer.Serializer; -import org.apache.seata.serializer.SerializerServiceLoader; -import org.apache.seata.serializer.SerializerType; +import org.apache.seata.core.serializer.Serializer; +import org.apache.seata.core.serializer.SerializerServiceLoader; +import org.apache.seata.core.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java b/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java index 50f3bdf9c65..dd01b948dba 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java @@ -20,13 +20,13 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; import org.apache.seata.core.rpc.netty.ProtocolEncoder; -import org.apache.seata.serializer.Serializer; +import org.apache.seata.core.serializer.Serializer; import org.apache.seata.core.compressor.Compressor; import org.apache.seata.core.compressor.CompressorFactory; import org.apache.seata.core.protocol.ProtocolConstants; import org.apache.seata.core.protocol.RpcMessage; -import org.apache.seata.serializer.SerializerServiceLoader; -import org.apache.seata.serializer.SerializerType; +import org.apache.seata.core.serializer.SerializerServiceLoader; +import org.apache.seata.core.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java index 173420329de..250e1c65b60 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java +++ b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java @@ -55,7 +55,7 @@ public final class SerializerServiceLoader { private SerializerServiceLoader() { } - private static final String PROTOBUF_SERIALIZER_CLASS_NAME = "org.apache.seata.core.serializer.protobuf.generated.ProtobufSerializer"; + private static final String PROTOBUF_SERIALIZER_CLASS_NAME = "org.apache.seata.serializer.protobuf.ProtobufSerializer"; /** * Load the service of {@link Serializer} diff --git a/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 3964346fdc6..57d4d691b1d 100644 --- a/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -179,7 +179,7 @@ { "name": "handle-as", "parameters": { - "target": "org.apache.seata.serializer.SerializerType" + "target": "org.apache.seata.core.serializer.SerializerType" } } ] From 6cbbac0362d364b52e088bbe964090fe9526bf01 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Fri, 16 Aug 2024 22:46:06 +0800 Subject: [PATCH 04/42] grpc protocol --- .../core/protocol/ProtocolConstants.java | 4 +- .../SerializerSecurityRegistryTest.java | 58 ++++++++++ .../grpc/interceptor/GrpcTest.java | 109 ++++++++++++++++++ 3 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java create mode 100644 integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java diff --git a/core/src/main/java/org/apache/seata/core/protocol/ProtocolConstants.java b/core/src/main/java/org/apache/seata/core/protocol/ProtocolConstants.java index 7b72181df20..4b2b7ef8700 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/ProtocolConstants.java +++ b/core/src/main/java/org/apache/seata/core/protocol/ProtocolConstants.java @@ -19,8 +19,8 @@ import org.apache.seata.config.ConfigurationFactory; import org.apache.seata.core.compressor.CompressorType; import org.apache.seata.core.constants.ConfigurationKeys; -import org.apache.seata.serializer.SerializerServiceLoader; -import org.apache.seata.serializer.SerializerType; +import org.apache.seata.core.serializer.SerializerServiceLoader; +import org.apache.seata.core.serializer.SerializerType; /** * @since 0.7.0 diff --git a/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java b/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java new file mode 100644 index 00000000000..b8bb4bc026a --- /dev/null +++ b/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.core.serializer; + +import org.apache.seata.core.protocol.HeartbeatMessage; +import org.apache.seata.core.protocol.Version; +import org.apache.seata.core.protocol.transaction.AbstractBranchEndRequest; +import org.apache.seata.core.protocol.transaction.BranchCommitRequest; +import org.apache.seata.core.protocol.transaction.BranchCommitResponse; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + + +public class SerializerSecurityRegistryTest { + @Test + public void getAllowClassType() { + Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(Long.class)); + Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(Integer.class)); + Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(HeartbeatMessage.class)); + Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(BranchCommitRequest.class)); + Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassType().contains(BranchCommitResponse.class)); + Assertions.assertFalse(SerializerSecurityRegistry.getAllowClassType().contains(AbstractBranchEndRequest.class)); + Assertions.assertFalse(SerializerSecurityRegistry.getAllowClassType().contains(Version.class)); + } + + @Test + public void getAllowClassPattern() { + Assertions.assertTrue( + SerializerSecurityRegistry.getAllowClassPattern().contains(Long.class.getCanonicalName())); + Assertions.assertTrue( + SerializerSecurityRegistry.getAllowClassPattern().contains(Integer.class.getCanonicalName())); + Assertions.assertTrue( + SerializerSecurityRegistry.getAllowClassPattern().contains(HeartbeatMessage.class.getCanonicalName())); + Assertions.assertTrue( + SerializerSecurityRegistry.getAllowClassPattern().contains(BranchCommitRequest.class.getCanonicalName())); + Assertions.assertTrue( + SerializerSecurityRegistry.getAllowClassPattern().contains(BranchCommitResponse.class.getCanonicalName())); + Assertions.assertFalse(SerializerSecurityRegistry.getAllowClassPattern() + .contains(AbstractBranchEndRequest.class.getCanonicalName())); + Assertions.assertFalse( + SerializerSecurityRegistry.getAllowClassPattern().contains(Version.class.getCanonicalName())); + Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassPattern().contains("org.apache.seata.*")); + } +} \ No newline at end of file diff --git a/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java b/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java new file mode 100644 index 00000000000..c43b693267b --- /dev/null +++ b/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java @@ -0,0 +1,109 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.integration.grpc.interceptor; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executor; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +import com.google.common.util.concurrent.ListenableFuture; +import io.grpc.ClientInterceptors; +import io.grpc.ManagedChannel; +import io.grpc.Metadata; +import io.grpc.ServerInterceptor; +import io.grpc.ServerInterceptors; +import io.grpc.inprocess.InProcessChannelBuilder; +import io.grpc.inprocess.InProcessServerBuilder; +import io.grpc.stub.StreamObserver; +import io.grpc.testing.GrpcCleanupRule; +import org.apache.seata.core.context.RootContext; +import org.apache.seata.core.model.BranchType; +import org.apache.seata.integration.grpc.interceptor.client.ClientTransactionInterceptor; +import org.apache.seata.integration.grpc.interceptor.proto.ContextRpcGrpc; +import org.apache.seata.integration.grpc.interceptor.proto.Request; +import org.apache.seata.integration.grpc.interceptor.proto.Response; +import org.apache.seata.integration.grpc.interceptor.server.ServerTransactionInterceptor; +import org.junit.Rule; +import org.junit.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.ArgumentMatchers; + +import static org.junit.Assert.assertEquals; +import static org.mockito.AdditionalAnswers.delegatesTo; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + + +public class GrpcTest { + + @Rule + public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule(); + private final ServerInterceptor mockServerInterceptor = mock(ServerInterceptor.class, delegatesTo(new ServerTransactionInterceptor())); + private final String XID="192.168.0.1:8091:10086"; + + + @Test + public void clientHeaderDeliveredToServer() throws Exception { + + String serverName = InProcessServerBuilder.generateName(); + CountDownLatch countDownLatch = new CountDownLatch(1); + String[] context = new String[]{null,null}; + + //executor + Executor executorService = new ThreadPoolExecutor(2, 2, 1, TimeUnit.HOURS, new LinkedBlockingQueue<>(), new ThreadFactory() { + @Override + public Thread newThread(Runnable r) { + return new Thread(r, "contextText-" + System.currentTimeMillis()); + } + }); + + //server + grpcCleanup.register(InProcessServerBuilder.forName(serverName).executor(executorService) + .addService(ServerInterceptors.intercept(new ContextRpcGrpc.ContextRpcImplBase() { + @Override + public void contextRpc(Request request, StreamObserver responseObserver) { + context[0] = RootContext.getXID(); + context[1] = RootContext.getBranchType().name(); + countDownLatch.countDown(); + responseObserver.onNext(Response.newBuilder().setGreet("hello! " + request.getName()).build()); + responseObserver.onCompleted(); + } + }, mockServerInterceptor)) + .build().start()); + + //client + ManagedChannel channel = grpcCleanup.register(InProcessChannelBuilder.forName(serverName).executor(executorService).build()); + ContextRpcGrpc.ContextRpcFutureStub stub = ContextRpcGrpc.newFutureStub( + ClientInterceptors.intercept(channel, new ClientTransactionInterceptor())); + RootContext.bind(XID); + RootContext.bindBranchType(BranchType.TCC); + ListenableFuture future = stub.contextRpc(Request.newBuilder().setName("seata").build()); + assertEquals("hello! seata", future.get().getGreet()); + + ArgumentCaptor metadataCaptor = ArgumentCaptor.forClass(Metadata.class); + verify(mockServerInterceptor).interceptCall(ArgumentMatchers.any(), metadataCaptor.capture(), ArgumentMatchers.any()); + assertEquals(XID, metadataCaptor.getValue().get(GrpcHeaderKey.XID_HEADER_KEY)); + assertEquals(BranchType.TCC.name(), metadataCaptor.getValue().get(GrpcHeaderKey.BRANCH_HEADER_KEY)); + + countDownLatch.await(); + assertEquals(XID, context[0]); + assertEquals(BranchType.TCC.name(), context[1]); + } +} \ No newline at end of file From bea5592bed3b27df14e5a505b8ceae3f8d69cf07 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Fri, 16 Aug 2024 22:47:56 +0800 Subject: [PATCH 05/42] grpc protocol --- .../grpc/interceptor/GrpcTest.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java b/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java index c43b693267b..20fdf4ee3c9 100644 --- a/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java +++ b/integration/grpc/src/test/java/org/apache/seata/integration/grpc/interceptor/GrpcTest.java @@ -76,22 +76,22 @@ public Thread newThread(Runnable r) { //server grpcCleanup.register(InProcessServerBuilder.forName(serverName).executor(executorService) - .addService(ServerInterceptors.intercept(new ContextRpcGrpc.ContextRpcImplBase() { - @Override - public void contextRpc(Request request, StreamObserver responseObserver) { - context[0] = RootContext.getXID(); - context[1] = RootContext.getBranchType().name(); - countDownLatch.countDown(); - responseObserver.onNext(Response.newBuilder().setGreet("hello! " + request.getName()).build()); - responseObserver.onCompleted(); - } - }, mockServerInterceptor)) - .build().start()); + .addService(ServerInterceptors.intercept(new ContextRpcGrpc.ContextRpcImplBase() { + @Override + public void contextRpc(Request request, StreamObserver responseObserver) { + context[0] = RootContext.getXID(); + context[1] = RootContext.getBranchType().name(); + countDownLatch.countDown(); + responseObserver.onNext(Response.newBuilder().setGreet("hello! " + request.getName()).build()); + responseObserver.onCompleted(); + } + }, mockServerInterceptor)) + .build().start()); //client ManagedChannel channel = grpcCleanup.register(InProcessChannelBuilder.forName(serverName).executor(executorService).build()); ContextRpcGrpc.ContextRpcFutureStub stub = ContextRpcGrpc.newFutureStub( - ClientInterceptors.intercept(channel, new ClientTransactionInterceptor())); + ClientInterceptors.intercept(channel, new ClientTransactionInterceptor())); RootContext.bind(XID); RootContext.bindBranchType(BranchType.TCC); ListenableFuture future = stub.contextRpc(Request.newBuilder().setName("seata").build()); @@ -106,4 +106,4 @@ public void contextRpc(Request request, StreamObserver responseObserve assertEquals(XID, context[0]); assertEquals(BranchType.TCC.name(), context[1]); } -} \ No newline at end of file +} From 899f490260990c207ccb51a943b66cafee5da1aa Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Thu, 22 Aug 2024 23:32:01 +0800 Subject: [PATCH 06/42] delete no need change --- .../seata/core/rpc/netty/AbstractNettyRemotingClient.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java b/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java index cddc8de1d9c..248e8f48f6d 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java @@ -460,10 +460,7 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("will send ping msg,channel {}", ctx.channel()); } - String serverAddress = NetUtil.toStringAddress(ctx.channel().remoteAddress()); - Channel channel = clientChannelManager.acquireChannel(serverAddress); - - AbstractNettyRemotingClient.this.sendAsyncRequest(channel, HeartbeatMessage.PING); + AbstractNettyRemotingClient.this.sendAsyncRequest(ctx.channel(), HeartbeatMessage.PING); } catch (Throwable throwable) { LOGGER.error("send request error: {}", throwable.getMessage(), throwable); } From 5bf5038fa467431664b191abf4429b989f98397b Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Thu, 22 Aug 2024 23:48:45 +0800 Subject: [PATCH 07/42] cr --- .../apache/seata/core/protocol/Protocol.java | 1 + .../core/protocol/generated/GrpcMessage.java | 71 -- .../protocol/generated/GrpcMessageProto.java | 1026 ----------------- .../generated/GrpcMessageProtoOrBuilder.java | 72 -- .../core/rpc/netty/NettyClientBootstrap.java | 12 +- .../core/rpc/netty/NettyClientConfig.java | 8 +- .../core/rpc/netty/NettyServerBootstrap.java | 12 +- .../core/rpc/netty/grpc/GrpcDecoder.java | 6 +- .../core/rpc/netty/grpc/GrpcEncoder.java | 6 +- .../core/rpc/netty/grpc/GrpcHeaderEnum.java | 4 +- ...rg.apache.seata.core.serializer.Serializer | 1 - server/src/main/resources/application.yml | 25 +- 12 files changed, 46 insertions(+), 1198 deletions(-) delete mode 100644 core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessage.java delete mode 100644 core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProto.java delete mode 100644 core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProtoOrBuilder.java diff --git a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java index 3428ad31f13..bbd834ba24c 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java +++ b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java @@ -4,6 +4,7 @@ * */ public enum Protocol { + GPRC("gprc"), SEATA("seata"); diff --git a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessage.java b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessage.java deleted file mode 100644 index 571a9c43bed..00000000000 --- a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessage.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.core.protocol.generated; - -public final class GrpcMessage { - private GrpcMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\021grpcMessage.proto\022\036org.apache.seata.co" + - "re.protocol\032\031google/protobuf/any.proto\"\327" + - "\001\n\020GrpcMessageProto\022\n\n\002id\030\001 \001(\005\022\023\n\013messa" + - "geType\030\002 \001(\005\022N\n\007headMap\030\003 \003(\0132=.org.apac" + - "he.seata.core.protocol.GrpcMessageProto." + - "HeadMapEntry\022\"\n\004body\030\004 \001(\0132\024.google.prot" + - "obuf.Any\032.\n\014HeadMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + - "\005value\030\002 \001(\t:\0028\0012\205\001\n\014SeataService\022u\n\013sen" + - "dRequest\0220.org.apache.seata.core.protoco" + - "l.GrpcMessageProto\0320.org.apache.seata.co" + - "re.protocol.GrpcMessageProto(\0010\001B9\n(org." + - "apache.seata.core.protocol.generatedB\013Gr" + - "pcMessageP\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - }); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor, - new String[] { "Id", "MessageType", "HeadMap", "Body", }); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor = - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor.getNestedTypes().get(0); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, - new String[] { "Key", "Value", }); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProto.java b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProto.java deleted file mode 100644 index 172c0904b4c..00000000000 --- a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProto.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.core.protocol.generated; - -/** - * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} - */ -public final class GrpcMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.core.protocol.GrpcMessageProto) - GrpcMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GrpcMessageProto.newBuilder() to construct. - private GrpcMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GrpcMessageProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GrpcMessageProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GrpcMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - id_ = input.readInt32(); - break; - } - case 16: { - - messageType_ = input.readInt32(); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - headMap_ = com.google.protobuf.MapField.newMapField( - HeadMapDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - headMap__ = input.readMessage( - HeadMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - headMap_.getMutableMap().put( - headMap__.getKey(), headMap__.getValue()); - break; - } - case 34: { - com.google.protobuf.Any.Builder subBuilder = null; - if (body_ != null) { - subBuilder = body_.toBuilder(); - } - body_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(body_); - body_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GrpcMessageProto.class, Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - private int id_; - /** - * int32 id = 1; - * @return The id. - */ - @Override - public int getId() { - return id_; - } - - public static final int MESSAGETYPE_FIELD_NUMBER = 2; - private int messageType_; - /** - * int32 messageType = 2; - * @return The messageType. - */ - @Override - public int getMessageType() { - return messageType_; - } - - public static final int HEADMAP_FIELD_NUMBER = 3; - private static final class HeadMapDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - String, String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - String, String> headMap_; - private com.google.protobuf.MapField - internalGetHeadMap() { - if (headMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - return headMap_; - } - - public int getHeadMapCount() { - return internalGetHeadMap().getMap().size(); - } - /** - * map<string, string> headMap = 3; - */ - - @Override - public boolean containsHeadMap( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetHeadMap().getMap().containsKey(key); - } - /** - * Use {@link #getHeadMapMap()} instead. - */ - @Override - @Deprecated - public java.util.Map getHeadMap() { - return getHeadMapMap(); - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public java.util.Map getHeadMapMap() { - return internalGetHeadMap().getMap(); - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public String getHeadMapOrDefault( - String key, - String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public String getHeadMapOrThrow( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - if (!map.containsKey(key)) { - throw new IllegalArgumentException(); - } - return map.get(key); - } - - public static final int BODY_FIELD_NUMBER = 4; - private com.google.protobuf.Any body_; - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - @Override - public boolean hasBody() { - return body_ != null; - } - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - @Override - public com.google.protobuf.Any getBody() { - return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; - } - /** - * .google.protobuf.Any body = 4; - */ - @Override - public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { - return getBody(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (id_ != 0) { - output.writeInt32(1, id_); - } - if (messageType_ != 0) { - output.writeInt32(2, messageType_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetHeadMap(), - HeadMapDefaultEntryHolder.defaultEntry, - 3); - if (body_ != null) { - output.writeMessage(4, getBody()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (id_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, id_); - } - if (messageType_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, messageType_); - } - for (java.util.Map.Entry entry - : internalGetHeadMap().getMap().entrySet()) { - com.google.protobuf.MapEntry - headMap__ = HeadMapDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, headMap__); - } - if (body_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getBody()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GrpcMessageProto)) { - return super.equals(obj); - } - GrpcMessageProto other = (GrpcMessageProto) obj; - - if (getId() - != other.getId()) return false; - if (getMessageType() - != other.getMessageType()) return false; - if (!internalGetHeadMap().equals( - other.internalGetHeadMap())) return false; - if (hasBody() != other.hasBody()) return false; - if (hasBody()) { - if (!getBody() - .equals(other.getBody())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId(); - hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER; - hash = (53 * hash) + getMessageType(); - if (!internalGetHeadMap().getMap().isEmpty()) { - hash = (37 * hash) + HEADMAP_FIELD_NUMBER; - hash = (53 * hash) + internalGetHeadMap().hashCode(); - } - if (hasBody()) { - hash = (37 * hash) + BODY_FIELD_NUMBER; - hash = (53 * hash) + getBody().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GrpcMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GrpcMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GrpcMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GrpcMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GrpcMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GrpcMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GrpcMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GrpcMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GrpcMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GrpcMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GrpcMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GrpcMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GrpcMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.core.protocol.GrpcMessageProto) - GrpcMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 3: - return internalGetMutableHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GrpcMessageProto.class, Builder.class); - } - - // Construct using org.apache.seata.core.protocol.generated.GrpcMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - id_ = 0; - - messageType_ = 0; - - internalGetMutableHeadMap().clear(); - if (bodyBuilder_ == null) { - body_ = null; - } else { - body_ = null; - bodyBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @Override - public GrpcMessageProto getDefaultInstanceForType() { - return GrpcMessageProto.getDefaultInstance(); - } - - @Override - public GrpcMessageProto build() { - GrpcMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GrpcMessageProto buildPartial() { - GrpcMessageProto result = new GrpcMessageProto(this); - int from_bitField0_ = bitField0_; - result.id_ = id_; - result.messageType_ = messageType_; - result.headMap_ = internalGetHeadMap(); - result.headMap_.makeImmutable(); - if (bodyBuilder_ == null) { - result.body_ = body_; - } else { - result.body_ = bodyBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GrpcMessageProto) { - return mergeFrom((GrpcMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GrpcMessageProto other) { - if (other == GrpcMessageProto.getDefaultInstance()) return this; - if (other.getId() != 0) { - setId(other.getId()); - } - if (other.getMessageType() != 0) { - setMessageType(other.getMessageType()); - } - internalGetMutableHeadMap().mergeFrom( - other.internalGetHeadMap()); - if (other.hasBody()) { - mergeBody(other.getBody()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GrpcMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GrpcMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int id_ ; - /** - * int32 id = 1; - * @return The id. - */ - @Override - public int getId() { - return id_; - } - /** - * int32 id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(int value) { - - id_ = value; - onChanged(); - return this; - } - /** - * int32 id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = 0; - onChanged(); - return this; - } - - private int messageType_ ; - /** - * int32 messageType = 2; - * @return The messageType. - */ - @Override - public int getMessageType() { - return messageType_; - } - /** - * int32 messageType = 2; - * @param value The messageType to set. - * @return This builder for chaining. - */ - public Builder setMessageType(int value) { - - messageType_ = value; - onChanged(); - return this; - } - /** - * int32 messageType = 2; - * @return This builder for chaining. - */ - public Builder clearMessageType() { - - messageType_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - String, String> headMap_; - private com.google.protobuf.MapField - internalGetHeadMap() { - if (headMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - return headMap_; - } - private com.google.protobuf.MapField - internalGetMutableHeadMap() { - onChanged();; - if (headMap_ == null) { - headMap_ = com.google.protobuf.MapField.newMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - if (!headMap_.isMutable()) { - headMap_ = headMap_.copy(); - } - return headMap_; - } - - public int getHeadMapCount() { - return internalGetHeadMap().getMap().size(); - } - /** - * map<string, string> headMap = 3; - */ - - @Override - public boolean containsHeadMap( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetHeadMap().getMap().containsKey(key); - } - /** - * Use {@link #getHeadMapMap()} instead. - */ - @Override - @Deprecated - public java.util.Map getHeadMap() { - return getHeadMapMap(); - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public java.util.Map getHeadMapMap() { - return internalGetHeadMap().getMap(); - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public String getHeadMapOrDefault( - String key, - String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public String getHeadMapOrThrow( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - if (!map.containsKey(key)) { - throw new IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearHeadMap() { - internalGetMutableHeadMap().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> headMap = 3; - */ - - public Builder removeHeadMap( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableHeadMap().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @Deprecated - public java.util.Map - getMutableHeadMap() { - return internalGetMutableHeadMap().getMutableMap(); - } - /** - * map<string, string> headMap = 3; - */ - public Builder putHeadMap( - String key, - String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableHeadMap().getMutableMap() - .put(key, value); - return this; - } - /** - * map<string, string> headMap = 3; - */ - - public Builder putAllHeadMap( - java.util.Map values) { - internalGetMutableHeadMap().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.Any body_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> bodyBuilder_; - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - public boolean hasBody() { - return bodyBuilder_ != null || body_ != null; - } - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - public com.google.protobuf.Any getBody() { - if (bodyBuilder_ == null) { - return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; - } else { - return bodyBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder setBody(com.google.protobuf.Any value) { - if (bodyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - body_ = value; - onChanged(); - } else { - bodyBuilder_.setMessage(value); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder setBody( - com.google.protobuf.Any.Builder builderForValue) { - if (bodyBuilder_ == null) { - body_ = builderForValue.build(); - onChanged(); - } else { - bodyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder mergeBody(com.google.protobuf.Any value) { - if (bodyBuilder_ == null) { - if (body_ != null) { - body_ = - com.google.protobuf.Any.newBuilder(body_).mergeFrom(value).buildPartial(); - } else { - body_ = value; - } - onChanged(); - } else { - bodyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder clearBody() { - if (bodyBuilder_ == null) { - body_ = null; - onChanged(); - } else { - body_ = null; - bodyBuilder_ = null; - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public com.google.protobuf.Any.Builder getBodyBuilder() { - - onChanged(); - return getBodyFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any body = 4; - */ - public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { - if (bodyBuilder_ != null) { - return bodyBuilder_.getMessageOrBuilder(); - } else { - return body_ == null ? - com.google.protobuf.Any.getDefaultInstance() : body_; - } - } - /** - * .google.protobuf.Any body = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getBodyFieldBuilder() { - if (bodyBuilder_ == null) { - bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getBody(), - getParentForChildren(), - isClean()); - body_ = null; - } - return bodyBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.core.protocol.GrpcMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.core.protocol.GrpcMessageProto) - private static final GrpcMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GrpcMessageProto(); - } - - public static GrpcMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GrpcMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GrpcMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GrpcMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProtoOrBuilder.java b/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProtoOrBuilder.java deleted file mode 100644 index 1a68b8f9b15..00000000000 --- a/core/src/main/java/org/apache/seata/core/protocol/generated/GrpcMessageProtoOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.core.protocol.generated; - -public interface GrpcMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.core.protocol.GrpcMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 id = 1; - * @return The id. - */ - int getId(); - - /** - * int32 messageType = 2; - * @return The messageType. - */ - int getMessageType(); - - /** - * map<string, string> headMap = 3; - */ - int getHeadMapCount(); - /** - * map<string, string> headMap = 3; - */ - boolean containsHeadMap( - String key); - /** - * Use {@link #getHeadMapMap()} instead. - */ - @Deprecated - java.util.Map - getHeadMap(); - /** - * map<string, string> headMap = 3; - */ - java.util.Map - getHeadMapMap(); - /** - * map<string, string> headMap = 3; - */ - - /* nullable */ -String getHeadMapOrDefault( - String key, - /* nullable */ -String defaultValue); - /** - * map<string, string> headMap = 3; - */ - - String getHeadMapOrThrow( - String key); - - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - boolean hasBody(); - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - com.google.protobuf.Any getBody(); - /** - * .google.protobuf.Any body = 4; - */ - com.google.protobuf.AnyOrBuilder getBodyOrBuilder(); -} diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java index 362872f1b3a..68ee02d71c0 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java @@ -17,7 +17,16 @@ package org.apache.seata.core.rpc.netty; import io.netty.bootstrap.Bootstrap; -import io.netty.channel.*; +import io.netty.channel.Channel; +import io.netty.channel.ChannelDuplexHandler; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.ChannelPipeline; +import io.netty.channel.EventLoopGroup; import io.netty.channel.epoll.EpollChannelOption; import io.netty.channel.epoll.EpollMode; import io.netty.channel.nio.NioEventLoopGroup; @@ -25,7 +34,6 @@ import io.netty.handler.codec.http2.Http2FrameCodecBuilder; import io.netty.handler.codec.http2.Http2MultiplexHandler; import io.netty.handler.codec.http2.Http2StreamChannelBootstrap; -import io.netty.handler.ssl.ApplicationProtocolConfig; import io.netty.handler.timeout.IdleStateHandler; import io.netty.util.concurrent.DefaultEventExecutorGroup; import io.netty.util.concurrent.EventExecutorGroup; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java index 61bbfa7b9b9..a68befb88e7 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java @@ -20,7 +20,13 @@ import org.apache.seata.core.constants.ConfigurationKeys; import org.apache.seata.core.rpc.TransportServerType; -import static org.apache.seata.common.DefaultValues.*; +import static org.apache.seata.common.DefaultValues.DEFAULT_ENABLE_CLIENT_BATCH_SEND_REQUEST; +import static org.apache.seata.common.DefaultValues.DEFAULT_PROTOCOL; +import static org.apache.seata.common.DefaultValues.DEFAULT_RPC_RM_REQUEST_TIMEOUT; +import static org.apache.seata.common.DefaultValues.DEFAULT_RPC_TM_REQUEST_TIMEOUT; +import static org.apache.seata.common.DefaultValues.DEFAULT_SELECTOR_THREAD_PREFIX; +import static org.apache.seata.common.DefaultValues.DEFAULT_SELECTOR_THREAD_SIZE; +import static org.apache.seata.common.DefaultValues.DEFAULT_WORKER_THREAD_PREFIX; /** * The type Netty client config. diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyServerBootstrap.java b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyServerBootstrap.java index cfda52b2e9c..b589396e5ab 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyServerBootstrap.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyServerBootstrap.java @@ -22,21 +22,21 @@ import java.util.concurrent.atomic.AtomicBoolean; import io.netty.bootstrap.ServerBootstrap; -import io.netty.channel.*; +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.WriteBufferWaterMark; import io.netty.channel.epoll.EpollEventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; -import io.netty.handler.codec.http2.Http2FrameCodecBuilder; -import io.netty.handler.codec.http2.Http2MultiplexHandler; -import io.netty.handler.codec.http2.Http2StreamChannel; import io.netty.handler.timeout.IdleStateHandler; import org.apache.seata.common.ConfigurationKeys; import org.apache.seata.common.XID; import org.apache.seata.common.thread.NamedThreadFactory; import org.apache.seata.config.ConfigurationFactory; import org.apache.seata.core.rpc.RemotingBootstrap; -import org.apache.seata.core.rpc.netty.grpc.GrpcDecoder; -import org.apache.seata.core.rpc.netty.grpc.GrpcEncoder; import org.apache.seata.discovery.registry.MultiRegistryFactory; import org.apache.seata.discovery.registry.RegistryService; import org.slf4j.Logger; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index db7bce61823..e2a8fdccc35 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -31,8 +31,8 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc byte[] bytes = new byte[content.readableBytes()]; content.readBytes(bytes); - // 第一个字节默认是0,表示无需解压缩 - // 读取后面四个字节的值,作为body的长度 + // The first byte defaults to 0, indicating that no decompression is required + // Read the value of the next four bytes as the length of the body int length = ((bytes[1] & 0xFF) << 24) | ((bytes[2] & 0xFF) << 16) | ((bytes[3] & 0xFF) << 8) | @@ -60,6 +60,6 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc } public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headersFrame) throws Exception { - // TODO 后续可以解压缩逻辑 + // TODO Subsequent decompression logic is possible } } diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java index d41d6cc34e7..10a42ce1eb0 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -54,14 +54,14 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) if (bodyBytes != null) { byte[] messageWithPrefix = new byte[bodyBytes.length + 5]; - // 第一个字节为0,表示不压缩 + // The first byte is 0, indicating no compression messageWithPrefix[0] = 0; ByteBuffer buffer = ByteBuffer.allocate(4); buffer.putInt(bodyBytes.length); byte[] lengthBytes = buffer.array(); - // 后四个字节表示长度 + // The last four bytes indicate the length System.arraycopy(lengthBytes, 0, messageWithPrefix, 1, 4); - // 剩余字节是body + // The remaining bytes are body System.arraycopy(bodyBytes, 0, messageWithPrefix, 5, bodyBytes.length); ctx.writeAndFlush(new DefaultHttp2DataFrame(Unpooled.wrappedBuffer(messageWithPrefix))); } diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java index 79c8f4e7233..6394c6e6c70 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java @@ -3,11 +3,11 @@ public enum GrpcHeaderEnum { /** - * grpc状态 + * grpc status */ GRPC_STATUS("grpc-status"), /** - * http2状态 + * http2 status */ HTTP2_STATUS(":status"), /** diff --git a/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer b/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer index f6fbf709dea..81c5235e259 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer +++ b/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer @@ -14,5 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -org.apache.seata.serializer.protobuf.ProtobufSerializer org.apache.seata.serializer.protobuf.GrpcSerializer \ No newline at end of file diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml index 120132ced1c..eb42839c567 100644 --- a/server/src/main/resources/application.yml +++ b/server/src/main/resources/application.yml @@ -1,23 +1,26 @@ -# Copyright 1999-2019 Seata.io Group. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. server: port: 7091 spring: application: - name: seata-server1 + name: seata-server logging: config: classpath:logback-spring.xml From 548fa422960a56ac99909d669244061cca428983 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sun, 25 Aug 2024 21:52:16 +0800 Subject: [PATCH 08/42] 1. mock test 2. support multi-version --- .../apache/seata/core/protocol/Protocol.java | 2 +- .../core/protocol/detector/SeataDetector.java | 13 +- .../core/rpc/netty/grpc/GrpcDecoder.java | 53 +- .../core/rpc/netty/grpc/GrpcEncoder.java | 2 +- .../grpc/generated/SeataServiceGrpc.java | 272 ----- seata-test-grpc/pom.xml | 127 -- .../account/DubboAccountServiceStarter.java | 47 - .../config/DataSourceConfiguration.java | 60 - .../account/config/DubboConfiguration.java | 59 - .../account/config/SeataConfiguration.java | 45 - .../service/impl/AccountServiceImpl.java | 46 - .../business/DubboBusinessServiceTester.java | 51 - .../business/config/DubboConfiguration.java | 50 - .../business/config/SeataConfiguration.java | 45 - .../service/impl/BusinessServiceImpl.java | 54 - .../org/apache/seata/grpc/GrpcClient.java | 77 -- .../seata/order/DubboOrderServiceStarter.java | 47 - .../order/config/DataSourceConfiguration.java | 60 - .../order/config/DubboConfiguration.java | 59 - .../order/config/SeataConfiguration.java | 45 - .../order/service/impl/OrderServiceImpl.java | 79 -- .../storage/DubboStorageServiceStarter.java | 47 - .../config/DataSourceConfiguration.java | 60 - .../storage/config/DubboConfiguration.java | 59 - .../storage/config/SeataConfiguration.java | 45 - .../service/impl/StorageServiceImpl.java | 61 - .../seata/grpc/generated/GrpcMessage.java | 71 -- .../grpc/generated/GrpcMessageProto.java | 1026 ----------------- .../generated/GrpcMessageProtoOrBuilder.java | 72 -- seata-test-grpc/src/main/resources/all.sql | 56 - .../src/main/resources/application.properties | 18 - seata-test-grpc/src/main/resources/file.conf | 127 -- .../src/main/resources/logback.xml | 13 - .../src/main/resources/registry.conf | 124 -- test/pom.xml | 18 +- .../core/rpc/netty/mockserver/GrpcTest.java | 163 +++ .../abstractBranchEndRequest.proto | 51 + .../abstractBranchEndResponse.proto | 35 + .../abstractGlobalEndRequest.proto | 33 + .../abstractGlobalEndResponse.proto | 32 + .../transcation/abstractIdentifyRequest.proto | 40 + .../abstractIdentifyResponse.proto | 35 + .../transcation/abstractMessage.proto | 26 +- .../transcation/abstractResultMessage.proto | 32 + .../abstractTransactionRequest.proto | 31 + .../abstractTransactionResponse.proto | 33 + .../transcation/batchResultMessage.proto | 33 + .../transcation/branchCommitRequest.proto | 31 + .../transcation/branchCommitResponse.proto | 31 + .../transcation/branchRegisterRequest.proto | 37 + .../transcation/branchRegisterResponse.proto | 32 + .../transcation/branchReportRequest.proto | 44 + .../transcation/branchReportResponse.proto | 30 + .../transcation/branchRollbackRequest.proto | 31 + .../transcation/branchRollbackResponse.proto | 31 + .../protocol/transcation/branchStatus.proto | 99 ++ .../protocol/transcation/branchType.proto | 24 +- .../transcation/globalBeginRequest.proto | 32 + .../transcation/globalBeginResponse.proto | 32 + .../transcation/globalCommitRequest.proto | 29 + .../transcation/globalCommitResponse.proto | 29 + .../transcation/globalLockQueryRequest.proto | 29 + .../transcation/globalLockQueryResponse.proto | 30 + .../transcation/globalReportRequest.proto | 31 + .../transcation/globalReportResponse.proto | 29 + .../transcation/globalRollbackRequest.proto | 29 + .../transcation/globalRollbackResponse.proto | 29 + .../protocol/transcation/globalStatus.proto | 124 ++ .../transcation/globalStatusRequest.proto | 29 + .../transcation/globalStatusResponse.proto | 29 + .../protocol/transcation}/grpcMessage.proto | 4 +- .../transcation/heartbeatMessage.proto | 19 +- .../transcation/mergedResultMessage.proto | 32 + .../transcation/mergedWarpMessage.proto | 33 + .../protocol/transcation/messageType.proto | 143 +++ .../transcation/registerRMRequest.proto | 32 + .../transcation/registerRMResponse.proto | 30 + .../transcation/registerTMRequest.proto | 30 + .../transcation/registerTMResponse.proto | 30 + .../protocol/transcation/resultCode.proto | 22 +- .../transactionExceptionCode.proto | 133 +++ .../transcation/undoLogDeleteRequest.proto | 46 + 82 files changed, 1976 insertions(+), 3083 deletions(-) delete mode 100644 seata-test-grpc/org/apache/seata/grpc/generated/SeataServiceGrpc.java delete mode 100644 seata-test-grpc/pom.xml delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/DubboAccountServiceStarter.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/config/DataSourceConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/config/DubboConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/config/SeataConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/account/service/impl/AccountServiceImpl.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/DubboBusinessServiceTester.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/config/DubboConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/config/SeataConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/business/service/impl/BusinessServiceImpl.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/DubboOrderServiceStarter.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/config/DataSourceConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/config/DubboConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/config/SeataConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/order/service/impl/OrderServiceImpl.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/DubboStorageServiceStarter.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/config/DataSourceConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/config/DubboConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/config/SeataConfiguration.java delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/storage/service/impl/StorageServiceImpl.java delete mode 100644 seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessage.java delete mode 100644 seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProto.java delete mode 100644 seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java delete mode 100644 seata-test-grpc/src/main/resources/all.sql delete mode 100644 seata-test-grpc/src/main/resources/application.properties delete mode 100644 seata-test-grpc/src/main/resources/file.conf delete mode 100644 seata-test-grpc/src/main/resources/logback.xml delete mode 100644 seata-test-grpc/src/main/resources/registry.conf create mode 100644 test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto rename seata-test-grpc/src/main/java/org/apache/seata/storage/service/StorageService.java => test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto (66%) create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto rename seata-test-grpc/src/main/java/org/apache/seata/business/service/BusinessService.java => test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto (71%) create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto rename {seata-test-grpc/src/main/proto => test/src/test/resources/protobuf/org/apache/seata/protocol/transcation}/grpcMessage.proto (76%) rename seata-test-grpc/src/main/java/org/apache/seata/order/service/OrderService.java => test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto (72%) create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto rename seata-test-grpc/src/main/java/org/apache/seata/account/service/AccountService.java => test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto (71%) create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto create mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto diff --git a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java index bbd834ba24c..4a30965783f 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java +++ b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java @@ -5,7 +5,7 @@ */ public enum Protocol { - GPRC("gprc"), + GPRC("grpc"), SEATA("seata"); diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java index b0a8d86327e..49b3c0f89c1 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java @@ -2,8 +2,7 @@ import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandler; -import org.apache.seata.core.rpc.netty.v1.ProtocolDecoderV1; -import org.apache.seata.core.rpc.netty.v1.ProtocolEncoderV1; +import org.apache.seata.core.rpc.netty.MultiProtocolDecoder; public class SeataDetector implements ProtocolDetector { private final byte[] MAGIC_CODE_BYTES = {(byte) 0xda, (byte) 0xda}; @@ -28,12 +27,8 @@ public boolean detect(ByteBuf in) { @Override public ChannelHandler[] getHandlers() { - ChannelHandler[] ret = new ChannelHandler[2 + serverHandlers.length]; - ret[0] = new ProtocolDecoderV1(); - ret[1] = new ProtocolEncoderV1(); - for (int i = 0; i < serverHandlers.length; i++) { - ret[2 + i] = serverHandlers[i]; - } - return ret; + MultiProtocolDecoder multiProtocolDecoder = new MultiProtocolDecoder(serverHandlers); + + return new ChannelHandler[]{multiProtocolDecoder}; } } \ No newline at end of file diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index e2a8fdccc35..e82b874381b 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -28,35 +28,44 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exception { ByteBuf content = msg.content(); - byte[] bytes = new byte[content.readableBytes()]; + int readableBytes = content.readableBytes(); + byte[] bytes = new byte[readableBytes]; content.readBytes(bytes); + if (bytes.length < 5) { + return; + } + + int srcPos = 0; + while (srcPos < readableBytes) { + // The first byte defaults to 0, indicating that no decompression is required + // Read the value of the next four bytes as the length of the body + int length = ((bytes[srcPos + 1] & 0xFF) << 24) | + ((bytes[srcPos + 2] & 0xFF) << 16) | + ((bytes[srcPos + 3] & 0xFF) << 8) | + (bytes[srcPos + 4] & 0xFF); - // The first byte defaults to 0, indicating that no decompression is required - // Read the value of the next four bytes as the length of the body - int length = ((bytes[1] & 0xFF) << 24) | - ((bytes[2] & 0xFF) << 16) | - ((bytes[3] & 0xFF) << 8) | - (bytes[4] & 0xFF); + byte[] data = new byte[length]; + System.arraycopy(bytes, srcPos + 5, data, 0, length); - byte[] data = new byte[length]; - System.arraycopy(bytes, 5, data, 0, length); + GrpcMessageProto grpcMessageProto = GrpcMessageProto.parseFrom(data); + Any body = grpcMessageProto.getBody(); + int messageType = grpcMessageProto.getMessageType(); + int messageId = grpcMessageProto.getId(); + byte[] byteArray = body.toByteArray(); - GrpcMessageProto grpcMessageProto = GrpcMessageProto.parseFrom(data); - Any body = grpcMessageProto.getBody(); - int messageType = grpcMessageProto.getMessageType(); - int messageId = grpcMessageProto.getId(); - byte[] byteArray = body.toByteArray(); + Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode())); + Object messageBody = serializer.deserialize(byteArray); - Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode())); - Object messageBody = serializer.deserialize(byteArray); + RpcMessage rpcMsg = new RpcMessage(); + rpcMsg.setMessageType((byte) messageType); + rpcMsg.setBody(messageBody); + rpcMsg.setId(messageId); + rpcMsg.setHeadMap(grpcMessageProto.getHeadMapMap()); - RpcMessage rpcMsg = new RpcMessage(); - rpcMsg.setMessageType((byte) messageType); - rpcMsg.setBody(messageBody); - rpcMsg.setId(messageId); - rpcMsg.setHeadMap(grpcMessageProto.getHeadMapMap()); + ctx.fireChannelRead(rpcMsg); - ctx.fireChannelRead(rpcMsg); + srcPos += length + 5; + } } public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headersFrame) throws Exception { diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java index 10a42ce1eb0..1c5a5e11533 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -43,7 +43,7 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) ctx.writeAndFlush(new DefaultHttp2HeadersFrame(headers)); } - Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode())); + Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode())); Any messageBody = Any.parseFrom(serializer.serialize(body)); GrpcMessageProto grpcMessageProto = GrpcMessageProto.newBuilder() .setBody(messageBody) diff --git a/seata-test-grpc/org/apache/seata/grpc/generated/SeataServiceGrpc.java b/seata-test-grpc/org/apache/seata/grpc/generated/SeataServiceGrpc.java deleted file mode 100644 index e40d2a522a0..00000000000 --- a/seata-test-grpc/org/apache/seata/grpc/generated/SeataServiceGrpc.java +++ /dev/null @@ -1,272 +0,0 @@ -package org.apache.seata.grpc.generated; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; -import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; -import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; -import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.27.1)", - comments = "Source: grpcMessage.proto") -public final class SeataServiceGrpc { - - private SeataServiceGrpc() {} - - public static final String SERVICE_NAME = "org.apache.seata.core.protocol.SeataService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getSendRequestMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "sendRequest", - requestType = org.apache.seata.grpc.generated.GrpcMessageProto.class, - responseType = org.apache.seata.grpc.generated.GrpcMessageProto.class, - methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor getSendRequestMethod() { - io.grpc.MethodDescriptor getSendRequestMethod; - if ((getSendRequestMethod = SeataServiceGrpc.getSendRequestMethod) == null) { - synchronized (SeataServiceGrpc.class) { - if ((getSendRequestMethod = SeataServiceGrpc.getSendRequestMethod) == null) { - SeataServiceGrpc.getSendRequestMethod = getSendRequestMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "sendRequest")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - org.apache.seata.grpc.generated.GrpcMessageProto.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - org.apache.seata.grpc.generated.GrpcMessageProto.getDefaultInstance())) - .setSchemaDescriptor(new SeataServiceMethodDescriptorSupplier("sendRequest")) - .build(); - } - } - } - return getSendRequestMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static SeataServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SeataServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceStub(channel, callOptions); - } - }; - return SeataServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static SeataServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SeataServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceBlockingStub(channel, callOptions); - } - }; - return SeataServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static SeataServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SeataServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceFutureStub(channel, callOptions); - } - }; - return SeataServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public static abstract class SeataServiceImplBase implements io.grpc.BindableService { - - /** - */ - public io.grpc.stub.StreamObserver sendRequest( - io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getSendRequestMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSendRequestMethod(), - asyncBidiStreamingCall( - new MethodHandlers< - org.apache.seata.grpc.generated.GrpcMessageProto, - org.apache.seata.grpc.generated.GrpcMessageProto>( - this, METHODID_SEND_REQUEST))) - .build(); - } - } - - /** - */ - public static final class SeataServiceStub extends io.grpc.stub.AbstractAsyncStub { - private SeataServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SeataServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceStub(channel, callOptions); - } - - /** - */ - public io.grpc.stub.StreamObserver sendRequest( - io.grpc.stub.StreamObserver responseObserver) { - return asyncBidiStreamingCall( - getChannel().newCall(getSendRequestMethod(), getCallOptions()), responseObserver); - } - } - - /** - */ - public static final class SeataServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private SeataServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SeataServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceBlockingStub(channel, callOptions); - } - } - - /** - */ - public static final class SeataServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private SeataServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SeataServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceFutureStub(channel, callOptions); - } - } - - private static final int METHODID_SEND_REQUEST = 0; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final SeataServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(SeataServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_SEND_REQUEST: - return (io.grpc.stub.StreamObserver) serviceImpl.sendRequest( - (io.grpc.stub.StreamObserver) responseObserver); - default: - throw new AssertionError(); - } - } - } - - private static abstract class SeataServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - SeataServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return org.apache.seata.grpc.generated.GrpcMessage.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("SeataService"); - } - } - - private static final class SeataServiceFileDescriptorSupplier - extends SeataServiceBaseDescriptorSupplier { - SeataServiceFileDescriptorSupplier() {} - } - - private static final class SeataServiceMethodDescriptorSupplier - extends SeataServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - SeataServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (SeataServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new SeataServiceFileDescriptorSupplier()) - .addMethod(getSendRequestMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/seata-test-grpc/pom.xml b/seata-test-grpc/pom.xml deleted file mode 100644 index b849f8154d9..00000000000 --- a/seata-test-grpc/pom.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - org.apache.seata - seata-parent - ${revision} - - 4.0.0 - seata-test-grpc - jar - seata-test-grpc ${project.version} - - UTF-8 - UTF-8 - 1.8 - 1.8 - - - - - - org.slf4j - slf4j-api - 1.7.32 - - - - ch.qos.logback - logback-classic - 1.2.13 - - - - ch.qos.logback - logback-core - 1.2.13 - - - - com.alibaba.spring - spring-context-support - 1.0.11 - - - - org.slf4j - jcl-over-slf4j - 1.7.32 - - - org.slf4j - log4j-over-slf4j - 1.7.32 - - - - - org.springframework - spring-jdbc - 5.3.20 - - - - org.apache.seata - seata-all - 2.1.0-SNAPSHOT - - - - com.fasterxml.jackson.core - jackson-databind - 2.13.5 - - - - mysql - mysql-connector-java - 8.0.28 - - - - org.apache.dubbo - dubbo - 3.1.11 - - - - org.apache.dubbo - dubbo-remoting-zookeeper-curator5 - 3.1.2 - - - org.apache.curator - curator-x-discovery - 5.1.0 - - - - com.alibaba.nacos - nacos-client - 2.3.0 - - - commons-lang - commons-lang - 2.6 - - - com.alibaba - druid - 1.2.7 - - - com.typesafe - config - 1.2.1 - - - commons-pool - commons-pool - 1.6 - - - - \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/DubboAccountServiceStarter.java b/seata-test-grpc/src/main/java/org/apache/seata/account/DubboAccountServiceStarter.java deleted file mode 100644 index 698d12ed195..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/account/DubboAccountServiceStarter.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.account; - -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; - - -@EnableAutoDataSourceProxy -@EnableDubbo(scanBasePackages = {"org.apache.seata.account"}) -@ComponentScan(basePackages = {"org.apache.seata.account"}) -public class DubboAccountServiceStarter { - - /** - * Enable PropertySource placeHolder - */ - @Bean - public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - - public static void main(String[] args) throws InterruptedException { - new AnnotationConfigApplicationContext(DubboAccountServiceStarter.class); - - //keep run - Thread.currentThread().join(); - } - -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/config/DataSourceConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/account/config/DataSourceConfiguration.java deleted file mode 100644 index 038ceee8211..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/account/config/DataSourceConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.account.config; - -import com.alibaba.druid.pool.DruidDataSource; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.jdbc.core.JdbcTemplate; - -import javax.sql.DataSource; - -/** - * DataSource Configuration - */ -@Configuration -@PropertySource("classpath:application.properties") -public class DataSourceConfiguration { - - - @Value("${spring.datasource.account.driverClassName}") - private String driverClassName; - @Value("${spring.datasource.account.url}") - private String url; - @Value("${spring.datasource.account.username}") - private String userName; - @Value("${spring.datasource.account.password}") - private String password; - - @Bean - public DataSource accountDataSource() { - DruidDataSource druidDataSource = new DruidDataSource(); - druidDataSource.setUsername(userName); - druidDataSource.setPassword(password); - druidDataSource.setUrl(url); - druidDataSource.setDriverClassName(driverClassName); - return druidDataSource; - } - - @Bean - public JdbcTemplate jdbcTemplate(@Qualifier("accountDataSource") DataSource dataSource) { - return new JdbcTemplate(dataSource); - } -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/config/DubboConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/account/config/DubboConfiguration.java deleted file mode 100644 index 9bfbf556e28..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/account/config/DubboConfiguration.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.account.config; - -import org.apache.dubbo.config.ApplicationConfig; -import org.apache.dubbo.config.ProtocolConfig; -import org.apache.dubbo.config.RegistryConfig; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -/** - * @author wangte - * Create At 2024/1/20 - */ -@Configuration -@PropertySource("classpath:application.properties") -public class DubboConfiguration { - - @Value("${spring.account.application.name}") - private String applicationName; - - @Bean - public ApplicationConfig applicationConfig() { - ApplicationConfig applicationConfig = new ApplicationConfig(applicationName); - applicationConfig.setQosEnable(false); - return applicationConfig; - } - - @Bean - public RegistryConfig registryConfig() { - RegistryConfig registryConfig = new RegistryConfig(); - registryConfig.setAddress("nacos://127.0.0.1:8848"); - return registryConfig; - } - - @Bean - public ProtocolConfig protocolConfig() { - ProtocolConfig protocolConfig = new ProtocolConfig(); - protocolConfig.setName("dubbo"); - protocolConfig.setPort(20881); - return protocolConfig; - } -} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/config/SeataConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/account/config/SeataConfiguration.java deleted file mode 100644 index cd43c1d0a7b..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/account/config/SeataConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.account.config; - -import org.apache.seata.spring.annotation.GlobalTransactionScanner; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -/** - * Seata Config - */ -@Configuration -@PropertySource("classpath:application.properties") -public class SeataConfiguration { - - @Value("${spring.account.application.name}") - private String applicationName; - - /** - * 注册一个StatViewServlet - * - * @return global transaction scanner - */ - @Bean - public GlobalTransactionScanner globalTransactionScanner() { - return new GlobalTransactionScanner(applicationName, "my_test_tx_group"); - } - -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/service/impl/AccountServiceImpl.java b/seata-test-grpc/src/main/java/org/apache/seata/account/service/impl/AccountServiceImpl.java deleted file mode 100644 index 12a9dfa8d61..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/account/service/impl/AccountServiceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.account.service.impl; - -import org.apache.dubbo.config.annotation.DubboService; -import org.apache.seata.account.service.AccountService; -import org.apache.seata.core.context.RootContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.jdbc.core.JdbcTemplate; - -import javax.annotation.Resource; - -@DubboService -public class AccountServiceImpl implements AccountService { - - private static final Logger LOGGER = LoggerFactory.getLogger(AccountService.class); - - @Resource - private JdbcTemplate jdbcTemplate; - - @Override - public void debit(String userId, int money) { - LOGGER.info("Account Service ... xid: " + RootContext.getXID()); - LOGGER.info("Deducting balance SQL: update account_tbl set money = money - {} where user_id = {}", money, - userId); - - jdbcTemplate.update("update account_tbl set money = money - ? where user_id = ?", new Object[]{money, userId}); - LOGGER.info("Account Service End ... "); - } - -} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/DubboBusinessServiceTester.java b/seata-test-grpc/src/main/java/org/apache/seata/business/DubboBusinessServiceTester.java deleted file mode 100644 index 71da0a06b0a..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/business/DubboBusinessServiceTester.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.business; - -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.seata.business.service.BusinessService; -import org.apache.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; - -@EnableAutoDataSourceProxy -@EnableDubbo -@ComponentScan(basePackages = {"org.apache.seata.business"}) -public class DubboBusinessServiceTester { - - /** - * Enable PropertySource placeHolder - */ - @Bean - public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - - public static void main(String[] args) throws InterruptedException { - AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(DubboBusinessServiceTester.class); - - BusinessService businessService = annotationConfigApplicationContext.getBean(BusinessService.class); - Thread thread = new Thread(() -> businessService.purchase("U100001", "C00321", 2)); - thread.start(); - - //keep run - Thread.currentThread().join(); - } - -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/config/DubboConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/business/config/DubboConfiguration.java deleted file mode 100644 index 29070e95cf1..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/business/config/DubboConfiguration.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.business.config; - -import org.apache.dubbo.config.ApplicationConfig; -import org.apache.dubbo.config.RegistryConfig; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -/** - * @author wangte - * Create At 2024/1/20 - */ -@Configuration -@PropertySource("classpath:application.properties") -public class DubboConfiguration { - - @Value("${spring.business.application.name}") - private String applicationName; - - @Bean - public ApplicationConfig applicationConfig() { - ApplicationConfig applicationConfig = new ApplicationConfig(applicationName); - applicationConfig.setQosEnable(false); - return applicationConfig; - } - - @Bean - public RegistryConfig registryConfig() { - RegistryConfig registryConfig = new RegistryConfig(); - registryConfig.setAddress("nacos://127.0.0.1:8848"); - return registryConfig; - } -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/config/SeataConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/business/config/SeataConfiguration.java deleted file mode 100644 index ca0229b14cf..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/business/config/SeataConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.business.config; - -import org.apache.seata.spring.annotation.GlobalTransactionScanner; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -/** - * Seata Config - */ -@Configuration -@PropertySource("classpath:application.properties") -public class SeataConfiguration { - - @Value("${spring.business.application.name}") - private String applicationName; - - /** - * 注册一个StatViewServlet - * - * @return global transaction scanner - */ - @Bean - public GlobalTransactionScanner globalTransactionScanner() { - return new GlobalTransactionScanner(applicationName, "my_test_tx_group"); - } - -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/service/impl/BusinessServiceImpl.java b/seata-test-grpc/src/main/java/org/apache/seata/business/service/impl/BusinessServiceImpl.java deleted file mode 100644 index 6560424ceff..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/business/service/impl/BusinessServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.business.service.impl; - -import org.apache.dubbo.config.annotation.DubboReference; -import org.apache.seata.business.service.BusinessService; -import org.apache.seata.core.context.RootContext; -import org.apache.seata.order.service.OrderService; -import org.apache.seata.spring.annotation.GlobalTransactional; -import org.apache.seata.storage.service.StorageService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; - -import java.util.Random; - -@Service -public class BusinessServiceImpl implements BusinessService { - - private static final Logger LOGGER = LoggerFactory.getLogger(BusinessService.class); - - @DubboReference - private StorageService storageService; - @DubboReference - private OrderService orderService; - private final Random random = new Random(); - - @Override - @GlobalTransactional(timeoutMills = 300000, name = "spring-dubbo-tx") - public void purchase(String userId, String commodityCode, int orderCount) { - LOGGER.info("purchase begin ... xid: " + RootContext.getXID()); - storageService.deduct(commodityCode, orderCount); - // just test batch update - //stockS ervice.batchDeduct(commodityCode, orderCount); - orderService.create(userId, commodityCode, orderCount); -// if (random.nextBoolean()) { -// throw new RuntimeException("random exception mock!"); -// } - } -} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java deleted file mode 100644 index a03af70027e..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/grpc/GrpcClient.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.apache.seata.grpc; - -import com.google.protobuf.Any; -import io.grpc.ManagedChannel; -import io.grpc.ManagedChannelBuilder; -import io.grpc.stub.StreamObserver; -import org.apache.seata.serializer.protobuf.generated.AbstractIdentifyRequestProto; -import org.apache.seata.serializer.protobuf.generated.RegisterTMRequestProto; -import org.apache.seata.grpc.generated.GrpcMessageProto; -import org.apache.seata.grpc.generated.SeataServiceGrpc; - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -public class GrpcClient { - - private final ManagedChannel channel; - private final SeataServiceGrpc.SeataServiceStub seataServiceStub; - - public GrpcClient(String localhost, int port) { - this(ManagedChannelBuilder.forAddress(localhost, port).usePlaintext().build()); - } - - public GrpcClient(ManagedChannel channel) { - this.channel = channel; - seataServiceStub = SeataServiceGrpc.newStub(channel); - } - - public static void main(String[] args) { - GrpcClient grpcClient = new GrpcClient("localhost", 8091); - grpcClient.doRequest(); - } - - private void doRequest() { - final CountDownLatch finish = new CountDownLatch(1); - - AbstractIdentifyRequestProto abstractIdentifyRequestProto = AbstractIdentifyRequestProto.newBuilder() - .setApplicationId("test-grpc") - .build(); - RegisterTMRequestProto registerTMRequestProto = RegisterTMRequestProto.newBuilder() - .setAbstractIdentifyRequest(abstractIdentifyRequestProto) - .build(); - - GrpcMessageProto request = GrpcMessageProto.newBuilder().setBody(Any.pack(registerTMRequestProto)).build(); - StreamObserver response; - - try { - - response = seataServiceStub.sendRequest(new StreamObserver() { - @Override - public void onNext(GrpcMessageProto grpcMessageProto) { - System.out.println("receive : " + grpcMessageProto.toString()); - } - - @Override - public void onError(Throwable throwable) { - - } - - @Override - public void onCompleted() { - - } - }); - - response.onNext(request); - } catch (Throwable e) { - e.printStackTrace(); - } - - try { - finish.await(1, TimeUnit.MINUTES); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/DubboOrderServiceStarter.java b/seata-test-grpc/src/main/java/org/apache/seata/order/DubboOrderServiceStarter.java deleted file mode 100644 index f5b1a8797bb..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/order/DubboOrderServiceStarter.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.order; - -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; - - -@EnableAutoDataSourceProxy -@EnableDubbo(scanBasePackages = {"org.apache.seata.order"}) -@ComponentScan(basePackages = {"org.apache.seata.order"}) -public class DubboOrderServiceStarter { - - /** - * Enable PropertySource placeHolder - */ - @Bean - public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - - public static void main(String[] args) throws InterruptedException { - new AnnotationConfigApplicationContext(DubboOrderServiceStarter.class); - - //keep run - Thread.currentThread().join(); - } - -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/config/DataSourceConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/order/config/DataSourceConfiguration.java deleted file mode 100644 index 712324cff6b..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/order/config/DataSourceConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.order.config; - -import com.alibaba.druid.pool.DruidDataSource; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.jdbc.core.JdbcTemplate; - -import javax.sql.DataSource; - -/** - * DataSource Configuration - */ -@Configuration -@PropertySource("classpath:application.properties") -public class DataSourceConfiguration { - - - @Value("${spring.datasource.order.driverClassName}") - private String driverClassName; - @Value("${spring.datasource.order.url}") - private String url; - @Value("${spring.datasource.order.username}") - private String userName; - @Value("${spring.datasource.order.password}") - private String password; - - @Bean - public DataSource orderDataSource() { - DruidDataSource druidDataSource = new DruidDataSource(); - druidDataSource.setUsername(userName); - druidDataSource.setPassword(password); - druidDataSource.setUrl(url); - druidDataSource.setDriverClassName(driverClassName); - return druidDataSource; - } - - @Bean - public JdbcTemplate jdbcTemplate(@Qualifier("orderDataSource") DataSource dataSource) { - return new JdbcTemplate(dataSource); - } -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/config/DubboConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/order/config/DubboConfiguration.java deleted file mode 100644 index 7277cb1d351..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/order/config/DubboConfiguration.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.order.config; - -import org.apache.dubbo.config.ApplicationConfig; -import org.apache.dubbo.config.ProtocolConfig; -import org.apache.dubbo.config.RegistryConfig; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -/** - * @author wangte - * Create At 2024/1/20 - */ -@Configuration -@PropertySource("classpath:application.properties") -public class DubboConfiguration { - - @Value("${spring.order.application.name}") - private String applicationName; - - - @Bean - public ApplicationConfig applicationConfig() { - ApplicationConfig applicationConfig = new ApplicationConfig(applicationName); - applicationConfig.setQosEnable(false); - return applicationConfig; - } - @Bean - public RegistryConfig registryConfig() { - RegistryConfig registryConfig = new RegistryConfig(); - registryConfig.setAddress("nacos://127.0.0.1:8848"); - return registryConfig; - } - - @Bean - public ProtocolConfig protocolConfig() { - ProtocolConfig protocolConfig = new ProtocolConfig(); - protocolConfig.setName("dubbo"); - protocolConfig.setPort(20883); - return protocolConfig; - } -} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/config/SeataConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/order/config/SeataConfiguration.java deleted file mode 100644 index dc81ef86b26..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/order/config/SeataConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.order.config; - -import org.apache.seata.spring.annotation.GlobalTransactionScanner; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -/** - * Seata Config - */ -@Configuration -@PropertySource("classpath:application.properties") -public class SeataConfiguration { - - @Value("${spring.order.application.name}") - private String applicationName; - - /** - * 注册一个StatViewServlet - * - * @return global transaction scanner - */ - @Bean - public GlobalTransactionScanner globalTransactionScanner() { - return new GlobalTransactionScanner(applicationName, "my_test_tx_group"); - } - -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/service/impl/OrderServiceImpl.java b/seata-test-grpc/src/main/java/org/apache/seata/order/service/impl/OrderServiceImpl.java deleted file mode 100644 index 69499f988a1..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/order/service/impl/OrderServiceImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.order.service.impl; - -import org.apache.dubbo.config.annotation.DubboReference; -import org.apache.dubbo.config.annotation.DubboService; -import org.apache.seata.account.service.AccountService; -import org.apache.seata.core.context.RootContext; -import org.apache.seata.order.service.OrderService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.jdbc.support.GeneratedKeyHolder; -import org.springframework.jdbc.support.KeyHolder; - -import javax.annotation.Resource; -import java.sql.PreparedStatement; -import java.util.Objects; - -@DubboService -public class OrderServiceImpl implements OrderService { - - private static final Logger LOGGER = LoggerFactory.getLogger(OrderService.class); - - @Resource - private JdbcTemplate jdbcTemplate; - - @DubboReference - private AccountService accountService; - - @Override - public void create(String userId, String commodityCode, int orderCount) { - LOGGER.info("Order Service Begin ... xid: " + RootContext.getXID()); - - // 计算订单金额 - int orderMoney = calculate(commodityCode, orderCount); - - // 从账户余额扣款 - accountService.debit(userId, orderMoney); - - LOGGER.info( - "Order Service SQL: insert into order_tbl (user_id, commodity_code, count, money) values ({}, {}, {}, {})", - userId, commodityCode, orderCount, orderMoney); - - KeyHolder keyHolder = new GeneratedKeyHolder(); - jdbcTemplate.update(con -> { - PreparedStatement pst = con.prepareStatement( - "insert into order_tbl (user_id, commodity_code, count, money) values (?, ?, ?, ?)", - PreparedStatement.RETURN_GENERATED_KEYS); - pst.setObject(1, userId); - pst.setObject(2, commodityCode); - pst.setObject(3, orderCount); - pst.setObject(4, orderMoney); - return pst; - }, keyHolder); - - - LOGGER.info("Order Service End ... Created " + Objects.requireNonNull(keyHolder.getKey()).longValue()); - } - - private int calculate(String commodityId, int orderCount) { - return 200 * orderCount; - } - -} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/DubboStorageServiceStarter.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/DubboStorageServiceStarter.java deleted file mode 100644 index a61feffe548..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/storage/DubboStorageServiceStarter.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.storage; - -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.apache.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; - - -@EnableAutoDataSourceProxy -@EnableDubbo -@ComponentScan(basePackages = {"org.apache.seata.storage"}) -public class DubboStorageServiceStarter { - - /** - * Enable PropertySource placeHolder - */ - @Bean - public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - - public static void main(String[] args) throws InterruptedException { - new AnnotationConfigApplicationContext(DubboStorageServiceStarter.class); - - //keep run - Thread.currentThread().join(); - } - -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DataSourceConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DataSourceConfiguration.java deleted file mode 100644 index 58a4a8a72cc..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DataSourceConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.storage.config; - -import com.alibaba.druid.pool.DruidDataSource; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.jdbc.core.JdbcTemplate; - -import javax.sql.DataSource; - -/** - * DataSource Configuration - */ -@Configuration -@PropertySource("classpath:application.properties") -public class DataSourceConfiguration { - - - @Value("${spring.datasource.stock.driverClassName}") - private String driverClassName; - @Value("${spring.datasource.stock.url}") - private String url; - @Value("${spring.datasource.stock.username}") - private String userName; - @Value("${spring.datasource.stock.password}") - private String password; - - @Bean - public DataSource storageDataSource() { - DruidDataSource druidDataSource = new DruidDataSource(); - druidDataSource.setUsername(userName); - druidDataSource.setPassword(password); - druidDataSource.setUrl(url); - druidDataSource.setDriverClassName(driverClassName); - return druidDataSource; - } - - @Bean - public JdbcTemplate jdbcTemplate(@Qualifier("storageDataSource") DataSource dataSource) { - return new JdbcTemplate(dataSource); - } -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DubboConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DubboConfiguration.java deleted file mode 100644 index 85514bbf470..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/DubboConfiguration.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.storage.config; - -import org.apache.dubbo.config.ApplicationConfig; -import org.apache.dubbo.config.ProtocolConfig; -import org.apache.dubbo.config.RegistryConfig; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -/** - * @author wangte - * Create At 2024/1/20 - */ -@Configuration -@PropertySource("classpath:application.properties") -public class DubboConfiguration { - - @Value("${spring.storage.application.name}") - private String applicationName; - - @Bean - public ApplicationConfig applicationConfig() { - ApplicationConfig applicationConfig = new ApplicationConfig(applicationName); - applicationConfig.setQosEnable(false); - return applicationConfig; - } - - @Bean - public RegistryConfig registryConfig() { - RegistryConfig registryConfig = new RegistryConfig(); - registryConfig.setAddress("nacos://127.0.0.1:8848"); - return registryConfig; - } - - @Bean - public ProtocolConfig protocolConfig() { - ProtocolConfig protocolConfig = new ProtocolConfig(); - protocolConfig.setName("dubbo"); - protocolConfig.setPort(20882); - return protocolConfig; - } -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/SeataConfiguration.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/config/SeataConfiguration.java deleted file mode 100644 index b5297677fc3..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/storage/config/SeataConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.storage.config; - -import org.apache.seata.spring.annotation.GlobalTransactionScanner; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; - -/** - * Seata Config - */ -@Configuration -@PropertySource("classpath:application.properties") -public class SeataConfiguration { - - @Value("${spring.storage.application.name}") - private String applicationName; - - /** - * 注册一个StatViewServlet - * - * @return global transaction scanner - */ - @Bean - public GlobalTransactionScanner globalTransactionScanner() { - return new GlobalTransactionScanner(applicationName, "my_test_tx_group"); - } - -} diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/service/impl/StorageServiceImpl.java b/seata-test-grpc/src/main/java/org/apache/seata/storage/service/impl/StorageServiceImpl.java deleted file mode 100644 index a83503847a5..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/storage/service/impl/StorageServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.seata.storage.service.impl; - -import org.apache.dubbo.config.annotation.DubboService; -import org.apache.seata.core.context.RootContext; -import org.apache.seata.storage.service.StorageService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.jdbc.core.JdbcTemplate; - -import javax.annotation.Resource; - -@DubboService -public class StorageServiceImpl implements StorageService { - - private static final Logger LOGGER = LoggerFactory.getLogger(StorageService.class); - - @Resource - private JdbcTemplate jdbcTemplate; - - @Override - public void deduct(String commodityCode, int count) { - LOGGER.info("Stock Service Begin ... xid: " + RootContext.getXID()); - LOGGER.info("Deducting inventory SQL: update stock_tbl set count = count - {} where commodity_code = {}", count, - commodityCode); - - jdbcTemplate.update("update stock_tbl set count = count - ? where commodity_code = ?", - new Object[]{count, commodityCode}); - LOGGER.info("Stock Service End ... "); - - } - - @Override - public void batchDeduct(String commodityCode, int count) { - LOGGER.info("Stock Service Begin ... xid: " + RootContext.getXID()); - LOGGER.info("Deducting inventory SQL: update stock_tbl set count = count - {} where commodity_code = {}", count, - commodityCode); - - jdbcTemplate.batchUpdate( - "update stock_tbl set count = count - " + count + " where commodity_code = '" + commodityCode + "'", - "update stock_tbl set count = count - " + count + " where commodity_code = '" + commodityCode + "'"); - LOGGER.info("Stock Service End ... "); - - } - -} \ No newline at end of file diff --git a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessage.java b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessage.java deleted file mode 100644 index 19ea61d3137..00000000000 --- a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessage.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.grpc.generated; - -public final class GrpcMessage { - private GrpcMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\021grpcMessage.proto\022\036org.apache.seata.co" + - "re.protocol\032\031google/protobuf/any.proto\"\327" + - "\001\n\020GrpcMessageProto\022\n\n\002id\030\001 \001(\005\022\023\n\013messa" + - "geType\030\002 \001(\005\022N\n\007headMap\030\003 \003(\0132=.org.apac" + - "he.seata.core.protocol.GrpcMessageProto." + - "HeadMapEntry\022\"\n\004body\030\004 \001(\0132\024.google.prot" + - "obuf.Any\032.\n\014HeadMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + - "\005value\030\002 \001(\t:\0028\0012\205\001\n\014SeataService\022u\n\013sen" + - "dRequest\0220.org.apache.seata.core.protoco" + - "l.GrpcMessageProto\0320.org.apache.seata.co" + - "re.protocol.GrpcMessageProto(\0010\001B0\n\037org." + - "apache.seata.grpc.generatedB\013GrpcMessage" + - "P\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - }); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor, - new java.lang.String[] { "Id", "MessageType", "HeadMap", "Body", }); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor = - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor.getNestedTypes().get(0); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProto.java b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProto.java deleted file mode 100644 index 69241e9bd0f..00000000000 --- a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProto.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.grpc.generated; - -/** - * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} - */ -public final class GrpcMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.core.protocol.GrpcMessageProto) - GrpcMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GrpcMessageProto.newBuilder() to construct. - private GrpcMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GrpcMessageProto() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GrpcMessageProto(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GrpcMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - id_ = input.readInt32(); - break; - } - case 16: { - - messageType_ = input.readInt32(); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - headMap_ = com.google.protobuf.MapField.newMapField( - HeadMapDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - headMap__ = input.readMessage( - HeadMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - headMap_.getMutableMap().put( - headMap__.getKey(), headMap__.getValue()); - break; - } - case 34: { - com.google.protobuf.Any.Builder subBuilder = null; - if (body_ != null) { - subBuilder = body_.toBuilder(); - } - body_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(body_); - body_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.apache.seata.grpc.generated.GrpcMessageProto.class, org.apache.seata.grpc.generated.GrpcMessageProto.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - private int id_; - /** - * int32 id = 1; - * @return The id. - */ - @java.lang.Override - public int getId() { - return id_; - } - - public static final int MESSAGETYPE_FIELD_NUMBER = 2; - private int messageType_; - /** - * int32 messageType = 2; - * @return The messageType. - */ - @java.lang.Override - public int getMessageType() { - return messageType_; - } - - public static final int HEADMAP_FIELD_NUMBER = 3; - private static final class HeadMapDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> headMap_; - private com.google.protobuf.MapField - internalGetHeadMap() { - if (headMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - return headMap_; - } - - public int getHeadMapCount() { - return internalGetHeadMap().getMap().size(); - } - /** - * map<string, string> headMap = 3; - */ - - @java.lang.Override - public boolean containsHeadMap( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetHeadMap().getMap().containsKey(key); - } - /** - * Use {@link #getHeadMapMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getHeadMap() { - return getHeadMapMap(); - } - /** - * map<string, string> headMap = 3; - */ - @java.lang.Override - - public java.util.Map getHeadMapMap() { - return internalGetHeadMap().getMap(); - } - /** - * map<string, string> headMap = 3; - */ - @java.lang.Override - - public java.lang.String getHeadMapOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> headMap = 3; - */ - @java.lang.Override - - public java.lang.String getHeadMapOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int BODY_FIELD_NUMBER = 4; - private com.google.protobuf.Any body_; - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - @java.lang.Override - public boolean hasBody() { - return body_ != null; - } - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - @java.lang.Override - public com.google.protobuf.Any getBody() { - return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; - } - /** - * .google.protobuf.Any body = 4; - */ - @java.lang.Override - public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { - return getBody(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (id_ != 0) { - output.writeInt32(1, id_); - } - if (messageType_ != 0) { - output.writeInt32(2, messageType_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetHeadMap(), - HeadMapDefaultEntryHolder.defaultEntry, - 3); - if (body_ != null) { - output.writeMessage(4, getBody()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (id_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, id_); - } - if (messageType_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, messageType_); - } - for (java.util.Map.Entry entry - : internalGetHeadMap().getMap().entrySet()) { - com.google.protobuf.MapEntry - headMap__ = HeadMapDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, headMap__); - } - if (body_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getBody()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof org.apache.seata.grpc.generated.GrpcMessageProto)) { - return super.equals(obj); - } - org.apache.seata.grpc.generated.GrpcMessageProto other = (org.apache.seata.grpc.generated.GrpcMessageProto) obj; - - if (getId() - != other.getId()) return false; - if (getMessageType() - != other.getMessageType()) return false; - if (!internalGetHeadMap().equals( - other.internalGetHeadMap())) return false; - if (hasBody() != other.hasBody()) return false; - if (hasBody()) { - if (!getBody() - .equals(other.getBody())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId(); - hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER; - hash = (53 * hash) + getMessageType(); - if (!internalGetHeadMap().getMap().isEmpty()) { - hash = (37 * hash) + HEADMAP_FIELD_NUMBER; - hash = (53 * hash) + internalGetHeadMap().hashCode(); - } - if (hasBody()) { - hash = (37 * hash) + BODY_FIELD_NUMBER; - hash = (53 * hash) + getBody().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static org.apache.seata.grpc.generated.GrpcMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(org.apache.seata.grpc.generated.GrpcMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.core.protocol.GrpcMessageProto) - org.apache.seata.grpc.generated.GrpcMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 3: - return internalGetMutableHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.apache.seata.grpc.generated.GrpcMessageProto.class, org.apache.seata.grpc.generated.GrpcMessageProto.Builder.class); - } - - // Construct using org.apache.seata.grpc.generated.GrpcMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - id_ = 0; - - messageType_ = 0; - - internalGetMutableHeadMap().clear(); - if (bodyBuilder_ == null) { - body_ = null; - } else { - body_ = null; - bodyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.apache.seata.grpc.generated.GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @java.lang.Override - public org.apache.seata.grpc.generated.GrpcMessageProto getDefaultInstanceForType() { - return org.apache.seata.grpc.generated.GrpcMessageProto.getDefaultInstance(); - } - - @java.lang.Override - public org.apache.seata.grpc.generated.GrpcMessageProto build() { - org.apache.seata.grpc.generated.GrpcMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public org.apache.seata.grpc.generated.GrpcMessageProto buildPartial() { - org.apache.seata.grpc.generated.GrpcMessageProto result = new org.apache.seata.grpc.generated.GrpcMessageProto(this); - int from_bitField0_ = bitField0_; - result.id_ = id_; - result.messageType_ = messageType_; - result.headMap_ = internalGetHeadMap(); - result.headMap_.makeImmutable(); - if (bodyBuilder_ == null) { - result.body_ = body_; - } else { - result.body_ = bodyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.apache.seata.grpc.generated.GrpcMessageProto) { - return mergeFrom((org.apache.seata.grpc.generated.GrpcMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.apache.seata.grpc.generated.GrpcMessageProto other) { - if (other == org.apache.seata.grpc.generated.GrpcMessageProto.getDefaultInstance()) return this; - if (other.getId() != 0) { - setId(other.getId()); - } - if (other.getMessageType() != 0) { - setMessageType(other.getMessageType()); - } - internalGetMutableHeadMap().mergeFrom( - other.internalGetHeadMap()); - if (other.hasBody()) { - mergeBody(other.getBody()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.apache.seata.grpc.generated.GrpcMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.apache.seata.grpc.generated.GrpcMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int id_ ; - /** - * int32 id = 1; - * @return The id. - */ - @java.lang.Override - public int getId() { - return id_; - } - /** - * int32 id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(int value) { - - id_ = value; - onChanged(); - return this; - } - /** - * int32 id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = 0; - onChanged(); - return this; - } - - private int messageType_ ; - /** - * int32 messageType = 2; - * @return The messageType. - */ - @java.lang.Override - public int getMessageType() { - return messageType_; - } - /** - * int32 messageType = 2; - * @param value The messageType to set. - * @return This builder for chaining. - */ - public Builder setMessageType(int value) { - - messageType_ = value; - onChanged(); - return this; - } - /** - * int32 messageType = 2; - * @return This builder for chaining. - */ - public Builder clearMessageType() { - - messageType_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> headMap_; - private com.google.protobuf.MapField - internalGetHeadMap() { - if (headMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - return headMap_; - } - private com.google.protobuf.MapField - internalGetMutableHeadMap() { - onChanged();; - if (headMap_ == null) { - headMap_ = com.google.protobuf.MapField.newMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - if (!headMap_.isMutable()) { - headMap_ = headMap_.copy(); - } - return headMap_; - } - - public int getHeadMapCount() { - return internalGetHeadMap().getMap().size(); - } - /** - * map<string, string> headMap = 3; - */ - - @java.lang.Override - public boolean containsHeadMap( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetHeadMap().getMap().containsKey(key); - } - /** - * Use {@link #getHeadMapMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getHeadMap() { - return getHeadMapMap(); - } - /** - * map<string, string> headMap = 3; - */ - @java.lang.Override - - public java.util.Map getHeadMapMap() { - return internalGetHeadMap().getMap(); - } - /** - * map<string, string> headMap = 3; - */ - @java.lang.Override - - public java.lang.String getHeadMapOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> headMap = 3; - */ - @java.lang.Override - - public java.lang.String getHeadMapOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearHeadMap() { - internalGetMutableHeadMap().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> headMap = 3; - */ - - public Builder removeHeadMap( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableHeadMap().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableHeadMap() { - return internalGetMutableHeadMap().getMutableMap(); - } - /** - * map<string, string> headMap = 3; - */ - public Builder putHeadMap( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableHeadMap().getMutableMap() - .put(key, value); - return this; - } - /** - * map<string, string> headMap = 3; - */ - - public Builder putAllHeadMap( - java.util.Map values) { - internalGetMutableHeadMap().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.Any body_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> bodyBuilder_; - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - public boolean hasBody() { - return bodyBuilder_ != null || body_ != null; - } - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - public com.google.protobuf.Any getBody() { - if (bodyBuilder_ == null) { - return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; - } else { - return bodyBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder setBody(com.google.protobuf.Any value) { - if (bodyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - body_ = value; - onChanged(); - } else { - bodyBuilder_.setMessage(value); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder setBody( - com.google.protobuf.Any.Builder builderForValue) { - if (bodyBuilder_ == null) { - body_ = builderForValue.build(); - onChanged(); - } else { - bodyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder mergeBody(com.google.protobuf.Any value) { - if (bodyBuilder_ == null) { - if (body_ != null) { - body_ = - com.google.protobuf.Any.newBuilder(body_).mergeFrom(value).buildPartial(); - } else { - body_ = value; - } - onChanged(); - } else { - bodyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder clearBody() { - if (bodyBuilder_ == null) { - body_ = null; - onChanged(); - } else { - body_ = null; - bodyBuilder_ = null; - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public com.google.protobuf.Any.Builder getBodyBuilder() { - - onChanged(); - return getBodyFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any body = 4; - */ - public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { - if (bodyBuilder_ != null) { - return bodyBuilder_.getMessageOrBuilder(); - } else { - return body_ == null ? - com.google.protobuf.Any.getDefaultInstance() : body_; - } - } - /** - * .google.protobuf.Any body = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getBodyFieldBuilder() { - if (bodyBuilder_ == null) { - bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getBody(), - getParentForChildren(), - isClean()); - body_ = null; - } - return bodyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.core.protocol.GrpcMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.core.protocol.GrpcMessageProto) - private static final org.apache.seata.grpc.generated.GrpcMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new org.apache.seata.grpc.generated.GrpcMessageProto(); - } - - public static org.apache.seata.grpc.generated.GrpcMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GrpcMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GrpcMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public org.apache.seata.grpc.generated.GrpcMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java b/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java deleted file mode 100644 index 0ac50008786..00000000000 --- a/seata-test-grpc/src/main/proto/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.grpc.generated; - -public interface GrpcMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.core.protocol.GrpcMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 id = 1; - * @return The id. - */ - int getId(); - - /** - * int32 messageType = 2; - * @return The messageType. - */ - int getMessageType(); - - /** - * map<string, string> headMap = 3; - */ - int getHeadMapCount(); - /** - * map<string, string> headMap = 3; - */ - boolean containsHeadMap( - java.lang.String key); - /** - * Use {@link #getHeadMapMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getHeadMap(); - /** - * map<string, string> headMap = 3; - */ - java.util.Map - getHeadMapMap(); - /** - * map<string, string> headMap = 3; - */ - - /* nullable */ -java.lang.String getHeadMapOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> headMap = 3; - */ - - java.lang.String getHeadMapOrThrow( - java.lang.String key); - - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - boolean hasBody(); - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - com.google.protobuf.Any getBody(); - /** - * .google.protobuf.Any body = 4; - */ - com.google.protobuf.AnyOrBuilder getBodyOrBuilder(); -} diff --git a/seata-test-grpc/src/main/resources/all.sql b/seata-test-grpc/src/main/resources/all.sql deleted file mode 100644 index a6974d7f61f..00000000000 --- a/seata-test-grpc/src/main/resources/all.sql +++ /dev/null @@ -1,56 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one or more --- contributor license agreements. See the NOTICE file distributed with --- this work for additional information regarding copyright ownership. --- The ASF licenses this file to You under the Apache License, Version 2.0 --- (the "License"); you may not use this file except in compliance with --- the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. --- - -CREATE TABLE `account_tbl` -( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` varchar(255) DEFAULT NULL, - `money` int(11) DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -CREATE TABLE `stock_tbl` -( - `id` int(11) NOT NULL AUTO_INCREMENT, - `commodity_code` varchar(255) DEFAULT NULL, - `count` int(11) DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `commodity_code` (`commodity_code`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -CREATE TABLE `order_tbl` -( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` varchar(255) DEFAULT NULL, - `commodity_code` varchar(255) DEFAULT NULL, - `count` int(11) DEFAULT '0', - `money` int(11) DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `undo_log` -( - `branch_id` BIGINT NOT NULL COMMENT 'branch transaction id', - `xid` VARCHAR(128) NOT NULL COMMENT 'global transaction id', - `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', - `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', - `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', - `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', - `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', - UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) - ) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; -ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`); \ No newline at end of file diff --git a/seata-test-grpc/src/main/resources/application.properties b/seata-test-grpc/src/main/resources/application.properties deleted file mode 100644 index 41d9149e049..00000000000 --- a/seata-test-grpc/src/main/resources/application.properties +++ /dev/null @@ -1,18 +0,0 @@ -spring.account.application.name=account-service -spring.storage.application.name=storage-service -spring.order.application.name=order-service -spring.business.application.name=business-service -spring.datasource.account.url=jdbc:mysql://127.0.0.1:3305/seata?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true -spring.datasource.account.username=root -spring.datasource.account.password=root 1234 -spring.datasource.account.driverClassName=com.mysql.cj.jdbc.Driver -# stock db config -spring.datasource.stock.url=jdbc:mysql://127.0.0.1:3305/seata?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true -spring.datasource.stock.username=root -spring.datasource.stock.password=root 1234 -spring.datasource.stock.driverClassName=com.mysql.cj.jdbc.Driver -# order db config -spring.datasource.order.url=jdbc:mysql://127.0.0.1:3305/seata?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true -spring.datasource.order.username=root -spring.datasource.order.password=root 1234 -spring.datasource.order.driverClassName=com.mysql.cj.jdbc.Driver diff --git a/seata-test-grpc/src/main/resources/file.conf b/seata-test-grpc/src/main/resources/file.conf deleted file mode 100644 index 2c718ea04a5..00000000000 --- a/seata-test-grpc/src/main/resources/file.conf +++ /dev/null @@ -1,127 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -transport { - - # tcp, unix-domain-socket - type = "TCP" - #NIO, NATIVE - server = "NIO" - #enable heartbeat - heartbeat = true - # the tm client batch send request enable - enableTmClientBatchSendRequest = false - # the rm client batch send request enable - enableRmClientBatchSendRequest = true - # the rm client rpc request timeout - rpcRmRequestTimeout = 2000 - # the tm client rpc request timeout - rpcTmRequestTimeout = 30000 - # the rm client rpc request timeout - rpcRmRequestTimeout = 15000 - #thread factory for netty - threadFactory { - bossThreadPrefix = "NettyBoss" - workerThreadPrefix = "NettyServerNIOWorker" - serverExecutorThread-prefix = "NettyServerBizHandler" - shareBossWorker = false - clientSelectorThreadPrefix = "NettyClientSelector" - clientSelectorThreadSize = 1 - clientWorkerThreadPrefix = "NettyClientWorkerThread" - # netty boss thread size - bossThreadSize = 1 - #auto default pin or 8 - workerThreadSize = "default" - } - shutdown { - # when destroy server, wait seconds - wait = 3 - } - serialization = "seata" - compressor = "none" -} -service { - #transaction service group mapping - vgroupMapping.my_test_tx_group = "default" - #only support when registry.type=file, please don't set multiple addresses - default.grouplist = "127.0.0.1:8091" - #degrade, current not support - enableDegrade = false - #disable seata - disableGlobalTransaction = false -} - -client { - rm { - asyncCommitBufferLimit = 10000 - lock { - retryInterval = 10 - retryTimes = 30 - retryPolicyBranchRollbackOnConflict = true - } - reportRetryCount = 5 - tableMetaCheckEnable = false - tableMetaCheckerInterval = 60000 - reportSuccessEnable = false - sagaBranchRegisterEnable = false - sagaJsonParser = "fastjson" - sagaRetryPersistModeUpdate = false - sagaCompensatePersistModeUpdate = false - tccActionInterceptorOrder = -2147482648 #Ordered.HIGHEST_PRECEDENCE + 1000 - sqlParserType = "druid" - branchExecutionTimeoutXA = 60000 - connectionTwoPhaseHoldTimeoutXA = 10000 - } - tm { - commitRetryCount = 5 - rollbackRetryCount = 5 - defaultGlobalTransactionTimeout = 60000 - degradeCheck = false - degradeCheckPeriod = 2000 - degradeCheckAllowTimes = 10 - interceptorOrder = -2147482648 #Ordered.HIGHEST_PRECEDENCE + 1000 - } - undo { - dataValidation = true - onlyCareUpdateColumns = true - logSerialization = "jackson" - logTable = "undo_log" - compress { - enable = true - # allow zip, gzip, deflater, lz4, bzip2, zstd default is zip - type = zip - # if rollback info size > threshold, then will be compress - # allow k m g t - threshold = 64k - } - } - loadBalance { - type = "XID" - virtualNodes = 10 - } -} -log { - exceptionRate = 100 -} -tcc { - fence { - # tcc fence log table name - logTableName = tcc_fence_log - # tcc fence log clean period - cleanPeriod = 1h - } -} diff --git a/seata-test-grpc/src/main/resources/logback.xml b/seata-test-grpc/src/main/resources/logback.xml deleted file mode 100644 index 14ecfc13767..00000000000 --- a/seata-test-grpc/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - diff --git a/seata-test-grpc/src/main/resources/registry.conf b/seata-test-grpc/src/main/resources/registry.conf deleted file mode 100644 index a105dc3e833..00000000000 --- a/seata-test-grpc/src/main/resources/registry.conf +++ /dev/null @@ -1,124 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -registry { - # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa、custom - type = "file" - - nacos { - application = "seata-server" - serverAddr = "127.0.0.1:8848" - group = "SEATA_GROUP" - namespace = "" - username = "" - password = "" - contextPath = "" - ##if use MSE Nacos with auth, mutex with username/password attribute - #accessKey = "" - #secretKey = "" - ##if use Nacos naming meta-data for SLB service registry, specify nacos address pattern rules here - #slbPattern = "" - } - eureka { - serviceUrl = "http://localhost:8761/eureka" - weight = "1" - } - redis { - serverAddr = "localhost:6379" - db = "0" - password = "" - timeout = "0" - } - zk { - serverAddr = "127.0.0.1:2181" - sessionTimeout = 6000 - connectTimeout = 2000 - username = "" - password = "" - } - consul { - serverAddr = "127.0.0.1:8500" - aclToken = "" - } - etcd3 { - serverAddr = "http://localhost:2379" - } - sofa { - serverAddr = "127.0.0.1:9603" - region = "DEFAULT_ZONE" - datacenter = "DefaultDataCenter" - group = "SEATA_GROUP" - addressWaitTime = "3000" - } - file { - name = "file.conf" - } - custom { - name = "" - } -} - -config { - # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig、custom - type = "file" - raft { - metadata-max-age-ms = 30000 - serverAddr = "127.0.0.1:8848" - } - nacos { - serverAddr = "127.0.0.1:8848" - namespace = "" - group = "SEATA_GROUP" - username = "" - password = "" - contextPath = "" - ##if use MSE Nacos with auth, mutex with username/password attribute - #accessKey = "" - #secretKey = "" - dataId = "seata.properties" - } - consul { - serverAddr = "127.0.0.1:8500" - key = "seata.properties" - aclToken = "" - } - apollo { - appId = "seata-server" - apolloMeta = "http://192.168.1.204:8801" - namespace = "application" - apolloAccesskeySecret = "" - cluster = "" - } - zk { - serverAddr = "127.0.0.1:2181" - sessionTimeout = 6000 - connectTimeout = 2000 - username = "" - password = "" - nodePath = "/seata/seata.properties" - } - etcd3 { - serverAddr = "http://localhost:2379" - key = "seata.properties" - } - file { - name = "file.conf" - } - custom { - name = "" - } -} diff --git a/test/pom.xml b/test/pom.xml index 91d4c9f60fb..22a1517ffa2 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -40,6 +40,23 @@ true
+ + org.xolstice.maven.plugins + protobuf-maven-plugin + + ${project.basedir}/src/main/resources/protobuf/org/apache/seata/protocol/transcation/ + + com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} + + + + + + compile + + + + @@ -154,5 +171,4 @@ - \ No newline at end of file diff --git a/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java b/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java new file mode 100644 index 00000000000..98f8d5c6cba --- /dev/null +++ b/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java @@ -0,0 +1,163 @@ +package org.apache.seata.core.rpc.netty.mockserver; + +import com.google.protobuf.Any; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import io.grpc.stub.StreamObserver; +import org.apache.seata.common.ConfigurationKeys; +import org.apache.seata.common.ConfigurationTestHelper; +import org.apache.seata.config.ConfigurationFactory; +import org.apache.seata.core.rpc.netty.RmNettyRemotingClient; +import org.apache.seata.core.rpc.netty.TmNettyRemotingClient; +import org.apache.seata.mockserver.MockServer; +import org.apache.seata.serializer.protobuf.generated.*; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +public class GrpcTest { + + private static ManagedChannel channel; + + private static SeataServiceGrpc.SeataServiceStub seataServiceStub; + + @BeforeAll + public static void before() { + ConfigurationFactory.reload(); + ConfigurationTestHelper.putConfig(ConfigurationKeys.SERVER_SERVICE_PORT_CAMEL, String.valueOf(ProtocolTestConstants.MOCK_SERVER_PORT)); + MockServer.start(ProtocolTestConstants.MOCK_SERVER_PORT); + TmNettyRemotingClient.getInstance().destroy(); + RmNettyRemotingClient.getInstance().destroy(); + + channel = ManagedChannelBuilder.forAddress("127.0.0.1", ProtocolTestConstants.MOCK_SERVER_PORT).usePlaintext().build(); + seataServiceStub = SeataServiceGrpc.newStub(channel); + } + + @AfterAll + public static void after() { + //MockServer.close(); + ConfigurationTestHelper.removeConfig(ConfigurationKeys.SERVER_SERVICE_PORT_CAMEL); + TmNettyRemotingClient.getInstance().destroy(); + RmNettyRemotingClient.getInstance().destroy(); + } + + private GrpcMessageProto getRegisterTMRequest() { + AbstractIdentifyRequestProto abstractIdentifyRequestProto = AbstractIdentifyRequestProto.newBuilder() + .setApplicationId("test-applicationId") + .build(); + RegisterTMRequestProto registerTMRequestProto = RegisterTMRequestProto.newBuilder() + .setAbstractIdentifyRequest(abstractIdentifyRequestProto) + .build(); + + return GrpcMessageProto.newBuilder().setBody(Any.pack(registerTMRequestProto)).build(); + } + + private GrpcMessageProto getGlobalBeginRequest() { + GlobalBeginRequestProto globalBeginRequestProto = GlobalBeginRequestProto.newBuilder() + .setTransactionName("test-transaction") + .setTimeout(2000) + .build(); + return GrpcMessageProto.newBuilder().setBody(Any.pack(globalBeginRequestProto)).build(); + } + + private GrpcMessageProto getBranchRegisterRequest() { + BranchRegisterRequestProto branchRegisterRequestProto = BranchRegisterRequestProto.newBuilder() + .setXid("1") + .setLockKey("1") + .setResourceId("test-resource") + .setBranchType(BranchTypeProto.TCC) + .setApplicationData("{\"mock\":\"mock\"}") + .build(); + + return GrpcMessageProto.newBuilder().setBody(Any.pack(branchRegisterRequestProto)).build(); + } + + private GrpcMessageProto getGlobalCommitRequest() { + AbstractGlobalEndRequestProto globalEndRequestProto = AbstractGlobalEndRequestProto.newBuilder() + .setXid("1") + .build(); + GlobalCommitRequestProto globalCommitRequestProto = GlobalCommitRequestProto.newBuilder() + .setAbstractGlobalEndRequest(globalEndRequestProto) + .build(); + + return GrpcMessageProto.newBuilder().setBody(Any.pack(globalCommitRequestProto)).build(); + } + + private GrpcMessageProto getGlobalRollbackRequest() { + AbstractGlobalEndRequestProto globalEndRequestProto = AbstractGlobalEndRequestProto.newBuilder() + .setXid("1") + .build(); + GlobalRollbackRequestProto globalRollbackRequestProto = GlobalRollbackRequestProto.newBuilder() + .setAbstractGlobalEndRequest(globalEndRequestProto) + .build(); + + return GrpcMessageProto.newBuilder().setBody(Any.pack(globalRollbackRequestProto)).build(); + } + + @Test + public void testCommit() throws InterruptedException { + CountDownLatch countDownLatch = new CountDownLatch(4); + StreamObserver streamObserver = new StreamObserver() { + @Override + public void onNext(GrpcMessageProto grpcMessageProto) { + System.out.println("receive : " + grpcMessageProto.toString()); + countDownLatch.countDown(); + } + + @Override + public void onError(Throwable throwable) { + throwable.printStackTrace(); + } + + @Override + public void onCompleted() { + + } + }; + + StreamObserver response = seataServiceStub.sendRequest(streamObserver); + response.onNext(getRegisterTMRequest()); + response.onNext(getGlobalBeginRequest()); + response.onNext(getBranchRegisterRequest()); + response.onNext(getGlobalCommitRequest()); + + response.onCompleted(); + + countDownLatch.await(10, TimeUnit.SECONDS); + } + + @Test + public void testRollback() throws InterruptedException { + CountDownLatch countDownLatch = new CountDownLatch(4); + StreamObserver streamObserver = new StreamObserver() { + @Override + public void onNext(GrpcMessageProto grpcMessageProto) { + System.out.println("receive : " + grpcMessageProto.toString()); + countDownLatch.countDown(); + } + + @Override + public void onError(Throwable throwable) { + throwable.printStackTrace(); + } + + @Override + public void onCompleted() { + + } + }; + + StreamObserver response = seataServiceStub.sendRequest(streamObserver); + response.onNext(getRegisterTMRequest()); + response.onNext(getGlobalBeginRequest()); + response.onNext(getBranchRegisterRequest()); + response.onNext(getGlobalRollbackRequest()); + + response.onCompleted(); + + countDownLatch.await(10, TimeUnit.SECONDS); + } +} diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto new file mode 100644 index 00000000000..b691f74e55c --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionRequest.proto"; +import "branchType.proto"; + +option java_multiple_files = true; +option java_outer_classname = "AbstractBranchEndRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractBranchEndRequestProto { + AbstractTransactionRequestProto abstractTransactionRequest = 1; + string xid = 2; + /** + * The Branch id. + */ + int64 branchId = 3; + + /** + * The Branch type. + */ + BranchTypeProto branchType = 4; + + /** + * The Resource id. + */ + string resourceId = 5; + + /** + * The Application data. + */ + string applicationData = 6; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto new file mode 100644 index 00000000000..22b5f60b5b5 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionResponse.proto"; +import "branchStatus.proto"; + +option java_multiple_files = true; +option java_outer_classname = "AbstractBranchEndResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractBranchEndResponseProto { + + AbstractTransactionResponseProto abstractTransactionResponse =1; + string xid = 2; + int64 branchId = 3; + BranchStatusProto branchStatus = 4; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto new file mode 100644 index 00000000000..0523db0070e --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionRequest.proto"; + +option java_multiple_files = true; +option java_outer_classname = "AbstractGlobalEndRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractGlobalEndRequestProto { + + AbstractTransactionRequestProto abstractTransactionRequest =1; + string xid = 2; + string extraData = 3; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto new file mode 100644 index 00000000000..3d8107e8f35 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionResponse.proto"; +import "globalStatus.proto"; + +option java_multiple_files = true; +option java_outer_classname = "AbstractGlobalEndResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractGlobalEndResponseProto { + AbstractTransactionResponseProto abstractTransactionResponse = 1; + GlobalStatusProto globalStatus = 2; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto new file mode 100644 index 00000000000..bef0d19d8ed --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractMessage.proto"; + +option java_multiple_files = true; +option java_outer_classname = "AbstractIdentifyRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractIdentifyRequestProto { + + AbstractMessageProto abstractMessage=1; + + string version = 2; + + string applicationId = 3; + + string transactionServiceGroup = 4; + + string extraData = 5; + +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto new file mode 100644 index 00000000000..c2b80c900de --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractResultMessage.proto"; + +option java_multiple_files = true; +option java_outer_classname = "AbstractIdentifyResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractIdentifyResponseProto { + + AbstractResultMessageProto abstractResultMessage=1; + string version = 2; + string extraData = 3; + bool identified = 4; + +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/storage/service/StorageService.java b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto similarity index 66% rename from seata-test-grpc/src/main/java/org/apache/seata/storage/service/StorageService.java rename to test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto index 1358830e82a..8ec011daf3f 100644 --- a/seata-test-grpc/src/main/java/org/apache/seata/storage/service/StorageService.java +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto @@ -14,23 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.storage.service; +syntax = "proto3"; -public interface StorageService { +package org.apache.seata.protocol.protobuf; - /** - * 扣减库存 - * - * @param commodityCode 商品编号 - * @param count 扣减数量 - */ - void deduct(String commodityCode, int count); +import "messageType.proto"; - /** - * 批量扣减 - * - * @param commodityCode - * @param count - */ - void batchDeduct(String commodityCode, int count); +option java_multiple_files = true; +option java_outer_classname = "AbstractMessage"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractMessageProto { + MessageTypeProto messageType = 1; } \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto new file mode 100644 index 00000000000..a04f9b56dda --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "resultCode.proto"; +import "abstractMessage.proto"; +option java_multiple_files = true; +option java_outer_classname = "AbstractResultMessage"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractResultMessageProto { + AbstractMessageProto AbstractMessage=1; + ResultCodeProto resultCode = 2; + string msg = 3; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto new file mode 100644 index 00000000000..a964917a20b --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractMessage.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "AbstractTransactionRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractTransactionRequestProto { + AbstractMessageProto abstractMessage=1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto new file mode 100644 index 00000000000..a31caaa00bf --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractResultMessage.proto"; +import "transactionExceptionCode.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "AbstractTransactionResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message AbstractTransactionResponseProto { + AbstractResultMessageProto abstractResultMessage = 1; + TransactionExceptionCodeProto transactionExceptionCode = 2; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto new file mode 100644 index 00000000000..c36f75a7972 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractMessage.proto"; +import "google/protobuf/any.proto"; + +option java_multiple_files = true; +option java_outer_classname = "BatchResultMessage"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message BatchResultMessageProto { + AbstractMessageProto abstractMessage=1; + repeated google.protobuf.Any resultMessages = 2; + repeated int32 msgIds=3; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto new file mode 100644 index 00000000000..1a2adbe630d --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractBranchEndRequest.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "BranchCommitRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message BranchCommitRequestProto { + AbstractBranchEndRequestProto abstractBranchEndRequest = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto new file mode 100644 index 00000000000..96070ab6a91 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractBranchEndResponse.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "BranchCommitResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message BranchCommitResponseProto { + AbstractBranchEndResponseProto abstractBranchEndResponse = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto new file mode 100644 index 00000000000..d527d8b7843 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "branchType.proto"; +import "abstractTransactionRequest.proto"; + +option java_multiple_files = true; +option java_outer_classname = "BranchRegisterRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message BranchRegisterRequestProto { + AbstractTransactionRequestProto abstractTransactionRequest =1; + string xid = 2; + BranchTypeProto branchType = 3; + string resourceId = 4; + string lockKey = 5; + string applicationData = 6; + +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto new file mode 100644 index 00000000000..7ce95f34d1f --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionResponse.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "BranchRegisterResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message BranchRegisterResponseProto { + AbstractTransactionResponseProto abstractTransactionResponse = 1; + int64 branchId = 2; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto new file mode 100644 index 00000000000..788454048ef --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "branchStatus.proto"; +import "branchType.proto"; +import "abstractTransactionRequest.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "BranchReportRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message BranchReportRequestProto { + + AbstractTransactionRequestProto abstractTransactionRequest =1; + string xid = 2; + + int64 branchId = 3; + + string resourceId = 4; + + BranchStatusProto status = 5; + + string applicationData = 6; + + BranchTypeProto branchType = 7; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto new file mode 100644 index 00000000000..42a29e47615 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionResponse.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "BranchReportResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message BranchReportResponseProto { + AbstractTransactionResponseProto abstractTransactionResponse = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto new file mode 100644 index 00000000000..ca42def06d3 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractBranchEndRequest.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "BranchRollbackRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message BranchRollbackRequestProto { + AbstractBranchEndRequestProto abstractBranchEndRequest = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto new file mode 100644 index 00000000000..5c31966dda4 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractBranchEndResponse.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "BranchRollbackResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message BranchRollbackResponseProto { + AbstractBranchEndResponseProto abstractBranchEndResponse = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto new file mode 100644 index 00000000000..425b38d47fc --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto @@ -0,0 +1,99 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +option java_multiple_files = true; +option java_outer_classname = "BranchStatus"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +enum BranchStatusProto { + + /** + * Unknown branch status. + */ + // special for Unknown + BUnknown = 0; + + /** + * The Registered. + */ + // Registered to TC. + Registered = 1; + + /** + * The Phase one done. + */ + // Branch logic is successfully done at phase one. + PhaseOne_Done = 2; + + /** + * The Phase one failed. + */ + // Branch logic is failed at phase one. + PhaseOne_Failed = 3; + + /** + * The Phase one timeout. + */ + // Branch logic is NOT reported for a timeout. + PhaseOne_Timeout = 4; + + /** + * The Phase two committed. + */ + // Commit logic is successfully done at phase two. + PhaseTwo_Committed = 5; + + /** + * The Phase two commit failed retryable. + */ + // Commit logic is failed but retryable. + PhaseTwo_CommitFailed_Retryable = 6; + + /** + * The Phase two commit failed unretryable. + */ + // Commit logic is failed and NOT retryable. + PhaseTwo_CommitFailed_Unretryable = 7; + + /** + * The Phase two rollbacked. + */ + // Rollback logic is successfully done at phase two. + PhaseTwo_Rollbacked = 8; + + /** + * The Phase two rollback failed retryable. + */ + // Rollback logic is failed but retryable. + PhaseTwo_RollbackFailed_Retryable = 9; + + /** + * The Phase two rollback failed unretryable. + */ + // Rollback logic is failed but NOT retryable. + PhaseTwo_RollbackFailed_Unretryable = 10; + /** + * The results of the Phase one are read-only. + */ + // In the branch transaction, only purely read-only query statements were executed. + PhaseOne_RDONLY = 13; + +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/business/service/BusinessService.java b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto similarity index 71% rename from seata-test-grpc/src/main/java/org/apache/seata/business/service/BusinessService.java rename to test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto index e5e7e97348a..dbe0a436199 100644 --- a/seata-test-grpc/src/main/java/org/apache/seata/business/service/BusinessService.java +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto @@ -14,16 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.business.service; +syntax = "proto3"; -public interface BusinessService { +package org.apache.seata.protocol.protobuf; - /** - * 用户订购商品 - * - * @param userId 用户ID - * @param commodityCode 商品编号 - * @param orderCount 订购数量 - */ - void purchase(String userId, String commodityCode, int orderCount); +option java_multiple_files = true; +option java_outer_classname = "BranchType"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +enum BranchTypeProto { + + AT = 0; + + TCC = 1; + + SAGA = 2; } \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto new file mode 100644 index 00000000000..828a1b3e24c --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionRequest.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "GlobalBeginRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalBeginRequestProto { + AbstractTransactionRequestProto abstractTransactionRequest=1; + int32 timeout = 2; + string transactionName = 3; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto new file mode 100644 index 00000000000..5bdf87ecb83 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionResponse.proto"; + + +option java_multiple_files = true; +option java_outer_classname = "GlobalBeginResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalBeginResponseProto { + AbstractTransactionResponseProto abstractTransactionResponse =1; + string xid = 2; + string extraData = 3; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto new file mode 100644 index 00000000000..0c1958156d6 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractGlobalEndRequest.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalCommitRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalCommitRequestProto { + AbstractGlobalEndRequestProto abstractGlobalEndRequest =1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto new file mode 100644 index 00000000000..650a2f3337d --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractGlobalEndResponse.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalCommitResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalCommitResponseProto { + AbstractGlobalEndResponseProto abstractGlobalEndResponse =1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto new file mode 100644 index 00000000000..469147eca0f --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "branchRegisterRequest.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalLockQueryRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalLockQueryRequestProto { + BranchRegisterRequestProto branchRegisterRequest =1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto new file mode 100644 index 00000000000..e9b5fb5409a --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionResponse.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalLockQueryResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalLockQueryResponseProto { + AbstractTransactionResponseProto abstractTransactionResponse = 1; + bool lockable = 2; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto new file mode 100644 index 00000000000..64435f2049c --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractGlobalEndRequest.proto"; +import "globalStatus.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalReportRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalReportRequestProto { + AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; + GlobalStatusProto globalStatus = 2; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto new file mode 100644 index 00000000000..3a5b5611aad --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractGlobalEndResponse.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalReportResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalReportResponseProto { + AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto new file mode 100644 index 00000000000..2acdbdd99cf --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractGlobalEndRequest.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalRollbackRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalRollbackRequestProto { + AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto new file mode 100644 index 00000000000..78bb4d2b567 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractGlobalEndResponse.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalRollbackResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalRollbackResponseProto { + AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto new file mode 100644 index 00000000000..9de4108f5b6 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +option java_multiple_files = true; +option java_outer_classname = "GlobalStatus"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +enum GlobalStatusProto { + + /** + * Un known global status. + */ + // Unknown + UnKnown = 0; + + /** + * The Begin. + */ + // PHASE 1: can accept new branch registering. + Begin = 1; + + /** + * PHASE 2: Running Status: may be changed any time. + */ + // Committing. + Committing = 2; + + /** + * The Commit retrying. + */ + // Retrying commit after a recoverable failure. + CommitRetrying = 3; + + /** + * Rollbacking global status. + */ + // Rollbacking + Rollbacking = 4; + + /** + * The Rollback retrying. + */ + // Retrying rollback after a recoverable failure. + RollbackRetrying = 5; + + /** + * The Timeout rollbacking. + */ + // Rollbacking since timeout + TimeoutRollbacking = 6; + + /** + * The Timeout rollback retrying. + */ + // Retrying rollback (since timeout) after a recoverable failure. + TimeoutRollbackRetrying = 7; + + /** + * All branches can be async committed. The committing is NOT done yet, but it can be seen as committed for TM/RM + * client. + */ + AsyncCommitting = 8; + + /** + * PHASE 2: Final Status: will NOT change any more. + */ + // Finally: global transaction is successfully committed. + Committed = 9; + + /** + * The Commit failed. + */ + // Finally: failed to commit + CommitFailed = 10; + + /** + * The Rollbacked. + */ + // Finally: global transaction is successfully rollbacked. + Rollbacked = 11; + + /** + * The Rollback failed. + */ + // Finally: failed to rollback + RollbackFailed = 12; + + /** + * The Timeout rollbacked. + */ + // Finally: global transaction is successfully rollbacked since timeout. + TimeoutRollbacked = 13; + + /** + * The Timeout rollback failed. + */ + // Finally: failed to rollback since timeout + TimeoutRollbackFailed = 14; + + /** + * The Finished. + */ + // Not managed in session MAP any more + Finished = 15; + +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto new file mode 100644 index 00000000000..f267e6efeee --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractGlobalEndRequest.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalStatusRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalStatusRequestProto { + AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto new file mode 100644 index 00000000000..cf6def540fd --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractGlobalEndResponse.proto"; + +option java_multiple_files = true; +option java_outer_classname = "GlobalStatusResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +message GlobalStatusResponseProto { + AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/proto/grpcMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto similarity index 76% rename from seata-test-grpc/src/main/proto/grpcMessage.proto rename to test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto index bab353b4209..2e6563631db 100644 --- a/seata-test-grpc/src/main/proto/grpcMessage.proto +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package org.apache.seata.core.protocol; +package org.apache.seata.protocol.protobuf; import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "GrpcMessage"; -option java_package = "org.apache.seata.grpc.generated"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; message GrpcMessageProto { int32 id = 1; diff --git a/seata-test-grpc/src/main/java/org/apache/seata/order/service/OrderService.java b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto similarity index 72% rename from seata-test-grpc/src/main/java/org/apache/seata/order/service/OrderService.java rename to test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto index 8afe45deb03..fec1e295213 100644 --- a/seata-test-grpc/src/main/java/org/apache/seata/order/service/OrderService.java +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto @@ -14,16 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.order.service; +syntax = "proto3"; -public interface OrderService { +package org.apache.seata.protocol.protobuf; - /** - * 创建订单 - * - * @param userId 用户ID - * @param commodityCode 商品编号 - * @param orderCount 订购数量 - */ - void create(String userId, String commodityCode, int orderCount); +option java_multiple_files = true; +option java_outer_classname = "HeartbeatMessage"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message HeartbeatMessageProto { + bool ping = 1; } \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto new file mode 100644 index 00000000000..774fc69ce4a --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractMessage.proto"; +import "google/protobuf/any.proto"; + +option java_multiple_files = true; +option java_outer_classname = "MergedResultMessage"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message MergedResultMessageProto { + AbstractMessageProto abstractMessage=1; + repeated google.protobuf.Any msgs = 2; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto new file mode 100644 index 00000000000..f84d5d31df8 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractMessage.proto"; +import "google/protobuf/any.proto"; + +option java_multiple_files = true; +option java_outer_classname = "MergedWarpMessage"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message MergedWarpMessageProto { + AbstractMessageProto abstractMessage=1; + repeated google.protobuf.Any msgs = 2; + repeated int32 msgIds=3; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto new file mode 100644 index 00000000000..754ce1173c0 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto @@ -0,0 +1,143 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +option java_multiple_files = true; +option java_outer_classname = "MessageType"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +enum MessageTypeProto { + + TYPE_GLOBAL_PRESERVED = 0; + + TYPE_GLOBAL_BEGIN = 1; + + TYPE_GLOBAL_BEGIN_RESULT = 2; + /** + * The constant TYPE_GLOBAL_COMMIT. + */ + TYPE_GLOBAL_COMMIT = 7; + /** + * The constant TYPE_GLOBAL_COMMIT_RESULT. + */ + TYPE_GLOBAL_COMMIT_RESULT = 8; + /** + * The constant TYPE_GLOBAL_ROLLBACK. + */ + TYPE_GLOBAL_ROLLBACK = 9; + /** + * The constant TYPE_GLOBAL_ROLLBACK_RESULT. + */ + TYPE_GLOBAL_ROLLBACK_RESULT = 10; + /** + * The constant TYPE_GLOBAL_STATUS. + */ + TYPE_GLOBAL_STATUS = 15; + /** + * The constant TYPE_GLOBAL_STATUS_RESULT. + */ + TYPE_GLOBAL_STATUS_RESULT = 16; + /** + * The constant TYPE_GLOBAL_REPORT. + */ + TYPE_GLOBAL_REPORT = 17; + /** + * The constant TYPE_GLOBAL_REPORT_RESULT. + */ + TYPE_GLOBAL_REPORT_RESULT = 18; + /** + * The constant TYPE_GLOBAL_LOCK_QUERY. + */ + TYPE_GLOBAL_LOCK_QUERY = 21; + /** + * The constant TYPE_GLOBAL_LOCK_QUERY_RESULT. + */ + TYPE_GLOBAL_LOCK_QUERY_RESULT = 22; + + /** + * The constant TYPE_BRANCH_COMMIT. + */ + TYPE_BRANCH_COMMIT = 3; + /** + * The constant TYPE_BRANCH_COMMIT_RESULT. + */ + TYPE_BRANCH_COMMIT_RESULT = 4; + /** + * The constant TYPE_BRANCH_ROLLBACK. + */ + TYPE_BRANCH_ROLLBACK = 5; + /** + * The constant TYPE_BRANCH_ROLLBACK_RESULT. + */ + TYPE_BRANCH_ROLLBACK_RESULT = 6; + /** + * The constant TYPE_BRANCH_REGISTER. + */ + TYPE_BRANCH_REGISTER = 11; + /** + * The constant TYPE_BRANCH_REGISTER_RESULT. + */ + TYPE_BRANCH_REGISTER_RESULT = 12; + /** + * The constant TYPE_BRANCH_STATUS_REPORT. + */ + TYPE_BRANCH_STATUS_REPORT = 13; + /** + * The constant TYPE_BRANCH_STATUS_REPORT_RESULT. + */ + TYPE_BRANCH_STATUS_REPORT_RESULT = 14; + + /** + * The constant TYPE_SEATA_MERGE. + */ + TYPE_SEATA_MERGE = 59; + /** + * The constant TYPE_SEATA_MERGE_RESULT. + */ + TYPE_SEATA_MERGE_RESULT = 60; + + /** + * The constant TYPE_REG_CLT. + */ + TYPE_REG_CLT = 101; + /** + * The constant TYPE_REG_CLT_RESULT. + */ + TYPE_REG_CLT_RESULT = 102; + /** + * The constant TYPE_REG_RM. + */ + TYPE_REG_RM = 103; + /** + * The constant TYPE_REG_RM_RESULT. + */ + TYPE_REG_RM_RESULT = 104; + + /** + * The constant TYPE_UNDO_LOG_DELETE. + */ + TYPE_UNDO_LOG_DELETE = 111; + + /** + * the constant TYPE_BATCH_RESULT_MSG + */ + TYPE_BATCH_RESULT_MSG = 121; + +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto new file mode 100644 index 00000000000..d4a3db78667 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractIdentifyRequest.proto"; + +option java_multiple_files = true; +option java_outer_classname = "RegisterRMRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message RegisterRMRequestProto { + AbstractIdentifyRequestProto abstractIdentifyRequest = 1; + string resourceIds = 2; + +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto new file mode 100644 index 00000000000..378f0a1ed2b --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractIdentifyResponse.proto"; + +option java_multiple_files = true; +option java_outer_classname = "RegisterRMResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message RegisterRMResponseProto { + AbstractIdentifyResponseProto abstractIdentifyResponse = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto new file mode 100644 index 00000000000..d18e1c41bce --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractIdentifyRequest.proto"; + +option java_multiple_files = true; +option java_outer_classname = "RegisterTMRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message RegisterTMRequestProto { + AbstractIdentifyRequestProto abstractIdentifyRequest = 1; +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto new file mode 100644 index 00000000000..e8f354c20a0 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractIdentifyResponse.proto"; + +option java_multiple_files = true; +option java_outer_classname = "RegisterTMResponse"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message RegisterTMResponseProto { + AbstractIdentifyResponseProto abstractIdentifyResponse = 1; +} \ No newline at end of file diff --git a/seata-test-grpc/src/main/java/org/apache/seata/account/service/AccountService.java b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto similarity index 71% rename from seata-test-grpc/src/main/java/org/apache/seata/account/service/AccountService.java rename to test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto index 3c297f44edb..4bd9ff3bd11 100644 --- a/seata-test-grpc/src/main/java/org/apache/seata/account/service/AccountService.java +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto @@ -14,15 +14,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.seata.account.service; +syntax = "proto3"; -public interface AccountService { +package org.apache.seata.protocol.protobuf; + +option java_multiple_files = true; +option java_outer_classname = "ResultCode"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +enum ResultCodeProto { + + Failed = 0; + + Success = 1; - /** - * 余额扣款 - * - * @param userId 用户ID - * @param money 扣款金额 - */ - void debit(String userId, int money); } \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto new file mode 100644 index 00000000000..6cb20b0905c --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +option java_multiple_files = true; +option java_outer_classname = "TransactionExceptionCode"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +enum TransactionExceptionCodeProto { + + /** + * Unknown transaction exception code. + */ + // + Unknown = 0; + + /** + * Lock key conflict transaction exception code. + */ + // + LockKeyConflict = 1; + + /** + * Io transaction exception code. + */ + // + IO = 2; + + /** + * Branch rollback failed retriable transaction exception code. + */ + // + BranchRollbackFailed_Retriable = 3; + + /** + * Branch rollback failed unretriable transaction exception code. + */ + // + BranchRollbackFailed_Unretriable = 4; + + /** + * Branch register failed transaction exception code. + */ + // + BranchRegisterFailed = 5; + + /** + * Branch report failed transaction exception code. + */ + // + BranchReportFailed = 6; + + /** + * Lockable check failed transaction exception code. + */ + // + LockableCheckFailed = 7; + + /** + * Branch transaction not exist transaction exception code. + */ + // + BranchTransactionNotExist = 8; + + /** + * Global transaction not exist transaction exception code. + */ + // + GlobalTransactionNotExist = 9; + + /** + * Global transaction not active transaction exception code. + */ + // + GlobalTransactionNotActive = 10; + + /** + * Global transaction status invalid transaction exception code. + */ + // + GlobalTransactionStatusInvalid = 11; + + /** + * Failed to send branch commit request transaction exception code. + */ + // + FailedToSendBranchCommitRequest = 12; + + /** + * Failed to send branch rollback request transaction exception code. + */ + // + FailedToSendBranchRollbackRequest = 13; + + /** + * Failed to add branch transaction exception code. + */ + // + FailedToAddBranch = 14; + + /** + * Failed to lock global transaction exception code. + */ + FailedLockGlobalTranscation = 15; + + /** + * FailedWriteSession + */ + FailedWriteSession = 16; + + /** + * FailedStore + */ + FailedStore = 17; + +} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto new file mode 100644 index 00000000000..86624613096 --- /dev/null +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto3"; + +package org.apache.seata.protocol.protobuf; + +import "abstractTransactionRequest.proto"; +import "branchType.proto"; + +option java_multiple_files = true; +option java_outer_classname = "UndoLogDeleteRequest"; +option java_package = "org.apache.seata.serializer.protobuf.generated"; + +// PublishRequest is a publish request. +message UndoLogDeleteRequestProto { + AbstractTransactionRequestProto abstractTransactionRequest = 1; + + /** + * The Resource id. + */ + string resourceId = 2; + + /** + * The SaveDays data. + */ + int32 saveDays = 3; + + /** + * The Branch type. + */ + BranchTypeProto branchType = 4; +} \ No newline at end of file From 1e9a0c2f8a5dfb831199d4a422108515767e90f9 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sun, 25 Aug 2024 21:54:40 +0800 Subject: [PATCH 09/42] cr --- server/src/main/resources/application.yml | 186 ++-------------------- 1 file changed, 17 insertions(+), 169 deletions(-) diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml index eb42839c567..c70a2f842f4 100644 --- a/server/src/main/resources/application.yml +++ b/server/src/main/resources/application.yml @@ -33,176 +33,24 @@ logging: bootstrap-servers: 127.0.0.1:9092 topic: logback_to_logstash +console: + user: + username: seata + password: seata seata: - security: - secretKey: "xxx" - tokenValidityInMilliseconds: 1000000000 config: - # support: nacos 、 consul 、 apollo 、 zk 、 etcd3 - type: nacos - nacos: - server-addr: 127.0.0.1:8848 - namespace: - group: SEATA_GROUP - username: nacos - password: nacos - context-path: - ##if use MSE Nacos with auth, mutex with username/password attribute - #access-key: - #secret-key: - data-id: seataServer.properties - consul: - server-addr: 127.0.0.1:8500 - acl-token: - key: seata.properties - apollo: - appId: seata-server - apollo-meta: http://192.168.1.204:8801 - apollo-config-service: http://192.168.1.204:8080 - namespace: application - apollo-access-key-secret: - cluster: seata - zk: - server-addr: 127.0.0.1:2181 - session-timeout: 6000 - connect-timeout: 2000 - username: - password: a - node-path: /seata/seata.properties - etcd3: - server-addr: http://localhost:2379 - key: seata.properties + # support: nacos, consul, apollo, zk, etcd3 + type: file registry: - # support: nacos 、 eureka 、 redis 、 zk 、 consul 、 etcd3 、 sofa - type: nacos - preferred-networks: 30.240.* - nacos: - application: seata-server1 - server-addr: 127.0.0.1:8848 - group: SEATA_GROUP - namespace: - cluster: default - username: nacos - password: nacos - context-path: - ##if use MSE Nacos with auth, mutex with username/password attribute - #access-key: - #secret-key: - eureka: - service-url: http://localhost:8761/eureka - application: default - weight: 1 - redis: - server-addr: localhost:6379 - db: 0 - password: - cluster: default - timeout: 0 - zk: - cluster: default - server-addr: 127.0.0.1:2181 - session-timeout: 6000 - connect-timeout: 2000 - username: - password: - consul: - cluster: default - server-addr: 127.0.0.1:8500 - acl-token: - etcd3: - cluster: default - server-addr: http://localhost:2379 - sofa: - server-addr: 127.0.0.1:9603 - application: default - region: DEFAULT_ZONE - datacenter: DefaultDataCenter - cluster: default - group: SEATA_GROUP - address-wait-time: 3000 - - server: - service-port: 8091 #If not configured, the default is '${server.port} + 1000' - max-commit-retry-timeout: -1 - max-rollback-retry-timeout: -1 - rollback-retry-timeout-unlock-enable: false - enable-check-auth: true - enable-parallel-request-handle: true - retry-dead-threshold: 130000 - xaer-nota-retry-timeout: 60000 - enableParallelRequestHandle: true - recovery: - committing-retry-period: 1000 - async-committing-retry-period: 1000 - rollbacking-retry-period: 1000 - timeout-retry-period: 1000 - undo: - log-save-days: 7 - log-delete-period: 86400000 - session: - branch-async-queue-size: 5000 #branch async remove queue size - enable-branch-async-remove: false #enable to asynchronous remove branchSession + # support: nacos, eureka, redis, zk, consul, etcd3, sofa + type: file store: - # support: file 、 db 、 redis - mode: db - session: - mode: db - lock: - mode: db - file: - dir: sessionStore - max-branch-session-size: 16384 - max-global-session-size: 512 - file-write-buffer-cache-size: 16384 - session-reload-read-size: 100 - flush-disk-mode: async - db: - datasource: druid - db-type: mysql - driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3305/seata?rewriteBatchedStatements=true&useSSL=false - user: root - password: root 1234 - min-conn: 10 - max-conn: 100 - global-table: global_table - branch-table: branch_table - lock-table: lock_table - distributed-lock-table: distributed_lock - query-limit: 1000 - max-wait: 5000 - redis: - mode: single - database: 0 - min-conn: 10 - max-conn: 100 - password: - max-total: 100 - query-limit: 1000 - single: - host: 127.0.0.1 - port: 6379 - sentinel: - master-name: - sentinel-hosts: - sentinel-password: - metrics: - enabled: false - registry-type: compact - exporter-list: prometheus - exporter-prometheus-port: 9898 - transport: - rpc-tc-request-timeout: 15000 - enable-tc-server-batch-send-response: false - shutdown: - wait: 3 - thread-factory: - boss-thread-prefix: NettyBoss - worker-thread-prefix: NettyServerNIOWorker - boss-thread-size: 1 -console: - user: - username: nidemingzi - password: nidemima - - + # support: file 、 db 、 redis 、 raft + mode: file + # server: + # service-port: 8091 #If not configured, the default is '${server.port} + 1000' + security: + secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017 + tokenValidityInMilliseconds: 1800000 + ignore: + urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/version.json,/health,/error \ No newline at end of file From c4e0bc4ded6fcc03028d2753c05c2d435bed7317 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sun, 25 Aug 2024 21:55:43 +0800 Subject: [PATCH 10/42] cr --- core/src/main/java/org/apache/seata/core/protocol/Version.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/seata/core/protocol/Version.java b/core/src/main/java/org/apache/seata/core/protocol/Version.java index 5b7fa2cd9a5..12178d8fe05 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/Version.java +++ b/core/src/main/java/org/apache/seata/core/protocol/Version.java @@ -36,7 +36,7 @@ public class Version { /** * The constant CURRENT. */ - private static final String CURRENT = "2.x"; + private static final String CURRENT = VersionInfo.VERSION; private static final String VERSION_0_7_1 = "0.7.1"; private static final String VERSION_1_5_0 = "1.5.0"; private static final int MAX_VERSION_DOT = 3; From 24c0d230c3a4364f3483cbde73eeb3a0eac22a73 Mon Sep 17 00:00:00 2001 From: yiqi <77573225+PleaseGiveMeTheCoke@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:00:00 +0800 Subject: [PATCH 11/42] Delete seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java --- .../grpc/generated/GrpcMessageProto.java | 1026 ----------------- 1 file changed, 1026 deletions(-) delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java deleted file mode 100644 index 381bc7af4ab..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProto.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.grpc.generated; - -/** - * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} - */ -public final class GrpcMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.apache.seata.core.protocol.GrpcMessageProto) - GrpcMessageProtoOrBuilder { -private static final long serialVersionUID = 0L; - // Use GrpcMessageProto.newBuilder() to construct. - private GrpcMessageProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GrpcMessageProto() { - } - - @Override - @SuppressWarnings({"unused"}) - protected Object newInstance( - UnusedPrivateParameter unused) { - return new GrpcMessageProto(); - } - - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GrpcMessageProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - id_ = input.readInt32(); - break; - } - case 16: { - - messageType_ = input.readInt32(); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - headMap_ = com.google.protobuf.MapField.newMapField( - HeadMapDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - headMap__ = input.readMessage( - HeadMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - headMap_.getMutableMap().put( - headMap__.getKey(), headMap__.getValue()); - break; - } - case 34: { - com.google.protobuf.Any.Builder subBuilder = null; - if (body_ != null) { - subBuilder = body_.toBuilder(); - } - body_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(body_); - body_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GrpcMessageProto.class, Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - private int id_; - /** - * int32 id = 1; - * @return The id. - */ - @Override - public int getId() { - return id_; - } - - public static final int MESSAGETYPE_FIELD_NUMBER = 2; - private int messageType_; - /** - * int32 messageType = 2; - * @return The messageType. - */ - @Override - public int getMessageType() { - return messageType_; - } - - public static final int HEADMAP_FIELD_NUMBER = 3; - private static final class HeadMapDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - String, String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - String, String> headMap_; - private com.google.protobuf.MapField - internalGetHeadMap() { - if (headMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - return headMap_; - } - - public int getHeadMapCount() { - return internalGetHeadMap().getMap().size(); - } - /** - * map<string, string> headMap = 3; - */ - - @Override - public boolean containsHeadMap( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetHeadMap().getMap().containsKey(key); - } - /** - * Use {@link #getHeadMapMap()} instead. - */ - @Override - @Deprecated - public java.util.Map getHeadMap() { - return getHeadMapMap(); - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public java.util.Map getHeadMapMap() { - return internalGetHeadMap().getMap(); - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public String getHeadMapOrDefault( - String key, - String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public String getHeadMapOrThrow( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - if (!map.containsKey(key)) { - throw new IllegalArgumentException(); - } - return map.get(key); - } - - public static final int BODY_FIELD_NUMBER = 4; - private com.google.protobuf.Any body_; - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - @Override - public boolean hasBody() { - return body_ != null; - } - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - @Override - public com.google.protobuf.Any getBody() { - return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; - } - /** - * .google.protobuf.Any body = 4; - */ - @Override - public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { - return getBody(); - } - - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (id_ != 0) { - output.writeInt32(1, id_); - } - if (messageType_ != 0) { - output.writeInt32(2, messageType_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetHeadMap(), - HeadMapDefaultEntryHolder.defaultEntry, - 3); - if (body_ != null) { - output.writeMessage(4, getBody()); - } - unknownFields.writeTo(output); - } - - @Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (id_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, id_); - } - if (messageType_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, messageType_); - } - for (java.util.Map.Entry entry - : internalGetHeadMap().getMap().entrySet()) { - com.google.protobuf.MapEntry - headMap__ = HeadMapDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, headMap__); - } - if (body_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getBody()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @Override - public boolean equals(final Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof GrpcMessageProto)) { - return super.equals(obj); - } - GrpcMessageProto other = (GrpcMessageProto) obj; - - if (getId() - != other.getId()) return false; - if (getMessageType() - != other.getMessageType()) return false; - if (!internalGetHeadMap().equals( - other.internalGetHeadMap())) return false; - if (hasBody() != other.hasBody()) return false; - if (hasBody()) { - if (!getBody() - .equals(other.getBody())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId(); - hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER; - hash = (53 * hash) + getMessageType(); - if (!internalGetHeadMap().getMap().isEmpty()) { - hash = (37 * hash) + HEADMAP_FIELD_NUMBER; - hash = (53 * hash) + internalGetHeadMap().hashCode(); - } - if (hasBody()) { - hash = (37 * hash) + BODY_FIELD_NUMBER; - hash = (53 * hash) + getBody().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static GrpcMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GrpcMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GrpcMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GrpcMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GrpcMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static GrpcMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static GrpcMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GrpcMessageProto parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static GrpcMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static GrpcMessageProto parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static GrpcMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static GrpcMessageProto parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(GrpcMessageProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.apache.seata.core.protocol.GrpcMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:org.apache.seata.core.protocol.GrpcMessageProto) - GrpcMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 3: - return internalGetMutableHeadMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @Override - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GrpcMessageProto.class, Builder.class); - } - - // Construct using org.apache.seata.grpc.generated.GrpcMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @Override - public Builder clear() { - super.clear(); - id_ = 0; - - messageType_ = 0; - - internalGetMutableHeadMap().clear(); - if (bodyBuilder_ == null) { - body_ = null; - } else { - body_ = null; - bodyBuilder_ = null; - } - return this; - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return GrpcMessage.internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - } - - @Override - public GrpcMessageProto getDefaultInstanceForType() { - return GrpcMessageProto.getDefaultInstance(); - } - - @Override - public GrpcMessageProto build() { - GrpcMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public GrpcMessageProto buildPartial() { - GrpcMessageProto result = new GrpcMessageProto(this); - int from_bitField0_ = bitField0_; - result.id_ = id_; - result.messageType_ = messageType_; - result.headMap_ = internalGetHeadMap(); - result.headMap_.makeImmutable(); - if (bodyBuilder_ == null) { - result.body_ = body_; - } else { - result.body_ = bodyBuilder_.build(); - } - onBuilt(); - return result; - } - - @Override - public Builder clone() { - return super.clone(); - } - @Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.setField(field, value); - } - @Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return super.setRepeatedField(field, index, value); - } - @Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return super.addRepeatedField(field, value); - } - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GrpcMessageProto) { - return mergeFrom((GrpcMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(GrpcMessageProto other) { - if (other == GrpcMessageProto.getDefaultInstance()) return this; - if (other.getId() != 0) { - setId(other.getId()); - } - if (other.getMessageType() != 0) { - setMessageType(other.getMessageType()); - } - internalGetMutableHeadMap().mergeFrom( - other.internalGetHeadMap()); - if (other.hasBody()) { - mergeBody(other.getBody()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GrpcMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GrpcMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int id_ ; - /** - * int32 id = 1; - * @return The id. - */ - @Override - public int getId() { - return id_; - } - /** - * int32 id = 1; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(int value) { - - id_ = value; - onChanged(); - return this; - } - /** - * int32 id = 1; - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = 0; - onChanged(); - return this; - } - - private int messageType_ ; - /** - * int32 messageType = 2; - * @return The messageType. - */ - @Override - public int getMessageType() { - return messageType_; - } - /** - * int32 messageType = 2; - * @param value The messageType to set. - * @return This builder for chaining. - */ - public Builder setMessageType(int value) { - - messageType_ = value; - onChanged(); - return this; - } - /** - * int32 messageType = 2; - * @return This builder for chaining. - */ - public Builder clearMessageType() { - - messageType_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - String, String> headMap_; - private com.google.protobuf.MapField - internalGetHeadMap() { - if (headMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - return headMap_; - } - private com.google.protobuf.MapField - internalGetMutableHeadMap() { - onChanged();; - if (headMap_ == null) { - headMap_ = com.google.protobuf.MapField.newMapField( - HeadMapDefaultEntryHolder.defaultEntry); - } - if (!headMap_.isMutable()) { - headMap_ = headMap_.copy(); - } - return headMap_; - } - - public int getHeadMapCount() { - return internalGetHeadMap().getMap().size(); - } - /** - * map<string, string> headMap = 3; - */ - - @Override - public boolean containsHeadMap( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetHeadMap().getMap().containsKey(key); - } - /** - * Use {@link #getHeadMapMap()} instead. - */ - @Override - @Deprecated - public java.util.Map getHeadMap() { - return getHeadMapMap(); - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public java.util.Map getHeadMapMap() { - return internalGetHeadMap().getMap(); - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public String getHeadMapOrDefault( - String key, - String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> headMap = 3; - */ - @Override - - public String getHeadMapOrThrow( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetHeadMap().getMap(); - if (!map.containsKey(key)) { - throw new IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearHeadMap() { - internalGetMutableHeadMap().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> headMap = 3; - */ - - public Builder removeHeadMap( - String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableHeadMap().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @Deprecated - public java.util.Map - getMutableHeadMap() { - return internalGetMutableHeadMap().getMutableMap(); - } - /** - * map<string, string> headMap = 3; - */ - public Builder putHeadMap( - String key, - String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableHeadMap().getMutableMap() - .put(key, value); - return this; - } - /** - * map<string, string> headMap = 3; - */ - - public Builder putAllHeadMap( - java.util.Map values) { - internalGetMutableHeadMap().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.Any body_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> bodyBuilder_; - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - public boolean hasBody() { - return bodyBuilder_ != null || body_ != null; - } - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - public com.google.protobuf.Any getBody() { - if (bodyBuilder_ == null) { - return body_ == null ? com.google.protobuf.Any.getDefaultInstance() : body_; - } else { - return bodyBuilder_.getMessage(); - } - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder setBody(com.google.protobuf.Any value) { - if (bodyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - body_ = value; - onChanged(); - } else { - bodyBuilder_.setMessage(value); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder setBody( - com.google.protobuf.Any.Builder builderForValue) { - if (bodyBuilder_ == null) { - body_ = builderForValue.build(); - onChanged(); - } else { - bodyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder mergeBody(com.google.protobuf.Any value) { - if (bodyBuilder_ == null) { - if (body_ != null) { - body_ = - com.google.protobuf.Any.newBuilder(body_).mergeFrom(value).buildPartial(); - } else { - body_ = value; - } - onChanged(); - } else { - bodyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public Builder clearBody() { - if (bodyBuilder_ == null) { - body_ = null; - onChanged(); - } else { - body_ = null; - bodyBuilder_ = null; - } - - return this; - } - /** - * .google.protobuf.Any body = 4; - */ - public com.google.protobuf.Any.Builder getBodyBuilder() { - - onChanged(); - return getBodyFieldBuilder().getBuilder(); - } - /** - * .google.protobuf.Any body = 4; - */ - public com.google.protobuf.AnyOrBuilder getBodyOrBuilder() { - if (bodyBuilder_ != null) { - return bodyBuilder_.getMessageOrBuilder(); - } else { - return body_ == null ? - com.google.protobuf.Any.getDefaultInstance() : body_; - } - } - /** - * .google.protobuf.Any body = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getBodyFieldBuilder() { - if (bodyBuilder_ == null) { - bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getBody(), - getParentForChildren(), - isClean()); - body_ = null; - } - return bodyBuilder_; - } - @Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:org.apache.seata.core.protocol.GrpcMessageProto) - } - - // @@protoc_insertion_point(class_scope:org.apache.seata.core.protocol.GrpcMessageProto) - private static final GrpcMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new GrpcMessageProto(); - } - - public static GrpcMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @Override - public GrpcMessageProto parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GrpcMessageProto(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @Override - public GrpcMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - From 4e2fe65997b424ef001d9fb7cb4dfac5e214533b Mon Sep 17 00:00:00 2001 From: yiqi <77573225+PleaseGiveMeTheCoke@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:00:32 +0800 Subject: [PATCH 12/42] Delete seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java --- .../seata/grpc/generated/GrpcMessage.java | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java deleted file mode 100644 index e716100184e..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessage.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.grpc.generated; - -public final class GrpcMessage { - private GrpcMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - String[] descriptorData = { - "\n\021grpcMessage.proto\022\036org.apache.seata.co" + - "re.protocol\032\031google/protobuf/any.proto\"\327" + - "\001\n\020GrpcMessageProto\022\n\n\002id\030\001 \001(\005\022\023\n\013messa" + - "geType\030\002 \001(\005\022N\n\007headMap\030\003 \003(\0132=.org.apac" + - "he.seata.core.protocol.GrpcMessageProto." + - "HeadMapEntry\022\"\n\004body\030\004 \001(\0132\024.google.prot" + - "obuf.Any\032.\n\014HeadMapEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + - "\005value\030\002 \001(\t:\0028\0012\205\001\n\014SeataService\022u\n\013sen" + - "dRequest\0220.org.apache.seata.core.protoco" + - "l.GrpcMessageProto\0320.org.apache.seata.co" + - "re.protocol.GrpcMessageProto(\0010\001B0\n\037org." + - "apache.seata.grpc.generatedB\013GrpcMessage" + - "P\001b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - }); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor, - new String[] { "Id", "MessageType", "HeadMap", "Body", }); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor = - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_descriptor.getNestedTypes().get(0); - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_org_apache_seata_core_protocol_GrpcMessageProto_HeadMapEntry_descriptor, - new String[] { "Key", "Value", }); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} From 022b9cb7a6a9044025e931adfec4c7415a19f4f5 Mon Sep 17 00:00:00 2001 From: yiqi <77573225+PleaseGiveMeTheCoke@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:01:21 +0800 Subject: [PATCH 13/42] Delete seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java --- .../grpc/generated/SeataServiceGrpc.java | 272 ------------------ 1 file changed, 272 deletions(-) delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java deleted file mode 100644 index e780e30882f..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/SeataServiceGrpc.java +++ /dev/null @@ -1,272 +0,0 @@ -package org.apache.seata.grpc.generated; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; -import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; -import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; -import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.27.1)", - comments = "Source: grpcMessage.proto") -public final class SeataServiceGrpc { - - private SeataServiceGrpc() {} - - public static final String SERVICE_NAME = "org.apache.seata.core.protocol.SeataService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getSendRequestMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "sendRequest", - requestType = GrpcMessageProto.class, - responseType = GrpcMessageProto.class, - methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - public static io.grpc.MethodDescriptor getSendRequestMethod() { - io.grpc.MethodDescriptor getSendRequestMethod; - if ((getSendRequestMethod = SeataServiceGrpc.getSendRequestMethod) == null) { - synchronized (SeataServiceGrpc.class) { - if ((getSendRequestMethod = SeataServiceGrpc.getSendRequestMethod) == null) { - SeataServiceGrpc.getSendRequestMethod = getSendRequestMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "sendRequest")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - GrpcMessageProto.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - GrpcMessageProto.getDefaultInstance())) - .setSchemaDescriptor(new SeataServiceMethodDescriptorSupplier("sendRequest")) - .build(); - } - } - } - return getSendRequestMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static SeataServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @Override - public SeataServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceStub(channel, callOptions); - } - }; - return SeataServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static SeataServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @Override - public SeataServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceBlockingStub(channel, callOptions); - } - }; - return SeataServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static SeataServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @Override - public SeataServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceFutureStub(channel, callOptions); - } - }; - return SeataServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public static abstract class SeataServiceImplBase implements io.grpc.BindableService { - - /** - */ - public io.grpc.stub.StreamObserver sendRequest( - io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getSendRequestMethod(), responseObserver); - } - - @Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSendRequestMethod(), - asyncBidiStreamingCall( - new MethodHandlers< - GrpcMessageProto, - GrpcMessageProto>( - this, METHODID_SEND_REQUEST))) - .build(); - } - } - - /** - */ - public static final class SeataServiceStub extends io.grpc.stub.AbstractAsyncStub { - private SeataServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @Override - protected SeataServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceStub(channel, callOptions); - } - - /** - */ - public io.grpc.stub.StreamObserver sendRequest( - io.grpc.stub.StreamObserver responseObserver) { - return asyncBidiStreamingCall( - getChannel().newCall(getSendRequestMethod(), getCallOptions()), responseObserver); - } - } - - /** - */ - public static final class SeataServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private SeataServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @Override - protected SeataServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceBlockingStub(channel, callOptions); - } - } - - /** - */ - public static final class SeataServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private SeataServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @Override - protected SeataServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SeataServiceFutureStub(channel, callOptions); - } - } - - private static final int METHODID_SEND_REQUEST = 0; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final SeataServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(SeataServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @Override - @SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - - @Override - @SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_SEND_REQUEST: - return (io.grpc.stub.StreamObserver) serviceImpl.sendRequest( - (io.grpc.stub.StreamObserver) responseObserver); - default: - throw new AssertionError(); - } - } - } - - private static abstract class SeataServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - SeataServiceBaseDescriptorSupplier() {} - - @Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return GrpcMessage.getDescriptor(); - } - - @Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("SeataService"); - } - } - - private static final class SeataServiceFileDescriptorSupplier - extends SeataServiceBaseDescriptorSupplier { - SeataServiceFileDescriptorSupplier() {} - } - - private static final class SeataServiceMethodDescriptorSupplier - extends SeataServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - SeataServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (SeataServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new SeataServiceFileDescriptorSupplier()) - .addMethod(getSendRequestMethod()) - .build(); - } - } - } - return result; - } -} From a7762a21ea4ea8b27ffd857c5b5b83da1c1d637d Mon Sep 17 00:00:00 2001 From: yiqi <77573225+PleaseGiveMeTheCoke@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:01:47 +0800 Subject: [PATCH 14/42] Delete serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java --- .../serializer/protobuf/GrpcSerializer.java | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java deleted file mode 100644 index d07cea8d4bf..00000000000 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.apache.seata.serializer.protobuf; - -import com.google.protobuf.Any; -import com.google.protobuf.Message; -import org.apache.seata.common.exception.ShouldNeverHappenException; -import org.apache.seata.common.loader.LoadLevel; -import org.apache.seata.core.serializer.Serializer; -import org.apache.seata.serializer.protobuf.convertor.PbConvertor; -import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; - -@LoadLevel(name = "GRPC") -public class GrpcSerializer implements Serializer { - @Override - public byte[] serialize(T t) { - PbConvertor pbConvertor = ProtobufConvertManager.getInstance() - .fetchConvertor(t.getClass().getName()); - Any grpcBody = Any.pack((Message) pbConvertor.convert2Proto(t)); - - return grpcBody.toByteArray(); - } - - @Override - public T deserialize(byte[] bytes) { - try { - Any body = Any.parseFrom(bytes); - final Class clazz = ProtobufConvertManager.getInstance().fetchProtoClass(getTypeNameFromTypeUrl(body.getTypeUrl())); - if (body.is(clazz)) { - Object ob = body.unpack(clazz); - PbConvertor pbConvertor = ProtobufConvertManager.getInstance().fetchReversedConvertor(clazz.getName()); - - return (T) pbConvertor.convert2Model(ob); - } - } catch (Throwable e) { - throw new ShouldNeverHappenException("GrpcSerializer deserialize error", e); - } - - return null; - } - - private String getTypeNameFromTypeUrl(String typeUri) { - int pos = typeUri.lastIndexOf('/'); - return pos == -1 ? "" : typeUri.substring(pos + 1); - } -} From 0ba622cd9628cc8ec369a3acde0bfdda4934003e Mon Sep 17 00:00:00 2001 From: yiqi <77573225+PleaseGiveMeTheCoke@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:02:32 +0800 Subject: [PATCH 15/42] Delete seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java --- .../generated/GrpcMessageProtoOrBuilder.java | 72 ------------------- 1 file changed, 72 deletions(-) delete mode 100644 seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java diff --git a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java b/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java deleted file mode 100644 index f51b49c00d4..00000000000 --- a/seata-test-grpc/src/main/java/org/apache/seata/grpc/generated/GrpcMessageProtoOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: grpcMessage.proto - -package org.apache.seata.grpc.generated; - -public interface GrpcMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.apache.seata.core.protocol.GrpcMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 id = 1; - * @return The id. - */ - int getId(); - - /** - * int32 messageType = 2; - * @return The messageType. - */ - int getMessageType(); - - /** - * map<string, string> headMap = 3; - */ - int getHeadMapCount(); - /** - * map<string, string> headMap = 3; - */ - boolean containsHeadMap( - String key); - /** - * Use {@link #getHeadMapMap()} instead. - */ - @Deprecated - java.util.Map - getHeadMap(); - /** - * map<string, string> headMap = 3; - */ - java.util.Map - getHeadMapMap(); - /** - * map<string, string> headMap = 3; - */ - - /* nullable */ -String getHeadMapOrDefault( - String key, - /* nullable */ -String defaultValue); - /** - * map<string, string> headMap = 3; - */ - - String getHeadMapOrThrow( - String key); - - /** - * .google.protobuf.Any body = 4; - * @return Whether the body field is set. - */ - boolean hasBody(); - /** - * .google.protobuf.Any body = 4; - * @return The body. - */ - com.google.protobuf.Any getBody(); - /** - * .google.protobuf.Any body = 4; - */ - com.google.protobuf.AnyOrBuilder getBodyOrBuilder(); -} From 397b90c497916c3e20908ba97ff55855581c1fe4 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sun, 25 Aug 2024 22:04:40 +0800 Subject: [PATCH 16/42] cr --- .../SerializerSecurityRegistryTest.java | 16 ++++++++-------- pom.xml | 1 - server/pom.xml | 5 ----- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java b/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java index b8bb4bc026a..ff396ebee16 100644 --- a/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java +++ b/core/src/test/java/org/apache/seata/core/serializer/SerializerSecurityRegistryTest.java @@ -40,19 +40,19 @@ public void getAllowClassType() { @Test public void getAllowClassPattern() { Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(Long.class.getCanonicalName())); + SerializerSecurityRegistry.getAllowClassPattern().contains(Long.class.getCanonicalName())); Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(Integer.class.getCanonicalName())); + SerializerSecurityRegistry.getAllowClassPattern().contains(Integer.class.getCanonicalName())); Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(HeartbeatMessage.class.getCanonicalName())); + SerializerSecurityRegistry.getAllowClassPattern().contains(HeartbeatMessage.class.getCanonicalName())); Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(BranchCommitRequest.class.getCanonicalName())); + SerializerSecurityRegistry.getAllowClassPattern().contains(BranchCommitRequest.class.getCanonicalName())); Assertions.assertTrue( - SerializerSecurityRegistry.getAllowClassPattern().contains(BranchCommitResponse.class.getCanonicalName())); + SerializerSecurityRegistry.getAllowClassPattern().contains(BranchCommitResponse.class.getCanonicalName())); Assertions.assertFalse(SerializerSecurityRegistry.getAllowClassPattern() - .contains(AbstractBranchEndRequest.class.getCanonicalName())); + .contains(AbstractBranchEndRequest.class.getCanonicalName())); Assertions.assertFalse( - SerializerSecurityRegistry.getAllowClassPattern().contains(Version.class.getCanonicalName())); + SerializerSecurityRegistry.getAllowClassPattern().contains(Version.class.getCanonicalName())); Assertions.assertTrue(SerializerSecurityRegistry.getAllowClassPattern().contains("org.apache.seata.*")); } -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index 1e5241c1ca2..0edf5b10600 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,6 @@ ext/apm-seata-skywalking-plugin integration-tx-api namingserver - seata-test-grpc diff --git a/server/pom.xml b/server/pom.xml index d9cc0a2cd0e..a9b6f05bd88 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -274,11 +274,6 @@ com.alipay.sofa bolt - - mysql - mysql-connector-java - 8.0.28 - org.codehaus.janino janino From 05552c0f6de75b041d4a7544297728e4ea18137c Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 14:06:50 +0800 Subject: [PATCH 17/42] cr --- .../core/rpc/netty/grpc/GrpcDecoder.java | 2 +- .../core/rpc/netty/grpc/GrpcEncoder.java | 2 +- .../serializer/SerializerServiceLoader.java | 31 ++----------------- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index e82b874381b..145c67ed69a 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -53,7 +53,7 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc int messageId = grpcMessageProto.getId(); byte[] byteArray = body.toByteArray(); - Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode())); + Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode()), (byte) 0); Object messageBody = serializer.deserialize(byteArray); RpcMessage rpcMsg = new RpcMessage(); diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java index 1c5a5e11533..ee7ed58a0fa 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -43,7 +43,7 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) ctx.writeAndFlush(new DefaultHttp2HeadersFrame(headers)); } - Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode())); + Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode()), (byte) 0); Any messageBody = Any.parseFrom(serializer.serialize(body)); GrpcMessageProto grpcMessageProto = GrpcMessageProto.newBuilder() .setBody(messageBody) diff --git a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java index 250e1c65b60..abb3d2d838a 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java +++ b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java @@ -74,7 +74,7 @@ public static Serializer load(SerializerType type, byte version) throws Enhanced } } - String key = serialzerKey(type, version); + String key = serializerKey(type, version); Serializer serializer = SERIALIZER_MAP.get(key); if (serializer == null) { if (type == SerializerType.SEATA) { @@ -87,34 +87,7 @@ public static Serializer load(SerializerType type, byte version) throws Enhanced return serializer; } - /** - * Load the service of {@link Serializer} - * - * @param type the serializer type - * @return the service of {@link Serializer} - * @throws EnhancedServiceNotFoundException the enhanced service not found exception - */ - public static Serializer load(SerializerType type) throws EnhancedServiceNotFoundException { - if (type == SerializerType.PROTOBUF) { - try { - ReflectionUtil.getClassByName(PROTOBUF_SERIALIZER_CLASS_NAME); - } catch (ClassNotFoundException e) { - throw new EnhancedServiceNotFoundException("'ProtobufSerializer' not found. " + - "Please manually reference 'org.apache.seata:seata-serializer-protobuf' dependency ", e); - } - } - - String key = type.name(); - Serializer serializer = SERIALIZER_MAP.get(key); - if (serializer == null) { - serializer = EnhancedServiceLoader.load(Serializer.class, type.name()); - - SERIALIZER_MAP.put(key, serializer); - } - return serializer; - } - - private static String serialzerKey(SerializerType type, byte version) { + private static String serializerKey(SerializerType type, byte version) { if (type == SerializerType.SEATA) { return type.name() + version; } From c7da0ff0132dc08b659d9868956aaa2e14ef1bb9 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 14:13:42 +0800 Subject: [PATCH 18/42] cr --- .../serializer/protobuf/GrpcSerializer.java | 44 +++++++++++++++++++ ...rg.apache.seata.core.serializer.Serializer | 1 + 2 files changed, 45 insertions(+) create mode 100644 serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java new file mode 100644 index 00000000000..d07cea8d4bf --- /dev/null +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java @@ -0,0 +1,44 @@ +package org.apache.seata.serializer.protobuf; + +import com.google.protobuf.Any; +import com.google.protobuf.Message; +import org.apache.seata.common.exception.ShouldNeverHappenException; +import org.apache.seata.common.loader.LoadLevel; +import org.apache.seata.core.serializer.Serializer; +import org.apache.seata.serializer.protobuf.convertor.PbConvertor; +import org.apache.seata.serializer.protobuf.manager.ProtobufConvertManager; + +@LoadLevel(name = "GRPC") +public class GrpcSerializer implements Serializer { + @Override + public byte[] serialize(T t) { + PbConvertor pbConvertor = ProtobufConvertManager.getInstance() + .fetchConvertor(t.getClass().getName()); + Any grpcBody = Any.pack((Message) pbConvertor.convert2Proto(t)); + + return grpcBody.toByteArray(); + } + + @Override + public T deserialize(byte[] bytes) { + try { + Any body = Any.parseFrom(bytes); + final Class clazz = ProtobufConvertManager.getInstance().fetchProtoClass(getTypeNameFromTypeUrl(body.getTypeUrl())); + if (body.is(clazz)) { + Object ob = body.unpack(clazz); + PbConvertor pbConvertor = ProtobufConvertManager.getInstance().fetchReversedConvertor(clazz.getName()); + + return (T) pbConvertor.convert2Model(ob); + } + } catch (Throwable e) { + throw new ShouldNeverHappenException("GrpcSerializer deserialize error", e); + } + + return null; + } + + private String getTypeNameFromTypeUrl(String typeUri) { + int pos = typeUri.lastIndexOf('/'); + return pos == -1 ? "" : typeUri.substring(pos + 1); + } +} diff --git a/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer b/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer index 81c5235e259..f6fbf709dea 100644 --- a/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer +++ b/serializer/seata-serializer-protobuf/src/main/resources/META-INF/services/org.apache.seata.core.serializer.Serializer @@ -14,4 +14,5 @@ # See the License for the specific language governing permissions and # limitations under the License. # +org.apache.seata.serializer.protobuf.ProtobufSerializer org.apache.seata.serializer.protobuf.GrpcSerializer \ No newline at end of file From b93add1c2f42c9ab19897a447cca1db5d519ee0b Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 14:31:05 +0800 Subject: [PATCH 19/42] cr --- core/pom.xml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index f274dd318ae..323a909aafa 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -76,13 +76,6 @@ - - - kr.motd.maven - os-maven-plugin - 1.5.0.Final - - icu.easyj.maven.plugins @@ -104,21 +97,16 @@ org.xolstice.maven.plugins protobuf-maven-plugin - 0.6.1 + ${project.basedir}/src/main/proto/ - com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} - grpc-java - - io.grpc:protoc-gen-grpc-java:1.11.0:exe:${os.detected.classifier} - compile - compile-custom From e45049cecc8171fef8f4de2821c3bb5f98e9456a Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 14:56:25 +0800 Subject: [PATCH 20/42] cr --- test/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/test/pom.xml b/test/pom.xml index 22a1517ffa2..3fd4460094a 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -171,4 +171,5 @@ + \ No newline at end of file From 0621acd17929cbafdbcb821eb73e6cc1947e2048 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 15:10:40 +0800 Subject: [PATCH 21/42] cr --- .../org/apache/seata/core/protocol/Protocol.java | 16 ++++++++++++++++ .../core/protocol/detector/Http2Detector.java | 16 ++++++++++++++++ .../core/protocol/detector/ProtocolDetector.java | 16 ++++++++++++++++ .../core/protocol/detector/SeataDetector.java | 16 ++++++++++++++++ .../core/rpc/netty/ProtocolDetectHandler.java | 16 ++++++++++++++++ .../seata/core/rpc/netty/grpc/GrpcDecoder.java | 16 ++++++++++++++++ .../seata/core/rpc/netty/grpc/GrpcEncoder.java | 16 ++++++++++++++++ .../core/rpc/netty/grpc/GrpcHeaderEnum.java | 16 ++++++++++++++++ core/src/main/proto/grpcMessage.proto | 16 ++++++++++++++++ .../serializer/protobuf/GrpcSerializer.java | 16 ++++++++++++++++ .../core/rpc/netty/mockserver/GrpcTest.java | 16 ++++++++++++++++ 11 files changed, 176 insertions(+) diff --git a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java index 4a30965783f..aac9369c77c 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java +++ b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.protocol; /** diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java index d23b72306e8..474f327c4ff 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.protocol.detector; import io.netty.buffer.ByteBuf; diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/ProtocolDetector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/ProtocolDetector.java index 2f4529ba3bc..89d5d10e7be 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/detector/ProtocolDetector.java +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/ProtocolDetector.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.protocol.detector; import io.netty.buffer.ByteBuf; diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java index 49b3c0f89c1..e68e9a012eb 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.protocol.detector; import io.netty.buffer.ByteBuf; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDetectHandler.java b/core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDetectHandler.java index 8a966e903a8..9f1b5f8c113 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDetectHandler.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDetectHandler.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.rpc.netty; import io.netty.buffer.ByteBuf; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index 145c67ed69a..9c45c27e18d 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.rpc.netty.grpc; import com.google.protobuf.Any; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java index ee7ed58a0fa..bd2ab0176d4 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.rpc.netty.grpc; import com.google.protobuf.Any; diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java index 6394c6e6c70..2a803cedbec 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcHeaderEnum.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.rpc.netty.grpc; public enum GrpcHeaderEnum { diff --git a/core/src/main/proto/grpcMessage.proto b/core/src/main/proto/grpcMessage.proto index 3545853e359..f39135c8867 100644 --- a/core/src/main/proto/grpcMessage.proto +++ b/core/src/main/proto/grpcMessage.proto @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ syntax = "proto3"; package org.apache.seata.core.protocol; import "google/protobuf/any.proto"; diff --git a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java index d07cea8d4bf..2ef8eac784e 100644 --- a/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java +++ b/serializer/seata-serializer-protobuf/src/main/java/org/apache/seata/serializer/protobuf/GrpcSerializer.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.serializer.protobuf; import com.google.protobuf.Any; diff --git a/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java b/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java index 98f8d5c6cba..e9c87592f90 100644 --- a/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java +++ b/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.seata.core.rpc.netty.mockserver; import com.google.protobuf.Any; From 06dfe34f3a5f9e6db57af9b8dc52dd6c95a02b3f Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 15:50:23 +0800 Subject: [PATCH 22/42] cr --- test/pom.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/pom.xml b/test/pom.xml index 3fd4460094a..a078cfd769f 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -57,6 +57,27 @@ + + org.xolstice.maven.plugins + protobuf-maven-plugin + + + com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} + + grpc-java + + io.grpc:protoc-gen-grpc-java:1.27.1:exe:${os.detected.classifier} + + + + + + compile + compile-custom + + + + From c701a79eb2fca1cc1a45f5401f6e501cf8e869f8 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 16:40:38 +0800 Subject: [PATCH 23/42] cr --- test/pom.xml | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/test/pom.xml b/test/pom.xml index a078cfd769f..4c3da7a7deb 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -44,27 +44,10 @@ org.xolstice.maven.plugins protobuf-maven-plugin - ${project.basedir}/src/main/resources/protobuf/org/apache/seata/protocol/transcation/ + ${project.basedir}/src/test/resources/protobuf/org/apache/seata/protocol/transcation/ com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} - - - - - compile - - - - - - org.xolstice.maven.plugins - protobuf-maven-plugin - - - com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} - - grpc-java io.grpc:protoc-gen-grpc-java:1.27.1:exe:${os.detected.classifier} @@ -73,7 +56,6 @@ compile - compile-custom From ad8bf75753f3ca159782205d18fe5bf22a8318df Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 16:53:17 +0800 Subject: [PATCH 24/42] cr --- test/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/pom.xml b/test/pom.xml index 4c3da7a7deb..806b1dc2901 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -48,6 +48,7 @@ com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} + grpc-java io.grpc:protoc-gen-grpc-java:1.27.1:exe:${os.detected.classifier} @@ -56,6 +57,7 @@ compile + compile-custom From 706eb0b3e82ba9f196a09825b44e91d0d54d8774 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 16:59:35 +0800 Subject: [PATCH 25/42] cr --- test/pom.xml | 2 +- .../seata/protocol/transcation/grpcMessage.proto | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/test/pom.xml b/test/pom.xml index 806b1dc2901..a33eaa21112 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -50,7 +50,7 @@ grpc-java - io.grpc:protoc-gen-grpc-java:1.27.1:exe:${os.detected.classifier} + io.grpc:protoc-gen-grpc-java:1.29.0:exe:${os.detected.classifier} diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto index 2e6563631db..15e92c0c8ed 100644 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ syntax = "proto3"; package org.apache.seata.protocol.protobuf; import "google/protobuf/any.proto"; From ebbf0f5a94402bd7fc2971e280bdaf6ebc5cd1fc Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 17:24:30 +0800 Subject: [PATCH 26/42] cr --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 0edf5b10600..45acd5c557c 100644 --- a/pom.xml +++ b/pom.xml @@ -374,6 +374,7 @@ p3c-pmd ${p3c-pmd.version} + From 29da91667083e931b1b6bed0807c84bf98fb5a79 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 17:24:43 +0800 Subject: [PATCH 27/42] cr --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 45acd5c557c..0edf5b10600 100644 --- a/pom.xml +++ b/pom.xml @@ -374,7 +374,6 @@ p3c-pmd ${p3c-pmd.version} - From 8a51486b9f9209a2b18c213f3cff808f558f3786 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 17:55:29 +0800 Subject: [PATCH 28/42] cr --- .../java/org/apache/seata/core/protocol/Protocol.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java index aac9369c77c..fe3cc000cfc 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/Protocol.java +++ b/core/src/main/java/org/apache/seata/core/protocol/Protocol.java @@ -17,12 +17,18 @@ package org.apache.seata.core.protocol; /** - * + * seata transport protocol */ public enum Protocol { + /** + * grpc + */ GPRC("grpc"), + /** + * seata + */ SEATA("seata"); public final String value; From 725d4b25048c920647c5faa033b1aa7713b00ed0 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 18:04:14 +0800 Subject: [PATCH 29/42] cr --- .../core/protocol/detector/Http2Detector.java | 23 +++++++++---------- .../core/protocol/detector/SeataDetector.java | 2 +- .../core/rpc/netty/grpc/GrpcEncoder.java | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java index 474f327c4ff..a004894f9b1 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/Http2Detector.java @@ -24,12 +24,11 @@ import io.netty.handler.codec.http2.Http2MultiplexHandler; import io.netty.handler.codec.http2.Http2StreamChannel; import io.netty.util.CharsetUtil; -import org.apache.seata.core.protocol.detector.ProtocolDetector; import org.apache.seata.core.rpc.netty.grpc.GrpcDecoder; import org.apache.seata.core.rpc.netty.grpc.GrpcEncoder; public class Http2Detector implements ProtocolDetector { - private final byte[] HTTP2_PREFIX_BYTES = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n".getBytes(CharsetUtil.UTF_8); + private static final byte[] HTTP2_PREFIX_BYTES = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n".getBytes(CharsetUtil.UTF_8); private ChannelHandler[] serverHandlers; public Http2Detector(ChannelHandler[] serverHandlers) { @@ -52,16 +51,16 @@ public boolean detect(ByteBuf in) { @Override public ChannelHandler[] getHandlers() { return new ChannelHandler[]{ - Http2FrameCodecBuilder.forServer().build(), - new Http2MultiplexHandler(new ChannelInitializer() { - @Override - protected void initChannel(Http2StreamChannel ch) { - final ChannelPipeline p = ch.pipeline(); - p.addLast(new GrpcDecoder()); - p.addLast(new GrpcEncoder()); - p.addLast(serverHandlers); - } - }) + Http2FrameCodecBuilder.forServer().build(), + new Http2MultiplexHandler(new ChannelInitializer() { + @Override + protected void initChannel(Http2StreamChannel ch) { + final ChannelPipeline p = ch.pipeline(); + p.addLast(new GrpcDecoder()); + p.addLast(new GrpcEncoder()); + p.addLast(serverHandlers); + } + }) }; } } \ No newline at end of file diff --git a/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java b/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java index e68e9a012eb..b9c30b0bc6d 100644 --- a/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java +++ b/core/src/main/java/org/apache/seata/core/protocol/detector/SeataDetector.java @@ -21,7 +21,7 @@ import org.apache.seata.core.rpc.netty.MultiProtocolDecoder; public class SeataDetector implements ProtocolDetector { - private final byte[] MAGIC_CODE_BYTES = {(byte) 0xda, (byte) 0xda}; + private static final byte[] MAGIC_CODE_BYTES = {(byte) 0xda, (byte) 0xda}; private ChannelHandler[] serverHandlers; public SeataDetector(ChannelHandler[] serverHandlers) { diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java index bd2ab0176d4..523f057dc67 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -40,7 +40,7 @@ public class GrpcEncoder extends ChannelOutboundHandlerAdapter { @Override public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { - if (!(msg instanceof RpcMessage)){ + if (!(msg instanceof RpcMessage)) { throw new UnsupportedOperationException("GrpcEncoder not support class:" + msg.getClass()); } From c35f31da0bf876b141310c81cc1e32bf55c48688 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 18:08:14 +0800 Subject: [PATCH 30/42] cr --- .../seata/config/nacos/NacosMockTest.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/config/seata-config-nacos/src/test/java/org/apache/seata/config/nacos/NacosMockTest.java b/config/seata-config-nacos/src/test/java/org/apache/seata/config/nacos/NacosMockTest.java index dbf2995e9f7..7a30740a89c 100644 --- a/config/seata-config-nacos/src/test/java/org/apache/seata/config/nacos/NacosMockTest.java +++ b/config/seata-config-nacos/src/test/java/org/apache/seata/config/nacos/NacosMockTest.java @@ -75,13 +75,13 @@ public void getConfig() { Configuration configuration = ConfigurationFactory.getInstance(); String configStrValue = configuration.getConfig(SUB_NACOS_DATAID); Assertions.assertNull(configStrValue); - configStrValue = configuration.getConfig(SUB_NACOS_DATAID, 1000); + configStrValue = configuration.getConfig(SUB_NACOS_DATAID, 5000); Assertions.assertNull(configStrValue); - configStrValue = configuration.getConfig(SUB_NACOS_DATAID, "TEST", 1000); + configStrValue = configuration.getConfig(SUB_NACOS_DATAID, "TEST", 5000); Assertions.assertEquals("TEST", configStrValue); ConfigurationCache.clear(); System.setProperty(SUB_NACOS_DATAID, "SYS-TEST"); - configStrValue = configuration.getConfig(SUB_NACOS_DATAID, "TEST", 1000); + configStrValue = configuration.getConfig(SUB_NACOS_DATAID, "TEST", 5000); Assertions.assertEquals("SYS-TEST", configStrValue); ConfigurationCache.clear(); System.clearProperty(SUB_NACOS_DATAID); @@ -91,7 +91,7 @@ public void getConfig() { Assertions.assertEquals(0, configIntValue); configIntValue = configuration.getInt(SUB_NACOS_DATAID, 100); Assertions.assertEquals(100, configIntValue); - configIntValue = configuration.getInt(SUB_NACOS_DATAID, 100, 1000); + configIntValue = configuration.getInt(SUB_NACOS_DATAID, 100, 5000); Assertions.assertEquals(100, configIntValue); ConfigurationCache.clear(); @@ -99,7 +99,7 @@ public void getConfig() { Assertions.assertEquals(false, configBoolValue); configBoolValue = configuration.getBoolean(SUB_NACOS_DATAID, true); Assertions.assertEquals(true, configBoolValue); - configBoolValue = configuration.getBoolean(SUB_NACOS_DATAID, true, 1000); + configBoolValue = configuration.getBoolean(SUB_NACOS_DATAID, true, 5000); Assertions.assertEquals(true, configBoolValue); ConfigurationCache.clear(); @@ -107,7 +107,7 @@ public void getConfig() { Assertions.assertEquals(0, configShortValue); configShortValue = configuration.getShort(SUB_NACOS_DATAID, (short)64); Assertions.assertEquals(64, configShortValue); - configShortValue = configuration.getShort(SUB_NACOS_DATAID, (short)127, 1000); + configShortValue = configuration.getShort(SUB_NACOS_DATAID, (short)127, 5000); Assertions.assertEquals(127, configShortValue); ConfigurationCache.clear(); @@ -115,21 +115,21 @@ public void getConfig() { Assertions.assertEquals(0L, configLongValue); configLongValue = configuration.getLong(SUB_NACOS_DATAID, 12345678L); Assertions.assertEquals(12345678L, configLongValue); - configLongValue = configuration.getLong(SUB_NACOS_DATAID, 65535L, 1000); + configLongValue = configuration.getLong(SUB_NACOS_DATAID, 65535L, 5000); Assertions.assertEquals(65535L, configLongValue); ConfigurationCache.clear(); Duration configDurValue = configuration.getDuration(SUB_NACOS_DATAID); Assertions.assertEquals(Duration.ZERO, configDurValue); - Duration defaultDuration = Duration.ofMillis(1000); + Duration defaultDuration = Duration.ofMillis(5000); configDurValue = configuration.getDuration(SUB_NACOS_DATAID, defaultDuration); Assertions.assertEquals(defaultDuration, configDurValue); defaultDuration = Duration.ofMillis(1000); - configDurValue = configuration.getDuration(SUB_NACOS_DATAID, defaultDuration, 1000); + configDurValue = configuration.getDuration(SUB_NACOS_DATAID, defaultDuration, 5000); Assertions.assertEquals(defaultDuration, configDurValue); ConfigurationCache.clear(); - configStrValue = configuration.getLatestConfig(SUB_NACOS_DATAID, "DEFAULT", 1000); + configStrValue = configuration.getLatestConfig(SUB_NACOS_DATAID, "DEFAULT", 5000); Assertions.assertEquals("DEFAULT", configStrValue); } @@ -145,7 +145,7 @@ public void putConfigIfAbsent() { @Test public void removeConfig() { Configuration configuration = ConfigurationFactory.getInstance(); - boolean removed = configuration.removeConfig(NACOS_DATAID); + boolean removed = configuration.removeConfig(SUB_NACOS_DATAID); Assertions.assertTrue(removed); } @@ -175,7 +175,7 @@ public void onChangeEvent(ConfigurationChangeEvent event) { configuration.addConfigListener(SUB_NACOS_DATAID, listener); Thread.sleep(1000); configuration.putConfig(NACOS_DATAID, "KEY=VALUE"); - latch.await(1000, TimeUnit.MILLISECONDS); + latch.await(3000, TimeUnit.MILLISECONDS); Set listeners = configuration.getConfigListeners(SUB_NACOS_DATAID); //configcache listener + user listener Assertions.assertEquals(2, listeners.size()); From 1e415283143face69e59d5f24bfb89798280d4e9 Mon Sep 17 00:00:00 2001 From: yiqi <1455432762@qq.com> Date: Sat, 31 Aug 2024 18:23:13 +0800 Subject: [PATCH 31/42] cr --- .../seata/config/nacos/NacosMockTest.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/config/seata-config-nacos/src/test/java/org/apache/seata/config/nacos/NacosMockTest.java b/config/seata-config-nacos/src/test/java/org/apache/seata/config/nacos/NacosMockTest.java index 7a30740a89c..dbf2995e9f7 100644 --- a/config/seata-config-nacos/src/test/java/org/apache/seata/config/nacos/NacosMockTest.java +++ b/config/seata-config-nacos/src/test/java/org/apache/seata/config/nacos/NacosMockTest.java @@ -75,13 +75,13 @@ public void getConfig() { Configuration configuration = ConfigurationFactory.getInstance(); String configStrValue = configuration.getConfig(SUB_NACOS_DATAID); Assertions.assertNull(configStrValue); - configStrValue = configuration.getConfig(SUB_NACOS_DATAID, 5000); + configStrValue = configuration.getConfig(SUB_NACOS_DATAID, 1000); Assertions.assertNull(configStrValue); - configStrValue = configuration.getConfig(SUB_NACOS_DATAID, "TEST", 5000); + configStrValue = configuration.getConfig(SUB_NACOS_DATAID, "TEST", 1000); Assertions.assertEquals("TEST", configStrValue); ConfigurationCache.clear(); System.setProperty(SUB_NACOS_DATAID, "SYS-TEST"); - configStrValue = configuration.getConfig(SUB_NACOS_DATAID, "TEST", 5000); + configStrValue = configuration.getConfig(SUB_NACOS_DATAID, "TEST", 1000); Assertions.assertEquals("SYS-TEST", configStrValue); ConfigurationCache.clear(); System.clearProperty(SUB_NACOS_DATAID); @@ -91,7 +91,7 @@ public void getConfig() { Assertions.assertEquals(0, configIntValue); configIntValue = configuration.getInt(SUB_NACOS_DATAID, 100); Assertions.assertEquals(100, configIntValue); - configIntValue = configuration.getInt(SUB_NACOS_DATAID, 100, 5000); + configIntValue = configuration.getInt(SUB_NACOS_DATAID, 100, 1000); Assertions.assertEquals(100, configIntValue); ConfigurationCache.clear(); @@ -99,7 +99,7 @@ public void getConfig() { Assertions.assertEquals(false, configBoolValue); configBoolValue = configuration.getBoolean(SUB_NACOS_DATAID, true); Assertions.assertEquals(true, configBoolValue); - configBoolValue = configuration.getBoolean(SUB_NACOS_DATAID, true, 5000); + configBoolValue = configuration.getBoolean(SUB_NACOS_DATAID, true, 1000); Assertions.assertEquals(true, configBoolValue); ConfigurationCache.clear(); @@ -107,7 +107,7 @@ public void getConfig() { Assertions.assertEquals(0, configShortValue); configShortValue = configuration.getShort(SUB_NACOS_DATAID, (short)64); Assertions.assertEquals(64, configShortValue); - configShortValue = configuration.getShort(SUB_NACOS_DATAID, (short)127, 5000); + configShortValue = configuration.getShort(SUB_NACOS_DATAID, (short)127, 1000); Assertions.assertEquals(127, configShortValue); ConfigurationCache.clear(); @@ -115,21 +115,21 @@ public void getConfig() { Assertions.assertEquals(0L, configLongValue); configLongValue = configuration.getLong(SUB_NACOS_DATAID, 12345678L); Assertions.assertEquals(12345678L, configLongValue); - configLongValue = configuration.getLong(SUB_NACOS_DATAID, 65535L, 5000); + configLongValue = configuration.getLong(SUB_NACOS_DATAID, 65535L, 1000); Assertions.assertEquals(65535L, configLongValue); ConfigurationCache.clear(); Duration configDurValue = configuration.getDuration(SUB_NACOS_DATAID); Assertions.assertEquals(Duration.ZERO, configDurValue); - Duration defaultDuration = Duration.ofMillis(5000); + Duration defaultDuration = Duration.ofMillis(1000); configDurValue = configuration.getDuration(SUB_NACOS_DATAID, defaultDuration); Assertions.assertEquals(defaultDuration, configDurValue); defaultDuration = Duration.ofMillis(1000); - configDurValue = configuration.getDuration(SUB_NACOS_DATAID, defaultDuration, 5000); + configDurValue = configuration.getDuration(SUB_NACOS_DATAID, defaultDuration, 1000); Assertions.assertEquals(defaultDuration, configDurValue); ConfigurationCache.clear(); - configStrValue = configuration.getLatestConfig(SUB_NACOS_DATAID, "DEFAULT", 5000); + configStrValue = configuration.getLatestConfig(SUB_NACOS_DATAID, "DEFAULT", 1000); Assertions.assertEquals("DEFAULT", configStrValue); } @@ -145,7 +145,7 @@ public void putConfigIfAbsent() { @Test public void removeConfig() { Configuration configuration = ConfigurationFactory.getInstance(); - boolean removed = configuration.removeConfig(SUB_NACOS_DATAID); + boolean removed = configuration.removeConfig(NACOS_DATAID); Assertions.assertTrue(removed); } @@ -175,7 +175,7 @@ public void onChangeEvent(ConfigurationChangeEvent event) { configuration.addConfigListener(SUB_NACOS_DATAID, listener); Thread.sleep(1000); configuration.putConfig(NACOS_DATAID, "KEY=VALUE"); - latch.await(3000, TimeUnit.MILLISECONDS); + latch.await(1000, TimeUnit.MILLISECONDS); Set listeners = configuration.getConfigListeners(SUB_NACOS_DATAID); //configcache listener + user listener Assertions.assertEquals(2, listeners.size()); From 3979c9f03d5df43fb47b8808bcbd15bcfe3236ad Mon Sep 17 00:00:00 2001 From: jianbin Date: Sun, 22 Sep 2024 22:05:40 +0800 Subject: [PATCH 32/42] optimize: update grpc and protocol version --- core/pom.xml | 2 +- .../seata/core/rpc/netty/grpc/GrpcDecoder.java | 16 +++++++++++++++- test/pom.xml | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 323a909aafa..b6f4a33a677 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -100,7 +100,7 @@ ${project.basedir}/src/main/proto/ - com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.25.4:exe:${os.detected.classifier} diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index 9c45c27e18d..0930428a15e 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -65,7 +65,7 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc GrpcMessageProto grpcMessageProto = GrpcMessageProto.parseFrom(data); Any body = grpcMessageProto.getBody(); - int messageType = grpcMessageProto.getMessageType(); + int messageType = safeCastToInt(grpcMessageProto.getMessageType()); int messageId = grpcMessageProto.getId(); byte[] byteArray = body.toByteArray(); @@ -87,4 +87,18 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headersFrame) throws Exception { // TODO Subsequent decompression logic is possible } + + private int safeCastToInt(Object userInput) { + if (userInput instanceof Number) { + long value = ((Number)userInput).longValue(); + if (value >= Integer.MIN_VALUE && value <= Integer.MAX_VALUE) { + return (int)value; + } else { + throw new IllegalArgumentException("Value exceeds int range"); + } + } else { + throw new IllegalArgumentException("Input is not a number"); + } + } + } diff --git a/test/pom.xml b/test/pom.xml index a33eaa21112..34d156e015d 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -46,11 +46,11 @@ ${project.basedir}/src/test/resources/protobuf/org/apache/seata/protocol/transcation/ - com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier} + com.google.protobuf:protoc:3.25.4:exe:${os.detected.classifier} grpc-java - io.grpc:protoc-gen-grpc-java:1.29.0:exe:${os.detected.classifier} + io.grpc:protoc-gen-grpc-java:1.66.0:exe:${os.detected.classifier} From bc88621c5dc71351e55d29b1d8c23fe422786d52 Mon Sep 17 00:00:00 2001 From: jianbin Date: Sun, 22 Sep 2024 22:10:57 +0800 Subject: [PATCH 33/42] Before casting, check if the value is within the range of the target type. --- .../seata/core/rpc/netty/grpc/GrpcDecoder.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index 0930428a15e..2294c030521 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -66,7 +66,7 @@ public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exc GrpcMessageProto grpcMessageProto = GrpcMessageProto.parseFrom(data); Any body = grpcMessageProto.getBody(); int messageType = safeCastToInt(grpcMessageProto.getMessageType()); - int messageId = grpcMessageProto.getId(); + int messageId = safeCastToInt(grpcMessageProto.getId()); byte[] byteArray = body.toByteArray(); Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode()), (byte) 0); @@ -88,16 +88,11 @@ public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headersFr // TODO Subsequent decompression logic is possible } - private int safeCastToInt(Object userInput) { - if (userInput instanceof Number) { - long value = ((Number)userInput).longValue(); - if (value >= Integer.MIN_VALUE && value <= Integer.MAX_VALUE) { - return (int)value; - } else { - throw new IllegalArgumentException("Value exceeds int range"); - } + private int safeCastToInt(long value) { + if (value >= Integer.MIN_VALUE && value <= Integer.MAX_VALUE) { + return (int)value; } else { - throw new IllegalArgumentException("Input is not a number"); + throw new IllegalArgumentException("数值超出 int 范围"); } } From bf7604aab252bd468b705c0e2bc2a3a6af9514a4 Mon Sep 17 00:00:00 2001 From: jianbin Date: Sun, 22 Sep 2024 22:16:30 +0800 Subject: [PATCH 34/42] Before casting, check if the value is within the range of the target type. --- .../java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index 2294c030521..64173f69329 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -92,7 +92,7 @@ private int safeCastToInt(long value) { if (value >= Integer.MIN_VALUE && value <= Integer.MAX_VALUE) { return (int)value; } else { - throw new IllegalArgumentException("数值超出 int 范围"); + throw new IllegalArgumentException("Value exceeds int range: " + value); } } From 279776851c341fc6288fe2c7d124576d03a017db Mon Sep 17 00:00:00 2001 From: jianbin Date: Sun, 22 Sep 2024 23:26:52 +0800 Subject: [PATCH 35/42] Remove duplicate code --- core/pom.xml | 2 +- .../protocol/transcation}/grpcMessage.proto | 2 +- .../core/rpc/netty/mockserver/GrpcTest.java | 2 + .../abstractBranchEndRequest.proto | 51 ------- .../abstractBranchEndResponse.proto | 35 ----- .../abstractGlobalEndRequest.proto | 33 ---- .../abstractGlobalEndResponse.proto | 32 ---- .../transcation/abstractIdentifyRequest.proto | 40 ----- .../abstractIdentifyResponse.proto | 35 ----- .../transcation/abstractMessage.proto | 30 ---- .../transcation/abstractResultMessage.proto | 32 ---- .../abstractTransactionRequest.proto | 31 ---- .../abstractTransactionResponse.proto | 33 ---- .../transcation/batchResultMessage.proto | 33 ---- .../transcation/branchCommitRequest.proto | 31 ---- .../transcation/branchCommitResponse.proto | 31 ---- .../transcation/branchRegisterRequest.proto | 37 ----- .../transcation/branchRegisterResponse.proto | 32 ---- .../transcation/branchReportRequest.proto | 44 ------ .../transcation/branchReportResponse.proto | 30 ---- .../transcation/branchRollbackRequest.proto | 31 ---- .../transcation/branchRollbackResponse.proto | 31 ---- .../protocol/transcation/branchStatus.proto | 99 ------------ .../protocol/transcation/branchType.proto | 33 ---- .../transcation/globalBeginRequest.proto | 32 ---- .../transcation/globalBeginResponse.proto | 32 ---- .../transcation/globalCommitRequest.proto | 29 ---- .../transcation/globalCommitResponse.proto | 29 ---- .../transcation/globalLockQueryRequest.proto | 29 ---- .../transcation/globalLockQueryResponse.proto | 30 ---- .../transcation/globalReportRequest.proto | 31 ---- .../transcation/globalReportResponse.proto | 29 ---- .../transcation/globalRollbackRequest.proto | 29 ---- .../transcation/globalRollbackResponse.proto | 29 ---- .../protocol/transcation/globalStatus.proto | 124 --------------- .../transcation/globalStatusRequest.proto | 29 ---- .../transcation/globalStatusResponse.proto | 29 ---- .../protocol/transcation/grpcMessage.proto | 2 +- .../transcation/heartbeatMessage.proto | 28 ---- .../transcation/mergedResultMessage.proto | 32 ---- .../transcation/mergedWarpMessage.proto | 33 ---- .../protocol/transcation/messageType.proto | 143 ------------------ .../transcation/registerRMRequest.proto | 32 ---- .../transcation/registerRMResponse.proto | 30 ---- .../transcation/registerTMRequest.proto | 30 ---- .../transcation/registerTMResponse.proto | 30 ---- .../protocol/transcation/resultCode.proto | 32 ---- .../transactionExceptionCode.proto | 133 ---------------- .../transcation/undoLogDeleteRequest.proto | 46 ------ 49 files changed, 5 insertions(+), 1837 deletions(-) rename core/src/main/{proto => resources/protobuf/org/apache/seata/protocol/transcation}/grpcMessage.proto (96%) delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto delete mode 100644 test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto diff --git a/core/pom.xml b/core/pom.xml index b6f4a33a677..26ce3dc9018 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -98,7 +98,7 @@ org.xolstice.maven.plugins protobuf-maven-plugin - ${project.basedir}/src/main/proto/ + ${project.basedir}/src/main/resources/protobuf/org/apache/seata/protocol/transcation/ com.google.protobuf:protoc:3.25.4:exe:${os.detected.classifier} diff --git a/core/src/main/proto/grpcMessage.proto b/core/src/main/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto similarity index 96% rename from core/src/main/proto/grpcMessage.proto rename to core/src/main/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto index f39135c8867..cdf1b52f4a8 100644 --- a/core/src/main/proto/grpcMessage.proto +++ b/core/src/main/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto @@ -15,7 +15,7 @@ * limitations under the License. */ syntax = "proto3"; -package org.apache.seata.core.protocol; +package org.apache.seata.protocol.protobuf; import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "GrpcMessage"; diff --git a/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java b/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java index e9c87592f90..581a0e15f2d 100644 --- a/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java +++ b/test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/GrpcTest.java @@ -23,10 +23,12 @@ import org.apache.seata.common.ConfigurationKeys; import org.apache.seata.common.ConfigurationTestHelper; import org.apache.seata.config.ConfigurationFactory; +import org.apache.seata.core.protocol.generated.GrpcMessageProto; import org.apache.seata.core.rpc.netty.RmNettyRemotingClient; import org.apache.seata.core.rpc.netty.TmNettyRemotingClient; import org.apache.seata.mockserver.MockServer; import org.apache.seata.serializer.protobuf.generated.*; +import org.apache.seata.core.protocol.generated.SeataServiceGrpc; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto deleted file mode 100644 index b691f74e55c..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndRequest.proto +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionRequest.proto"; -import "branchType.proto"; - -option java_multiple_files = true; -option java_outer_classname = "AbstractBranchEndRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractBranchEndRequestProto { - AbstractTransactionRequestProto abstractTransactionRequest = 1; - string xid = 2; - /** - * The Branch id. - */ - int64 branchId = 3; - - /** - * The Branch type. - */ - BranchTypeProto branchType = 4; - - /** - * The Resource id. - */ - string resourceId = 5; - - /** - * The Application data. - */ - string applicationData = 6; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto deleted file mode 100644 index 22b5f60b5b5..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractBranchEndResponse.proto +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionResponse.proto"; -import "branchStatus.proto"; - -option java_multiple_files = true; -option java_outer_classname = "AbstractBranchEndResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractBranchEndResponseProto { - - AbstractTransactionResponseProto abstractTransactionResponse =1; - string xid = 2; - int64 branchId = 3; - BranchStatusProto branchStatus = 4; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto deleted file mode 100644 index 0523db0070e..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndRequest.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionRequest.proto"; - -option java_multiple_files = true; -option java_outer_classname = "AbstractGlobalEndRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractGlobalEndRequestProto { - - AbstractTransactionRequestProto abstractTransactionRequest =1; - string xid = 2; - string extraData = 3; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto deleted file mode 100644 index 3d8107e8f35..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractGlobalEndResponse.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionResponse.proto"; -import "globalStatus.proto"; - -option java_multiple_files = true; -option java_outer_classname = "AbstractGlobalEndResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractGlobalEndResponseProto { - AbstractTransactionResponseProto abstractTransactionResponse = 1; - GlobalStatusProto globalStatus = 2; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto deleted file mode 100644 index bef0d19d8ed..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyRequest.proto +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractMessage.proto"; - -option java_multiple_files = true; -option java_outer_classname = "AbstractIdentifyRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractIdentifyRequestProto { - - AbstractMessageProto abstractMessage=1; - - string version = 2; - - string applicationId = 3; - - string transactionServiceGroup = 4; - - string extraData = 5; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto deleted file mode 100644 index c2b80c900de..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractIdentifyResponse.proto +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractResultMessage.proto"; - -option java_multiple_files = true; -option java_outer_classname = "AbstractIdentifyResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractIdentifyResponseProto { - - AbstractResultMessageProto abstractResultMessage=1; - string version = 2; - string extraData = 3; - bool identified = 4; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto deleted file mode 100644 index 8ec011daf3f..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractMessage.proto +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "messageType.proto"; - -option java_multiple_files = true; -option java_outer_classname = "AbstractMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractMessageProto { - MessageTypeProto messageType = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto deleted file mode 100644 index a04f9b56dda..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractResultMessage.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "resultCode.proto"; -import "abstractMessage.proto"; -option java_multiple_files = true; -option java_outer_classname = "AbstractResultMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractResultMessageProto { - AbstractMessageProto AbstractMessage=1; - ResultCodeProto resultCode = 2; - string msg = 3; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto deleted file mode 100644 index a964917a20b..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionRequest.proto +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractMessage.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "AbstractTransactionRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractTransactionRequestProto { - AbstractMessageProto abstractMessage=1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto deleted file mode 100644 index a31caaa00bf..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/abstractTransactionResponse.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractResultMessage.proto"; -import "transactionExceptionCode.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "AbstractTransactionResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message AbstractTransactionResponseProto { - AbstractResultMessageProto abstractResultMessage = 1; - TransactionExceptionCodeProto transactionExceptionCode = 2; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto deleted file mode 100644 index c36f75a7972..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/batchResultMessage.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractMessage.proto"; -import "google/protobuf/any.proto"; - -option java_multiple_files = true; -option java_outer_classname = "BatchResultMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message BatchResultMessageProto { - AbstractMessageProto abstractMessage=1; - repeated google.protobuf.Any resultMessages = 2; - repeated int32 msgIds=3; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto deleted file mode 100644 index 1a2adbe630d..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitRequest.proto +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractBranchEndRequest.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "BranchCommitRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message BranchCommitRequestProto { - AbstractBranchEndRequestProto abstractBranchEndRequest = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto deleted file mode 100644 index 96070ab6a91..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchCommitResponse.proto +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractBranchEndResponse.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "BranchCommitResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message BranchCommitResponseProto { - AbstractBranchEndResponseProto abstractBranchEndResponse = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto deleted file mode 100644 index d527d8b7843..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterRequest.proto +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "branchType.proto"; -import "abstractTransactionRequest.proto"; - -option java_multiple_files = true; -option java_outer_classname = "BranchRegisterRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message BranchRegisterRequestProto { - AbstractTransactionRequestProto abstractTransactionRequest =1; - string xid = 2; - BranchTypeProto branchType = 3; - string resourceId = 4; - string lockKey = 5; - string applicationData = 6; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto deleted file mode 100644 index 7ce95f34d1f..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRegisterResponse.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionResponse.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "BranchRegisterResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message BranchRegisterResponseProto { - AbstractTransactionResponseProto abstractTransactionResponse = 1; - int64 branchId = 2; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto deleted file mode 100644 index 788454048ef..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportRequest.proto +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "branchStatus.proto"; -import "branchType.proto"; -import "abstractTransactionRequest.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "BranchReportRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message BranchReportRequestProto { - - AbstractTransactionRequestProto abstractTransactionRequest =1; - string xid = 2; - - int64 branchId = 3; - - string resourceId = 4; - - BranchStatusProto status = 5; - - string applicationData = 6; - - BranchTypeProto branchType = 7; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto deleted file mode 100644 index 42a29e47615..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchReportResponse.proto +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionResponse.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "BranchReportResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message BranchReportResponseProto { - AbstractTransactionResponseProto abstractTransactionResponse = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto deleted file mode 100644 index ca42def06d3..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackRequest.proto +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractBranchEndRequest.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "BranchRollbackRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message BranchRollbackRequestProto { - AbstractBranchEndRequestProto abstractBranchEndRequest = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto deleted file mode 100644 index 5c31966dda4..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchRollbackResponse.proto +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractBranchEndResponse.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "BranchRollbackResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message BranchRollbackResponseProto { - AbstractBranchEndResponseProto abstractBranchEndResponse = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto deleted file mode 100644 index 425b38d47fc..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchStatus.proto +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -option java_multiple_files = true; -option java_outer_classname = "BranchStatus"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -enum BranchStatusProto { - - /** - * Unknown branch status. - */ - // special for Unknown - BUnknown = 0; - - /** - * The Registered. - */ - // Registered to TC. - Registered = 1; - - /** - * The Phase one done. - */ - // Branch logic is successfully done at phase one. - PhaseOne_Done = 2; - - /** - * The Phase one failed. - */ - // Branch logic is failed at phase one. - PhaseOne_Failed = 3; - - /** - * The Phase one timeout. - */ - // Branch logic is NOT reported for a timeout. - PhaseOne_Timeout = 4; - - /** - * The Phase two committed. - */ - // Commit logic is successfully done at phase two. - PhaseTwo_Committed = 5; - - /** - * The Phase two commit failed retryable. - */ - // Commit logic is failed but retryable. - PhaseTwo_CommitFailed_Retryable = 6; - - /** - * The Phase two commit failed unretryable. - */ - // Commit logic is failed and NOT retryable. - PhaseTwo_CommitFailed_Unretryable = 7; - - /** - * The Phase two rollbacked. - */ - // Rollback logic is successfully done at phase two. - PhaseTwo_Rollbacked = 8; - - /** - * The Phase two rollback failed retryable. - */ - // Rollback logic is failed but retryable. - PhaseTwo_RollbackFailed_Retryable = 9; - - /** - * The Phase two rollback failed unretryable. - */ - // Rollback logic is failed but NOT retryable. - PhaseTwo_RollbackFailed_Unretryable = 10; - /** - * The results of the Phase one are read-only. - */ - // In the branch transaction, only purely read-only query statements were executed. - PhaseOne_RDONLY = 13; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto deleted file mode 100644 index dbe0a436199..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/branchType.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -option java_multiple_files = true; -option java_outer_classname = "BranchType"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -enum BranchTypeProto { - - AT = 0; - - TCC = 1; - - SAGA = 2; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto deleted file mode 100644 index 828a1b3e24c..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginRequest.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionRequest.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "GlobalBeginRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalBeginRequestProto { - AbstractTransactionRequestProto abstractTransactionRequest=1; - int32 timeout = 2; - string transactionName = 3; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto deleted file mode 100644 index 5bdf87ecb83..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalBeginResponse.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionResponse.proto"; - - -option java_multiple_files = true; -option java_outer_classname = "GlobalBeginResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalBeginResponseProto { - AbstractTransactionResponseProto abstractTransactionResponse =1; - string xid = 2; - string extraData = 3; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto deleted file mode 100644 index 0c1958156d6..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitRequest.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractGlobalEndRequest.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalCommitRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalCommitRequestProto { - AbstractGlobalEndRequestProto abstractGlobalEndRequest =1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto deleted file mode 100644 index 650a2f3337d..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalCommitResponse.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractGlobalEndResponse.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalCommitResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalCommitResponseProto { - AbstractGlobalEndResponseProto abstractGlobalEndResponse =1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto deleted file mode 100644 index 469147eca0f..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryRequest.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "branchRegisterRequest.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalLockQueryRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalLockQueryRequestProto { - BranchRegisterRequestProto branchRegisterRequest =1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto deleted file mode 100644 index e9b5fb5409a..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalLockQueryResponse.proto +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionResponse.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalLockQueryResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalLockQueryResponseProto { - AbstractTransactionResponseProto abstractTransactionResponse = 1; - bool lockable = 2; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto deleted file mode 100644 index 64435f2049c..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportRequest.proto +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractGlobalEndRequest.proto"; -import "globalStatus.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalReportRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalReportRequestProto { - AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - GlobalStatusProto globalStatus = 2; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto deleted file mode 100644 index 3a5b5611aad..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalReportResponse.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractGlobalEndResponse.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalReportResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalReportResponseProto { - AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto deleted file mode 100644 index 2acdbdd99cf..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackRequest.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractGlobalEndRequest.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalRollbackRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalRollbackRequestProto { - AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto deleted file mode 100644 index 78bb4d2b567..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalRollbackResponse.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractGlobalEndResponse.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalRollbackResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalRollbackResponseProto { - AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto deleted file mode 100644 index 9de4108f5b6..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatus.proto +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -option java_multiple_files = true; -option java_outer_classname = "GlobalStatus"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -enum GlobalStatusProto { - - /** - * Un known global status. - */ - // Unknown - UnKnown = 0; - - /** - * The Begin. - */ - // PHASE 1: can accept new branch registering. - Begin = 1; - - /** - * PHASE 2: Running Status: may be changed any time. - */ - // Committing. - Committing = 2; - - /** - * The Commit retrying. - */ - // Retrying commit after a recoverable failure. - CommitRetrying = 3; - - /** - * Rollbacking global status. - */ - // Rollbacking - Rollbacking = 4; - - /** - * The Rollback retrying. - */ - // Retrying rollback after a recoverable failure. - RollbackRetrying = 5; - - /** - * The Timeout rollbacking. - */ - // Rollbacking since timeout - TimeoutRollbacking = 6; - - /** - * The Timeout rollback retrying. - */ - // Retrying rollback (since timeout) after a recoverable failure. - TimeoutRollbackRetrying = 7; - - /** - * All branches can be async committed. The committing is NOT done yet, but it can be seen as committed for TM/RM - * client. - */ - AsyncCommitting = 8; - - /** - * PHASE 2: Final Status: will NOT change any more. - */ - // Finally: global transaction is successfully committed. - Committed = 9; - - /** - * The Commit failed. - */ - // Finally: failed to commit - CommitFailed = 10; - - /** - * The Rollbacked. - */ - // Finally: global transaction is successfully rollbacked. - Rollbacked = 11; - - /** - * The Rollback failed. - */ - // Finally: failed to rollback - RollbackFailed = 12; - - /** - * The Timeout rollbacked. - */ - // Finally: global transaction is successfully rollbacked since timeout. - TimeoutRollbacked = 13; - - /** - * The Timeout rollback failed. - */ - // Finally: failed to rollback since timeout - TimeoutRollbackFailed = 14; - - /** - * The Finished. - */ - // Not managed in session MAP any more - Finished = 15; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto deleted file mode 100644 index f267e6efeee..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusRequest.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractGlobalEndRequest.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalStatusRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalStatusRequestProto { - AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto deleted file mode 100644 index cf6def540fd..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/globalStatusResponse.proto +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractGlobalEndResponse.proto"; - -option java_multiple_files = true; -option java_outer_classname = "GlobalStatusResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -message GlobalStatusResponseProto { - AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto index 15e92c0c8ed..cdf1b52f4a8 100644 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto +++ b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/grpcMessage.proto @@ -19,7 +19,7 @@ package org.apache.seata.protocol.protobuf; import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "GrpcMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; +option java_package = "org.apache.seata.core.protocol.generated"; message GrpcMessageProto { int32 id = 1; diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto deleted file mode 100644 index fec1e295213..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/heartbeatMessage.proto +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -option java_multiple_files = true; -option java_outer_classname = "HeartbeatMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message HeartbeatMessageProto { - bool ping = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto deleted file mode 100644 index 774fc69ce4a..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedResultMessage.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractMessage.proto"; -import "google/protobuf/any.proto"; - -option java_multiple_files = true; -option java_outer_classname = "MergedResultMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message MergedResultMessageProto { - AbstractMessageProto abstractMessage=1; - repeated google.protobuf.Any msgs = 2; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto deleted file mode 100644 index f84d5d31df8..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/mergedWarpMessage.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractMessage.proto"; -import "google/protobuf/any.proto"; - -option java_multiple_files = true; -option java_outer_classname = "MergedWarpMessage"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message MergedWarpMessageProto { - AbstractMessageProto abstractMessage=1; - repeated google.protobuf.Any msgs = 2; - repeated int32 msgIds=3; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto deleted file mode 100644 index 754ce1173c0..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/messageType.proto +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -option java_multiple_files = true; -option java_outer_classname = "MessageType"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -enum MessageTypeProto { - - TYPE_GLOBAL_PRESERVED = 0; - - TYPE_GLOBAL_BEGIN = 1; - - TYPE_GLOBAL_BEGIN_RESULT = 2; - /** - * The constant TYPE_GLOBAL_COMMIT. - */ - TYPE_GLOBAL_COMMIT = 7; - /** - * The constant TYPE_GLOBAL_COMMIT_RESULT. - */ - TYPE_GLOBAL_COMMIT_RESULT = 8; - /** - * The constant TYPE_GLOBAL_ROLLBACK. - */ - TYPE_GLOBAL_ROLLBACK = 9; - /** - * The constant TYPE_GLOBAL_ROLLBACK_RESULT. - */ - TYPE_GLOBAL_ROLLBACK_RESULT = 10; - /** - * The constant TYPE_GLOBAL_STATUS. - */ - TYPE_GLOBAL_STATUS = 15; - /** - * The constant TYPE_GLOBAL_STATUS_RESULT. - */ - TYPE_GLOBAL_STATUS_RESULT = 16; - /** - * The constant TYPE_GLOBAL_REPORT. - */ - TYPE_GLOBAL_REPORT = 17; - /** - * The constant TYPE_GLOBAL_REPORT_RESULT. - */ - TYPE_GLOBAL_REPORT_RESULT = 18; - /** - * The constant TYPE_GLOBAL_LOCK_QUERY. - */ - TYPE_GLOBAL_LOCK_QUERY = 21; - /** - * The constant TYPE_GLOBAL_LOCK_QUERY_RESULT. - */ - TYPE_GLOBAL_LOCK_QUERY_RESULT = 22; - - /** - * The constant TYPE_BRANCH_COMMIT. - */ - TYPE_BRANCH_COMMIT = 3; - /** - * The constant TYPE_BRANCH_COMMIT_RESULT. - */ - TYPE_BRANCH_COMMIT_RESULT = 4; - /** - * The constant TYPE_BRANCH_ROLLBACK. - */ - TYPE_BRANCH_ROLLBACK = 5; - /** - * The constant TYPE_BRANCH_ROLLBACK_RESULT. - */ - TYPE_BRANCH_ROLLBACK_RESULT = 6; - /** - * The constant TYPE_BRANCH_REGISTER. - */ - TYPE_BRANCH_REGISTER = 11; - /** - * The constant TYPE_BRANCH_REGISTER_RESULT. - */ - TYPE_BRANCH_REGISTER_RESULT = 12; - /** - * The constant TYPE_BRANCH_STATUS_REPORT. - */ - TYPE_BRANCH_STATUS_REPORT = 13; - /** - * The constant TYPE_BRANCH_STATUS_REPORT_RESULT. - */ - TYPE_BRANCH_STATUS_REPORT_RESULT = 14; - - /** - * The constant TYPE_SEATA_MERGE. - */ - TYPE_SEATA_MERGE = 59; - /** - * The constant TYPE_SEATA_MERGE_RESULT. - */ - TYPE_SEATA_MERGE_RESULT = 60; - - /** - * The constant TYPE_REG_CLT. - */ - TYPE_REG_CLT = 101; - /** - * The constant TYPE_REG_CLT_RESULT. - */ - TYPE_REG_CLT_RESULT = 102; - /** - * The constant TYPE_REG_RM. - */ - TYPE_REG_RM = 103; - /** - * The constant TYPE_REG_RM_RESULT. - */ - TYPE_REG_RM_RESULT = 104; - - /** - * The constant TYPE_UNDO_LOG_DELETE. - */ - TYPE_UNDO_LOG_DELETE = 111; - - /** - * the constant TYPE_BATCH_RESULT_MSG - */ - TYPE_BATCH_RESULT_MSG = 121; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto deleted file mode 100644 index d4a3db78667..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMRequest.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractIdentifyRequest.proto"; - -option java_multiple_files = true; -option java_outer_classname = "RegisterRMRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message RegisterRMRequestProto { - AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - string resourceIds = 2; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto deleted file mode 100644 index 378f0a1ed2b..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerRMResponse.proto +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractIdentifyResponse.proto"; - -option java_multiple_files = true; -option java_outer_classname = "RegisterRMResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message RegisterRMResponseProto { - AbstractIdentifyResponseProto abstractIdentifyResponse = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto deleted file mode 100644 index d18e1c41bce..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMRequest.proto +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractIdentifyRequest.proto"; - -option java_multiple_files = true; -option java_outer_classname = "RegisterTMRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message RegisterTMRequestProto { - AbstractIdentifyRequestProto abstractIdentifyRequest = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto deleted file mode 100644 index e8f354c20a0..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/registerTMResponse.proto +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractIdentifyResponse.proto"; - -option java_multiple_files = true; -option java_outer_classname = "RegisterTMResponse"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message RegisterTMResponseProto { - AbstractIdentifyResponseProto abstractIdentifyResponse = 1; -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto deleted file mode 100644 index 4bd9ff3bd11..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/resultCode.proto +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -option java_multiple_files = true; -option java_outer_classname = "ResultCode"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -enum ResultCodeProto { - - Failed = 0; - - Success = 1; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto deleted file mode 100644 index 6cb20b0905c..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/transactionExceptionCode.proto +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -option java_multiple_files = true; -option java_outer_classname = "TransactionExceptionCode"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -enum TransactionExceptionCodeProto { - - /** - * Unknown transaction exception code. - */ - // - Unknown = 0; - - /** - * Lock key conflict transaction exception code. - */ - // - LockKeyConflict = 1; - - /** - * Io transaction exception code. - */ - // - IO = 2; - - /** - * Branch rollback failed retriable transaction exception code. - */ - // - BranchRollbackFailed_Retriable = 3; - - /** - * Branch rollback failed unretriable transaction exception code. - */ - // - BranchRollbackFailed_Unretriable = 4; - - /** - * Branch register failed transaction exception code. - */ - // - BranchRegisterFailed = 5; - - /** - * Branch report failed transaction exception code. - */ - // - BranchReportFailed = 6; - - /** - * Lockable check failed transaction exception code. - */ - // - LockableCheckFailed = 7; - - /** - * Branch transaction not exist transaction exception code. - */ - // - BranchTransactionNotExist = 8; - - /** - * Global transaction not exist transaction exception code. - */ - // - GlobalTransactionNotExist = 9; - - /** - * Global transaction not active transaction exception code. - */ - // - GlobalTransactionNotActive = 10; - - /** - * Global transaction status invalid transaction exception code. - */ - // - GlobalTransactionStatusInvalid = 11; - - /** - * Failed to send branch commit request transaction exception code. - */ - // - FailedToSendBranchCommitRequest = 12; - - /** - * Failed to send branch rollback request transaction exception code. - */ - // - FailedToSendBranchRollbackRequest = 13; - - /** - * Failed to add branch transaction exception code. - */ - // - FailedToAddBranch = 14; - - /** - * Failed to lock global transaction exception code. - */ - FailedLockGlobalTranscation = 15; - - /** - * FailedWriteSession - */ - FailedWriteSession = 16; - - /** - * FailedStore - */ - FailedStore = 17; - -} \ No newline at end of file diff --git a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto b/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto deleted file mode 100644 index 86624613096..00000000000 --- a/test/src/test/resources/protobuf/org/apache/seata/protocol/transcation/undoLogDeleteRequest.proto +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -syntax = "proto3"; - -package org.apache.seata.protocol.protobuf; - -import "abstractTransactionRequest.proto"; -import "branchType.proto"; - -option java_multiple_files = true; -option java_outer_classname = "UndoLogDeleteRequest"; -option java_package = "org.apache.seata.serializer.protobuf.generated"; - -// PublishRequest is a publish request. -message UndoLogDeleteRequestProto { - AbstractTransactionRequestProto abstractTransactionRequest = 1; - - /** - * The Resource id. - */ - string resourceId = 2; - - /** - * The SaveDays data. - */ - int32 saveDays = 3; - - /** - * The Branch type. - */ - BranchTypeProto branchType = 4; -} \ No newline at end of file From 87a23546fd69af61a282fc56128d11b50d4a8dc3 Mon Sep 17 00:00:00 2001 From: jianbin Date: Sun, 22 Sep 2024 23:30:47 +0800 Subject: [PATCH 36/42] import grpc-core --- test/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/pom.xml b/test/pom.xml index 34d156e015d..8dc7b544ed5 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -71,6 +71,11 @@ seata-tm ${project.version} + + io.grpc + grpc-core + test + From f1f4e42f30568b1740c15d7000322cbca15c8c89 Mon Sep 17 00:00:00 2001 From: jianbin Date: Sun, 22 Sep 2024 23:49:11 +0800 Subject: [PATCH 37/42] import grpc-core --- .../org/apache/seata/common/ConfigurationKeys.java | 2 +- .../seata/core/rpc/netty/NettyClientConfig.java | 2 +- .../autoconfigure/properties/TransportProperties.java | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java b/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java index 1cefe298474..ff8436b6dc9 100644 --- a/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java +++ b/common/src/main/java/org/apache/seata/common/ConfigurationKeys.java @@ -628,7 +628,7 @@ public interface ConfigurationKeys { @Deprecated String ENABLE_CLIENT_BATCH_SEND_REQUEST = TRANSPORT_PREFIX + "enableClientBatchSendRequest"; - String PROTOCOL = TRANSPORT_PREFIX + "protocol"; + String TRANSPORT_PROTOCOL = TRANSPORT_PREFIX + "protocol"; /** * The constant ENABLE_TM_CLIENT_BATCH_SEND_REQUEST diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java index a68befb88e7..68583608262 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientConfig.java @@ -453,7 +453,7 @@ public String getRmDispatchThreadPrefix() { } public String getProtocol() { - return CONFIG.getConfig(org.apache.seata.common.ConfigurationKeys.PROTOCOL, DEFAULT_PROTOCOL); + return CONFIG.getConfig(org.apache.seata.common.ConfigurationKeys.TRANSPORT_PROTOCOL, DEFAULT_PROTOCOL); } @Deprecated diff --git a/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/TransportProperties.java b/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/TransportProperties.java index 8b4caa4e8f6..64f38a385d0 100644 --- a/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/TransportProperties.java +++ b/seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/TransportProperties.java @@ -23,6 +23,7 @@ import static org.apache.seata.common.DefaultValues.DEFAULT_ENABLE_RM_CLIENT_BATCH_SEND_REQUEST; import static org.apache.seata.common.DefaultValues.DEFAULT_ENABLE_TC_SERVER_BATCH_SEND_RESPONSE; import static org.apache.seata.common.DefaultValues.DEFAULT_ENABLE_TM_CLIENT_BATCH_SEND_REQUEST; +import static org.apache.seata.common.DefaultValues.DEFAULT_PROTOCOL; import static org.apache.seata.common.DefaultValues.DEFAULT_RPC_RM_REQUEST_TIMEOUT; import static org.apache.seata.common.DefaultValues.DEFAULT_RPC_TC_REQUEST_TIMEOUT; import static org.apache.seata.common.DefaultValues.DEFAULT_RPC_TM_REQUEST_TIMEOUT; @@ -54,6 +55,8 @@ public class TransportProperties { */ private String compressor = "none"; + private String protocol = DEFAULT_PROTOCOL; + /** * enable client batch send request */ @@ -193,4 +196,12 @@ public long getRpcTcRequestTimeout() { public void setRpcTcRequestTimeout(long rpcTcRequestTimeout) { this.rpcTcRequestTimeout = rpcTcRequestTimeout; } + + public String getProtocol() { + return protocol; + } + + public void setProtocol(String protocol) { + this.protocol = protocol; + } } From 0a5b999204a5f4147f03852a8a96081c324bc8e0 Mon Sep 17 00:00:00 2001 From: jianbin Date: Mon, 23 Sep 2024 00:07:44 +0800 Subject: [PATCH 38/42] bugfix --- test/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/test/pom.xml b/test/pom.xml index 8dc7b544ed5..de6aa272494 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -74,7 +74,6 @@ io.grpc grpc-core - test From 4af6b692656d6cce3623585c8bdaa59bb7242092 Mon Sep 17 00:00:00 2001 From: jianbin Date: Mon, 23 Sep 2024 00:15:03 +0800 Subject: [PATCH 39/42] bugfix --- dependencies/pom.xml | 5 +++++ test/pom.xml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 972b0798ad2..15178f14166 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -622,6 +622,11 @@ grpc-core ${grpc.version} + + io.grpc + grpc-alts + ${grpc.version} + io.grpc grpc-api diff --git a/test/pom.xml b/test/pom.xml index de6aa272494..d35f25bad5e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -73,7 +73,7 @@ io.grpc - grpc-core + grpc-alts From bc771902c1a317a7316fd8868e3e0dc40b5b120e Mon Sep 17 00:00:00 2001 From: jianbin Date: Mon, 23 Sep 2024 15:47:36 +0800 Subject: [PATCH 40/42] bugfix: context release --- .../core/rpc/netty/grpc/GrpcDecoder.java | 67 ++++++++++--------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java index 64173f69329..bcde5702eb3 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcDecoder.java @@ -22,6 +22,7 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http2.Http2DataFrame; import io.netty.handler.codec.http2.Http2HeadersFrame; +import io.netty.util.ReferenceCountUtil; import io.netty.util.ReferenceCounted; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.protocol.generated.GrpcMessageProto; @@ -38,51 +39,55 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception } else if (msg instanceof Http2DataFrame) { onDataRead(ctx, (Http2DataFrame) msg); } else if (msg instanceof ReferenceCounted) { - ctx.fireChannelRead(msg); + ReferenceCountUtil.release(msg); } } public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) throws Exception { ByteBuf content = msg.content(); - int readableBytes = content.readableBytes(); - byte[] bytes = new byte[readableBytes]; - content.readBytes(bytes); - if (bytes.length < 5) { - return; - } + try { + int readableBytes = content.readableBytes(); + byte[] bytes = new byte[readableBytes]; + content.readBytes(bytes); + if (bytes.length < 5) { + return; + } - int srcPos = 0; - while (srcPos < readableBytes) { - // The first byte defaults to 0, indicating that no decompression is required - // Read the value of the next four bytes as the length of the body - int length = ((bytes[srcPos + 1] & 0xFF) << 24) | - ((bytes[srcPos + 2] & 0xFF) << 16) | - ((bytes[srcPos + 3] & 0xFF) << 8) | - (bytes[srcPos + 4] & 0xFF); + int srcPos = 0; + while (srcPos < readableBytes) { + // The first byte defaults to 0, indicating that no decompression is required + // Read the value of the next four bytes as the length of the body + int length = ((bytes[srcPos + 1] & 0xFF) << 24) | ((bytes[srcPos + 2] & 0xFF) << 16) + | ((bytes[srcPos + 3] & 0xFF) << 8) | (bytes[srcPos + 4] & 0xFF); - byte[] data = new byte[length]; - System.arraycopy(bytes, srcPos + 5, data, 0, length); + byte[] data = new byte[length]; + System.arraycopy(bytes, srcPos + 5, data, 0, length); - GrpcMessageProto grpcMessageProto = GrpcMessageProto.parseFrom(data); - Any body = grpcMessageProto.getBody(); - int messageType = safeCastToInt(grpcMessageProto.getMessageType()); - int messageId = safeCastToInt(grpcMessageProto.getId()); - byte[] byteArray = body.toByteArray(); + GrpcMessageProto grpcMessageProto = GrpcMessageProto.parseFrom(data); + Any body = grpcMessageProto.getBody(); + int messageType = safeCastToInt(grpcMessageProto.getMessageType()); + int messageId = safeCastToInt(grpcMessageProto.getId()); + byte[] byteArray = body.toByteArray(); - Serializer serializer = SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode()), (byte) 0); - Object messageBody = serializer.deserialize(byteArray); + Serializer serializer = + SerializerServiceLoader.load(SerializerType.getByCode(SerializerType.GRPC.getCode()), (byte)0); + Object messageBody = serializer.deserialize(byteArray); - RpcMessage rpcMsg = new RpcMessage(); - rpcMsg.setMessageType((byte) messageType); - rpcMsg.setBody(messageBody); - rpcMsg.setId(messageId); - rpcMsg.setHeadMap(grpcMessageProto.getHeadMapMap()); + RpcMessage rpcMsg = new RpcMessage(); + rpcMsg.setMessageType((byte)messageType); + rpcMsg.setBody(messageBody); + rpcMsg.setId(messageId); + rpcMsg.setHeadMap(grpcMessageProto.getHeadMapMap()); - ctx.fireChannelRead(rpcMsg); + ctx.fireChannelRead(rpcMsg); - srcPos += length + 5; + srcPos += length + 5; + } + } finally { + ReferenceCountUtil.release(content); } } + public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headersFrame) throws Exception { // TODO Subsequent decompression logic is possible From 1c1a42db048389331194a911b0ce1b90ba5368e4 Mon Sep 17 00:00:00 2001 From: jianbin Date: Mon, 23 Sep 2024 15:57:42 +0800 Subject: [PATCH 41/42] bugfix: release byteBuf --- .../apache/seata/core/rpc/netty/grpc/GrpcEncoder.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java index 523f057dc67..a626b06da02 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -17,6 +17,7 @@ package org.apache.seata.core.rpc.netty.grpc; import com.google.protobuf.Any; +import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelOutboundHandlerAdapter; @@ -25,6 +26,7 @@ import io.netty.handler.codec.http2.DefaultHttp2Headers; import io.netty.handler.codec.http2.DefaultHttp2HeadersFrame; import io.netty.handler.codec.http2.Http2Headers; +import io.netty.util.ReferenceCountUtil; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.protocol.generated.GrpcMessageProto; import org.apache.seata.core.serializer.Serializer; @@ -79,7 +81,12 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) System.arraycopy(lengthBytes, 0, messageWithPrefix, 1, 4); // The remaining bytes are body System.arraycopy(bodyBytes, 0, messageWithPrefix, 5, bodyBytes.length); - ctx.writeAndFlush(new DefaultHttp2DataFrame(Unpooled.wrappedBuffer(messageWithPrefix))); + ByteBuf byteBuf = Unpooled.wrappedBuffer(messageWithPrefix); + try { + ctx.writeAndFlush(new DefaultHttp2DataFrame(byteBuf), promise); + } finally { + ReferenceCountUtil.release(byteBuf); + } } } From 844c1d85681f03e4cf3f3a78fec4a98e34d591cf Mon Sep 17 00:00:00 2001 From: jianbin Date: Mon, 23 Sep 2024 16:33:40 +0800 Subject: [PATCH 42/42] opt --- .../apache/seata/core/rpc/netty/grpc/GrpcEncoder.java | 9 +-------- .../core/serializer/SerializerServiceLoader.java | 11 +++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java index a626b06da02..523f057dc67 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/grpc/GrpcEncoder.java @@ -17,7 +17,6 @@ package org.apache.seata.core.rpc.netty.grpc; import com.google.protobuf.Any; -import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelOutboundHandlerAdapter; @@ -26,7 +25,6 @@ import io.netty.handler.codec.http2.DefaultHttp2Headers; import io.netty.handler.codec.http2.DefaultHttp2HeadersFrame; import io.netty.handler.codec.http2.Http2Headers; -import io.netty.util.ReferenceCountUtil; import org.apache.seata.core.protocol.RpcMessage; import org.apache.seata.core.protocol.generated.GrpcMessageProto; import org.apache.seata.core.serializer.Serializer; @@ -81,12 +79,7 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) System.arraycopy(lengthBytes, 0, messageWithPrefix, 1, 4); // The remaining bytes are body System.arraycopy(bodyBytes, 0, messageWithPrefix, 5, bodyBytes.length); - ByteBuf byteBuf = Unpooled.wrappedBuffer(messageWithPrefix); - try { - ctx.writeAndFlush(new DefaultHttp2DataFrame(byteBuf), promise); - } finally { - ReferenceCountUtil.release(byteBuf); - } + ctx.writeAndFlush(new DefaultHttp2DataFrame(Unpooled.wrappedBuffer(messageWithPrefix))); } } diff --git a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java index 8478ad609fb..0aa9bd340e8 100644 --- a/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java +++ b/core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java @@ -72,7 +72,6 @@ public static Serializer load(SerializerType type, byte version) throws Enhanced "Please manually reference 'org.apache.seata:seata-serializer-protobuf' dependency."); } - String key = serializerKey(type, version); Serializer serializer = SERIALIZER_MAP.get(key); if (serializer == null) { @@ -94,13 +93,9 @@ public static Serializer load(SerializerType type, byte version) throws Enhanced * @throws EnhancedServiceNotFoundException the enhanced service not found exception */ public static Serializer load(SerializerType type) throws EnhancedServiceNotFoundException { - if (type == SerializerType.PROTOBUF) { - try { - ReflectionUtil.getClassByName(PROTOBUF_SERIALIZER_CLASS_NAME); - } catch (ClassNotFoundException e) { - throw new EnhancedServiceNotFoundException("'ProtobufSerializer' not found. " + - "Please manually reference 'org.apache.seata:seata-serializer-protobuf' dependency ", e); - } + if (type == SerializerType.PROTOBUF && !CONTAINS_PROTOBUF_DEPENDENCY) { + throw new EnhancedServiceNotFoundException("The class '" + PROTOBUF_SERIALIZER_CLASS_NAME + "' not found. " + + "Please manually reference 'org.apache.seata:seata-serializer-protobuf' dependency."); } String key = type.name();