diff --git a/README.md b/README.md index 18ba1acf607..b1b2b1cf666 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ For more details about principle and design, please go to [Seata wiki page](http ## Maven dependency ```xml -0.8.0 +0.8.1 io.seata diff --git a/all/pom.xml b/all/pom.xml index 47469608cfd..71ac00e0eb0 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -21,7 +21,7 @@ io.seata seata-all - 0.8.0 + 0.8.1 Seata All-in-one ${project.version} http://seata.io @@ -217,6 +217,11 @@ seata-codec-protobuf ${project.version} + + io.seata + seata-codec-kryo + ${project.version} + @@ -400,6 +405,26 @@ protostuff-runtime provided + + mysql + mysql-connector-java + provided + + + com.fasterxml.jackson.core + jackson-databind + provided + + + com.esotericsoftware + kryo + provided + + + de.javakaffee + kryo-serializers + provided + @@ -502,6 +527,7 @@ io.seata:seata-tm io.seata:seata-codec-seata io.seata:seata-codec-protobuf + io.seata:seata-codec-kryo diff --git a/bom/pom.xml b/bom/pom.xml index ca2bbb4528d..8ea1be572cf 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -20,7 +20,7 @@ io.seata seata-bom - 0.8.0 + 0.8.1 4.0.0 pom @@ -69,7 +69,7 @@ 2.7.0 2.6.5 5.5.3 - 1.2.58 + 1.2.60 1.5.9 1.2.1 1.7.22 @@ -112,6 +112,8 @@ 1.8 UTF-8 3.7.1 + 4.0.2 + 0.42 @@ -367,16 +369,6 @@ caffeine ${caffeine.version} - - commons-dbcp - commons-dbcp - ${commons-dbcp.version} - - - com.h2database - h2 - ${h2.version} - mysql mysql-connector-java @@ -409,11 +401,32 @@ jackson-databind ${jackson.version} + com.beust jcommander ${jcommander.version} + + com.esotericsoftware + kryo + ${kryo.version} + + + de.javakaffee + kryo-serializers + ${kryo-serializers.version} + + + commons-dbcp + commons-dbcp + ${commons-dbcp.version} + + + com.h2database + h2 + ${h2.version} + @@ -485,4 +498,4 @@ - \ No newline at end of file + diff --git a/codec/pom.xml b/codec/pom.xml index faa835bc4c9..cd86624b646 100644 --- a/codec/pom.xml +++ b/codec/pom.xml @@ -31,6 +31,7 @@ seata-codec-all seata-codec-protobuf seata-codec-seata + seata-codec-kryo diff --git a/codec/seata-codec-all/pom.xml b/codec/seata-codec-all/pom.xml index f566782c68a..df26924c959 100644 --- a/codec/seata-codec-all/pom.xml +++ b/codec/seata-codec-all/pom.xml @@ -36,5 +36,10 @@ seata-codec-protobuf ${project.version} + + ${project.groupId} + seata-codec-kryo + ${project.version} + diff --git a/codec/seata-codec-kryo/pom.xml b/codec/seata-codec-kryo/pom.xml new file mode 100644 index 00000000000..9f60ad7cf4c --- /dev/null +++ b/codec/seata-codec-kryo/pom.xml @@ -0,0 +1,34 @@ + + + + io.seata + seata-codec + ${revision} + + 4.0.0 + seata-codec-kryo + jar + seata-codec-kryo ${project.version} + + + ${project.groupId} + seata-common + ${revision} + + + ${project.groupId} + seata-core + ${project.version} + + + com.esotericsoftware + kryo + + + de.javakaffee + kryo-serializers + + + \ No newline at end of file diff --git a/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoCodec.java b/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoCodec.java new file mode 100644 index 00000000000..f355567606e --- /dev/null +++ b/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoCodec.java @@ -0,0 +1,55 @@ +/* + * 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 + * + * 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 io.seata.codec.kryo; + +import io.seata.common.loader.LoadLevel; +import io.seata.core.codec.Codec; +import io.seata.core.protocol.AbstractMessage; + +/** + * @author jsbxyyx + */ +@LoadLevel(name = "KRYO") +public class KryoCodec implements Codec { + + @Override + public byte[] encode(T t) { + if (t == null || !(t instanceof AbstractMessage)) { + throw new IllegalArgumentException("message is null"); + } + KryoSerializer kryoSerializer = KryoSerializerFactory.getInstance().get(); + try { + return kryoSerializer.serialize(t); + } finally { + KryoSerializerFactory.getInstance().returnKryo(kryoSerializer); + } + } + + @Override + public T decode(byte[] bytes) { + if (bytes == null || bytes.length == 0) { + throw new IllegalArgumentException("bytes is null"); + } + KryoSerializer kryoSerializer = KryoSerializerFactory.getInstance().get(); + try { + return kryoSerializer.deserialize(bytes); + } finally { + KryoSerializerFactory.getInstance().returnKryo(kryoSerializer); + } + + } + +} diff --git a/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoSerializer.java b/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoSerializer.java new file mode 100644 index 00000000000..b605154a180 --- /dev/null +++ b/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoSerializer.java @@ -0,0 +1,56 @@ +/* + * 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 + * + * 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 io.seata.codec.kryo; + +import com.esotericsoftware.kryo.Kryo; +import com.esotericsoftware.kryo.io.Input; +import com.esotericsoftware.kryo.io.Output; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.util.Objects; + +/** + * @author jsbxyyx + */ +public class KryoSerializer { + + private final Kryo kryo; + + public KryoSerializer(Kryo kryo) { + this.kryo = Objects.requireNonNull(kryo); + } + + public Kryo getKryo() { + return kryo; + } + + public byte[] serialize(T t) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + Output output = new Output(baos); + kryo.writeClassAndObject(output, t); + output.close(); + return baos.toByteArray(); + } + + public T deserialize(byte[] bytes) { + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); + Input input = new Input(bais); + input.close(); + return (T) kryo.readClassAndObject(input); + } + +} diff --git a/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoSerializerFactory.java b/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoSerializerFactory.java new file mode 100644 index 00000000000..54ebe517313 --- /dev/null +++ b/codec/seata-codec-kryo/src/main/java/io/seata/codec/kryo/KryoSerializerFactory.java @@ -0,0 +1,174 @@ +/* + * 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 + * + * 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 io.seata.codec.kryo; + +import com.esotericsoftware.kryo.Kryo; +import com.esotericsoftware.kryo.pool.KryoFactory; +import com.esotericsoftware.kryo.pool.KryoPool; +import com.esotericsoftware.kryo.serializers.DefaultSerializers; +import de.javakaffee.kryoserializers.ArraysAsListSerializer; +import de.javakaffee.kryoserializers.BitSetSerializer; +import de.javakaffee.kryoserializers.GregorianCalendarSerializer; +import de.javakaffee.kryoserializers.JdkProxySerializer; +import de.javakaffee.kryoserializers.RegexSerializer; +import de.javakaffee.kryoserializers.URISerializer; +import de.javakaffee.kryoserializers.UUIDSerializer; +import io.seata.core.protocol.MergeResultMessage; +import io.seata.core.protocol.MergedWarpMessage; +import io.seata.core.protocol.RegisterRMRequest; +import io.seata.core.protocol.RegisterRMResponse; +import io.seata.core.protocol.RegisterTMRequest; +import io.seata.core.protocol.RegisterTMResponse; +import io.seata.core.protocol.transaction.BranchCommitRequest; +import io.seata.core.protocol.transaction.BranchCommitResponse; +import io.seata.core.protocol.transaction.BranchRegisterRequest; +import io.seata.core.protocol.transaction.BranchRegisterResponse; +import io.seata.core.protocol.transaction.BranchReportRequest; +import io.seata.core.protocol.transaction.BranchReportResponse; +import io.seata.core.protocol.transaction.BranchRollbackRequest; +import io.seata.core.protocol.transaction.BranchRollbackResponse; +import io.seata.core.protocol.transaction.GlobalBeginRequest; +import io.seata.core.protocol.transaction.GlobalBeginResponse; +import io.seata.core.protocol.transaction.GlobalCommitRequest; +import io.seata.core.protocol.transaction.GlobalCommitResponse; +import io.seata.core.protocol.transaction.GlobalLockQueryRequest; +import io.seata.core.protocol.transaction.GlobalLockQueryResponse; +import io.seata.core.protocol.transaction.GlobalRollbackRequest; +import io.seata.core.protocol.transaction.GlobalRollbackResponse; +import io.seata.core.protocol.transaction.GlobalStatusRequest; +import io.seata.core.protocol.transaction.GlobalStatusResponse; +import io.seata.core.protocol.transaction.UndoLogDeleteRequest; + +import java.lang.reflect.InvocationHandler; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.LinkedList; +import java.util.TreeSet; +import java.util.UUID; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; +import java.util.regex.Pattern; + +/** + * @author jsbxyyx + */ +public class KryoSerializerFactory implements KryoFactory { + + private static final KryoSerializerFactory FACTORY = new KryoSerializerFactory(); + + private KryoPool pool = new KryoPool.Builder(this).softReferences().build(); + + private KryoSerializerFactory() {} + + public static KryoSerializerFactory getInstance() { + return FACTORY; + } + + public KryoSerializer get() { + return new KryoSerializer(pool.borrow()); + } + + public void returnKryo(KryoSerializer kryoSerializer) { + if (kryoSerializer == null) { + throw new IllegalArgumentException("kryoSerializer is null"); + } + pool.release(kryoSerializer.getKryo()); + } + + @Override + public Kryo create() { + Kryo kryo = new Kryo(); + kryo.setRegistrationRequired(false); + + // register serializer + kryo.register(Arrays.asList("").getClass(), new ArraysAsListSerializer()); + kryo.register(GregorianCalendar.class, new GregorianCalendarSerializer()); + kryo.register(InvocationHandler.class, new JdkProxySerializer()); + kryo.register(BigDecimal.class, new DefaultSerializers.BigDecimalSerializer()); + kryo.register(BigInteger.class, new DefaultSerializers.BigIntegerSerializer()); + kryo.register(Pattern.class, new RegexSerializer()); + kryo.register(BitSet.class, new BitSetSerializer()); + kryo.register(URI.class, new URISerializer()); + kryo.register(UUID.class, new UUIDSerializer()); + + // register commonly class + kryo.register(HashMap.class); + kryo.register(ArrayList.class); + kryo.register(LinkedList.class); + kryo.register(HashSet.class); + kryo.register(TreeSet.class); + kryo.register(Hashtable.class); + kryo.register(Date.class); + kryo.register(Calendar.class); + kryo.register(ConcurrentHashMap.class); + kryo.register(SimpleDateFormat.class); + kryo.register(GregorianCalendar.class); + kryo.register(Vector.class); + kryo.register(BitSet.class); + kryo.register(StringBuffer.class); + kryo.register(StringBuilder.class); + kryo.register(Object.class); + kryo.register(Object[].class); + kryo.register(String[].class); + kryo.register(byte[].class); + kryo.register(char[].class); + kryo.register(int[].class); + kryo.register(float[].class); + kryo.register(double[].class); + + // register seata protocol relation class + kryo.register(BranchCommitRequest.class); + kryo.register(BranchCommitResponse.class); + kryo.register(BranchRegisterRequest.class); + kryo.register(BranchRegisterResponse.class); + kryo.register(BranchReportRequest.class); + kryo.register(BranchReportResponse.class); + kryo.register(BranchRollbackRequest.class); + kryo.register(BranchRollbackResponse.class); + kryo.register(GlobalBeginRequest.class); + kryo.register(GlobalBeginResponse.class); + kryo.register(GlobalCommitRequest.class); + kryo.register(GlobalCommitResponse.class); + kryo.register(GlobalLockQueryRequest.class); + kryo.register(GlobalLockQueryResponse.class); + kryo.register(GlobalRollbackRequest.class); + kryo.register(GlobalRollbackResponse.class); + kryo.register(GlobalStatusRequest.class); + kryo.register(GlobalStatusResponse.class); + kryo.register(UndoLogDeleteRequest.class); + + kryo.register(MergedWarpMessage.class); + kryo.register(MergeResultMessage.class); + kryo.register(RegisterRMRequest.class); + kryo.register(RegisterRMResponse.class); + kryo.register(RegisterTMRequest.class); + kryo.register(RegisterTMResponse.class); + + return kryo; + } + +} diff --git a/codec/seata-codec-kryo/src/main/resources/META-INF/services/io.seata.core.codec.Codec b/codec/seata-codec-kryo/src/main/resources/META-INF/services/io.seata.core.codec.Codec new file mode 100644 index 00000000000..f039045d322 --- /dev/null +++ b/codec/seata-codec-kryo/src/main/resources/META-INF/services/io.seata.core.codec.Codec @@ -0,0 +1 @@ +io.seata.codec.kryo.KryoCodec \ No newline at end of file diff --git a/codec/seata-codec-kryo/src/test/java/io/seata/codec/kryo/KryoCodecTest.java b/codec/seata-codec-kryo/src/test/java/io/seata/codec/kryo/KryoCodecTest.java new file mode 100644 index 00000000000..cc1e9d81f06 --- /dev/null +++ b/codec/seata-codec-kryo/src/test/java/io/seata/codec/kryo/KryoCodecTest.java @@ -0,0 +1,85 @@ +/* + * 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 + * + * 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 io.seata.codec.kryo; + +import io.seata.core.exception.TransactionExceptionCode; +import io.seata.core.model.BranchStatus; +import io.seata.core.model.BranchType; +import io.seata.core.protocol.ResultCode; +import io.seata.core.protocol.transaction.BranchCommitRequest; +import io.seata.core.protocol.transaction.BranchCommitResponse; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @author jsbxyyx + */ +public class KryoCodecTest { + + private static KryoCodec kryoCodec; + + @BeforeAll + public static void before() { + kryoCodec = new KryoCodec(); + } + + @Test + public void testBranchCommitRequest() { + + BranchCommitRequest branchCommitRequest = new BranchCommitRequest(); + branchCommitRequest.setBranchType(BranchType.AT); + branchCommitRequest.setXid("xid"); + branchCommitRequest.setResourceId("resourceId"); + branchCommitRequest.setBranchId(20190809); + branchCommitRequest.setApplicationData("app"); + + byte[] bytes = kryoCodec.encode(branchCommitRequest); + BranchCommitRequest t = kryoCodec.decode(bytes); + + assertThat(t.getTypeCode()).isEqualTo(branchCommitRequest.getTypeCode()); + assertThat(t.getBranchType()).isEqualTo(branchCommitRequest.getBranchType()); + assertThat(t.getXid()).isEqualTo(branchCommitRequest.getXid()); + assertThat(t.getResourceId()).isEqualTo(branchCommitRequest.getResourceId()); + assertThat(t.getBranchId()).isEqualTo(branchCommitRequest.getBranchId()); + assertThat(t.getApplicationData()).isEqualTo(branchCommitRequest.getApplicationData()); + + } + + @Test + public void testBranchCommitResponse() { + + BranchCommitResponse branchCommitResponse = new BranchCommitResponse(); + branchCommitResponse.setTransactionExceptionCode(TransactionExceptionCode.BranchTransactionNotExist); + branchCommitResponse.setBranchId(20190809); + branchCommitResponse.setBranchStatus(BranchStatus.PhaseOne_Done); + branchCommitResponse.setMsg("20190809"); + branchCommitResponse.setXid("20190809"); + branchCommitResponse.setResultCode(ResultCode.Failed); + + byte[] bytes = kryoCodec.encode(branchCommitResponse); + BranchCommitResponse t = kryoCodec.decode(bytes); + + assertThat(t.getTransactionExceptionCode()).isEqualTo(branchCommitResponse.getTransactionExceptionCode()); + assertThat(t.getBranchId()).isEqualTo(branchCommitResponse.getBranchId()); + assertThat(t.getBranchStatus()).isEqualTo(branchCommitResponse.getBranchStatus()); + assertThat(t.getMsg()).isEqualTo(branchCommitResponse.getMsg()); + assertThat(t.getResultCode()).isEqualTo(branchCommitResponse.getResultCode()); + + } + +} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/ProtobufHelper.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/ProtobufHelper.java index 73035085435..de4e15dffff 100644 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/ProtobufHelper.java +++ b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/ProtobufHelper.java @@ -50,7 +50,7 @@ public class ProtobufHelper { public Class getPbClass(String clazzName) { Class reqClass = requestClassCache.get(clazzName); if (reqClass == null) { - // 读取接口里的方法参数和返回值 + // get the parameter and result Class clazz = null; try { clazz = Class.forName(clazzName); diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequest.java deleted file mode 100644 index 81aa3d3a16d..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequest.java +++ /dev/null @@ -1,69 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_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\036abstractBranchEndRequest.proto\022\032io.sea" + - "ta.protocol.protobuf\032 abstractTransactio" + - "nRequest.proto\032\020branchType.proto\"\215\002\n\035Abs" + - "tractBranchEndRequestProto\022_\n\032abstractTr" + - "ansactionRequest\030\001 \001(\0132;.io.seata.protoc" + - "ol.protobuf.AbstractTransactionRequestPr" + - "oto\022\013\n\003xid\030\002 \001(\t\022\020\n\010branchId\030\003 \001(\003\022?\n\nbr" + - "anchType\030\004 \001(\0162+.io.seata.protocol.proto" + - "buf.BranchTypeProto\022\022\n\nresourceId\030\005 \001(\t\022" + - "\027\n\017applicationData\030\006 \001(\tB?\n!io.seata.cod" + - "ec.protobuf.generatedB\030AbstractBranchEnd" + - "RequestP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(), - io.seata.codec.protobuf.generated.BranchType.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor, - new java.lang.String[] { "AbstractTransactionRequest", "Xid", "BranchId", "BranchType", "ResourceId", "ApplicationData", }); - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(); - io.seata.codec.protobuf.generated.BranchType.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequestProto.java deleted file mode 100644 index 4aa2255b424..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequestProto.java +++ /dev/null @@ -1,1251 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractBranchEndRequestProto} - */ -public final class AbstractBranchEndRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 24: { - - branchId_ = input.readInt64(); - break; - } - case 32: { - int rawValue = input.readEnum(); - - branchType_ = rawValue; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceId_ = s; - break; - } - case 50: { - java.lang.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 (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 io.seata.codec.protobuf.generated.AbstractBranchEndRequest.internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractBranchEndRequest.internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.class, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile java.lang.Object xid_; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.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; - */ - public long getBranchId() { - return branchId_; - } - - public static final int BRANCHTYPE_FIELD_NUMBER = 4; - private int branchType_; - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public int getBranchTypeValue() { - return branchType_; - } - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public io.seata.codec.protobuf.generated.BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchTypeProto result = io.seata.codec.protobuf.generated.BranchTypeProto.valueOf(branchType_); - return result == null ? io.seata.codec.protobuf.generated.BranchTypeProto.UNRECOGNIZED : result; - } - - public static final int RESOURCEID_FIELD_NUMBER = 5; - private volatile java.lang.Object resourceId_; - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 5; - */ - public java.lang.String getResourceId() { - java.lang.Object ref = resourceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } - } - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 5; - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - java.lang.Object ref = resourceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int APPLICATIONDATA_FIELD_NUMBER = 6; - private volatile java.lang.Object applicationData_; - /** - *
-   **
-   * The Application data.
-   * 
- * - * string applicationData = 6; - */ - public java.lang.String getApplicationData() { - java.lang.Object ref = applicationData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } - } - /** - *
-   **
-   * The Application data.
-   * 
- * - * string applicationData = 6; - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - java.lang.Object ref = applicationData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!getXidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (branchId_ != 0L) { - output.writeInt64(3, branchId_); - } - if (branchType_ != io.seata.codec.protobuf.generated.BranchTypeProto.AT.getNumber()) { - output.writeEnum(4, branchType_); - } - if (!getResourceIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, resourceId_); - } - if (!getApplicationDataBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getXidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (branchId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, branchId_); - } - if (branchType_ != io.seata.codec.protobuf.generated.BranchTypeProto.AT.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, branchType_); - } - if (!getResourceIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, resourceId_); - } - if (!getApplicationDataBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); - } - 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 io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractBranchEndRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractBranchEndRequestProto) - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractBranchEndRequest.internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractBranchEndRequest.internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.class, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.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(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - xid_ = ""; - - branchId_ = 0L; - - branchType_ = 0; - - resourceId_ = ""; - - applicationData_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractBranchEndRequest.internal_static_io_seata_protocol_protobuf_AbstractBranchEndRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto build() { - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto result = new io.seata.codec.protobuf.generated.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; - } - - @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 io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private java.lang.Object xid_ = ""; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - */ - public Builder setXid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - */ - 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; - */ - public long getBranchId() { - return branchId_; - } - /** - *
-     **
-     * The Branch id.
-     * 
- * - * int64 branchId = 3; - */ - public Builder setBranchId(long value) { - - branchId_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch id.
-     * 
- * - * int64 branchId = 3; - */ - public Builder clearBranchId() { - - branchId_ = 0L; - onChanged(); - return this; - } - - private int branchType_ = 0; - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public int getBranchTypeValue() { - return branchType_; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public Builder setBranchTypeValue(int value) { - branchType_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public io.seata.codec.protobuf.generated.BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchTypeProto result = io.seata.codec.protobuf.generated.BranchTypeProto.valueOf(branchType_); - return result == null ? io.seata.codec.protobuf.generated.BranchTypeProto.UNRECOGNIZED : result; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public Builder setBranchType(io.seata.codec.protobuf.generated.BranchTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public Builder clearBranchType() { - - branchType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object resourceId_ = ""; - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - */ - public java.lang.String getResourceId() { - java.lang.Object ref = resourceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - java.lang.Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - */ - public Builder setResourceId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceId_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - */ - public Builder clearResourceId() { - - resourceId_ = getDefaultInstance().getResourceId(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 5; - */ - public Builder setResourceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceId_ = value; - onChanged(); - return this; - } - - private java.lang.Object applicationData_ = ""; - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - */ - public java.lang.String getApplicationData() { - java.lang.Object ref = applicationData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - java.lang.Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - */ - public Builder setApplicationData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationData_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - */ - public Builder clearApplicationData() { - - applicationData_ = getDefaultInstance().getApplicationData(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Application data.
-     * 
- * - * string applicationData = 6; - */ - public Builder setApplicationDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - applicationData_ = value; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractBranchEndRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractBranchEndRequestProto) - private static final io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java deleted file mode 100644 index add774f2dc5..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndRequestProtoOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractBranchEndRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractBranchEndRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - boolean hasAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * string xid = 2; - */ - java.lang.String getXid(); - /** - * string xid = 2; - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - *
-   **
-   * The Branch id.
-   * 
- * - * int64 branchId = 3; - */ - long getBranchId(); - - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - int getBranchTypeValue(); - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - io.seata.codec.protobuf.generated.BranchTypeProto getBranchType(); - - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 5; - */ - java.lang.String getResourceId(); - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 5; - */ - com.google.protobuf.ByteString - getResourceIdBytes(); - - /** - *
-   **
-   * The Application data.
-   * 
- * - * string applicationData = 6; - */ - java.lang.String getApplicationData(); - /** - *
-   **
-   * The Application data.
-   * 
- * - * string applicationData = 6; - */ - com.google.protobuf.ByteString - getApplicationDataBytes(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponse.java deleted file mode 100644 index 6af4ef672d3..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponse.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_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\037abstractBranchEndResponse.proto\022\032io.se" + - "ata.protocol.protobuf\032!abstractTransacti" + - "onResponse.proto\032\022branchStatus.proto\"\347\001\n" + - "\036AbstractBranchEndResponseProto\022a\n\033abstr" + - "actTransactionResponse\030\001 \001(\0132<.io.seata." + - "protocol.protobuf.AbstractTransactionRes" + - "ponseProto\022\013\n\003xid\030\002 \001(\t\022\020\n\010branchId\030\003 \001(" + - "\003\022C\n\014branchStatus\030\004 \001(\0162-.io.seata.proto" + - "col.protobuf.BranchStatusProtoB@\n!io.sea" + - "ta.codec.protobuf.generatedB\031AbstractBra" + - "nchEndResponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(), - io.seata.codec.protobuf.generated.BranchStatus.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor, - new java.lang.String[] { "AbstractTransactionResponse", "Xid", "BranchId", "BranchStatus", }); - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(); - io.seata.codec.protobuf.generated.BranchStatus.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponseProto.java deleted file mode 100644 index b206980cac6..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponseProto.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractBranchEndResponseProto} - */ -public final class AbstractBranchEndResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionResponse_); - abstractTransactionResponse_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.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 (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 io.seata.codec.protobuf.generated.AbstractBranchEndResponse.internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractBranchEndResponse.internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.class, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile java.lang.Object xid_; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.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; - */ - public long getBranchId() { - return branchId_; - } - - public static final int BRANCHSTATUS_FIELD_NUMBER = 4; - private int branchStatus_; - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - public int getBranchStatusValue() { - return branchStatus_; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - public io.seata.codec.protobuf.generated.BranchStatusProto getBranchStatus() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchStatusProto result = io.seata.codec.protobuf.generated.BranchStatusProto.valueOf(branchStatus_); - return result == null ? io.seata.codec.protobuf.generated.BranchStatusProto.UNRECOGNIZED : result; - } - - 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 (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (!getXidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (branchId_ != 0L) { - output.writeInt64(3, branchId_); - } - if (branchStatus_ != io.seata.codec.protobuf.generated.BranchStatusProto.BUnknown.getNumber()) { - output.writeEnum(4, branchStatus_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getXidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (branchId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, branchId_); - } - if (branchStatus_ != io.seata.codec.protobuf.generated.BranchStatusProto.BUnknown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, branchStatus_); - } - 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 io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractBranchEndResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractBranchEndResponseProto) - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractBranchEndResponse.internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractBranchEndResponse.internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.class, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.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(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - xid_ = ""; - - branchId_ = 0L; - - branchStatus_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractBranchEndResponse.internal_static_io_seata_protocol_protobuf_AbstractBranchEndResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto build() { - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto result = new io.seata.codec.protobuf.generated.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; - } - - @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 io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private java.lang.Object xid_ = ""; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - */ - public Builder setXid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - */ - 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; - */ - public long getBranchId() { - return branchId_; - } - /** - * int64 branchId = 3; - */ - public Builder setBranchId(long value) { - - branchId_ = value; - onChanged(); - return this; - } - /** - * int64 branchId = 3; - */ - public Builder clearBranchId() { - - branchId_ = 0L; - onChanged(); - return this; - } - - private int branchStatus_ = 0; - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - public int getBranchStatusValue() { - return branchStatus_; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - public Builder setBranchStatusValue(int value) { - branchStatus_ = value; - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - public io.seata.codec.protobuf.generated.BranchStatusProto getBranchStatus() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchStatusProto result = io.seata.codec.protobuf.generated.BranchStatusProto.valueOf(branchStatus_); - return result == null ? io.seata.codec.protobuf.generated.BranchStatusProto.UNRECOGNIZED : result; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - public Builder setBranchStatus(io.seata.codec.protobuf.generated.BranchStatusProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - public Builder clearBranchStatus() { - - branchStatus_ = 0; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractBranchEndResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractBranchEndResponseProto) - private static final io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java deleted file mode 100644 index 7247aa323c7..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractBranchEndResponseProtoOrBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractBranchEndResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractBranchEndResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractBranchEndResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - boolean hasAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * string xid = 2; - */ - java.lang.String getXid(); - /** - * string xid = 2; - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * int64 branchId = 3; - */ - long getBranchId(); - - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - int getBranchStatusValue(); - /** - * .io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4; - */ - io.seata.codec.protobuf.generated.BranchStatusProto getBranchStatus(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequest.java deleted file mode 100644 index 7925b0ec6eb..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequest.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_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\036abstractGlobalEndRequest.proto\022\032io.sea" + - "ta.protocol.protobuf\032 abstractTransactio" + - "nRequest.proto\"\240\001\n\035AbstractGlobalEndRequ" + - "estProto\022_\n\032abstractTransactionRequest\030\001" + - " \001(\0132;.io.seata.protocol.protobuf.Abstra" + - "ctTransactionRequestProto\022\013\n\003xid\030\002 \001(\t\022\021" + - "\n\textraData\030\003 \001(\tB?\n!io.seata.codec.prot" + - "obuf.generatedB\030AbstractGlobalEndRequest" + - "P\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor, - new java.lang.String[] { "AbstractTransactionRequest", "Xid", "ExtraData", }); - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequestProto.java deleted file mode 100644 index c005bc52227..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequestProto.java +++ /dev/null @@ -1,856 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractGlobalEndRequestProto} - */ -public final class AbstractGlobalEndRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 26: { - java.lang.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 (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 io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.class, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile java.lang.Object xid_; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTRADATA_FIELD_NUMBER = 3; - private volatile java.lang.Object extraData_; - /** - * string extraData = 3; - */ - public java.lang.String getExtraData() { - java.lang.Object ref = extraData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } - } - /** - * string extraData = 3; - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - java.lang.Object ref = extraData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!getXidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (!getExtraDataBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getXidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (!getExtraDataBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extraData_); - } - 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 io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractGlobalEndRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.class, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.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(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - xid_ = ""; - - extraData_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto build() { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto result = new io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto(this); - if (abstractTransactionRequestBuilder_ == null) { - result.abstractTransactionRequest_ = abstractTransactionRequest_; - } else { - result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); - } - result.xid_ = xid_; - result.extraData_ = extraData_; - 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 io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private java.lang.Object xid_ = ""; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - */ - public Builder setXid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - */ - public Builder setXidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - xid_ = value; - onChanged(); - return this; - } - - private java.lang.Object extraData_ = ""; - /** - * string extraData = 3; - */ - public java.lang.String getExtraData() { - java.lang.Object ref = extraData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string extraData = 3; - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - java.lang.Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string extraData = 3; - */ - public Builder setExtraData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - extraData_ = value; - onChanged(); - return this; - } - /** - * string extraData = 3; - */ - public Builder clearExtraData() { - - extraData_ = getDefaultInstance().getExtraData(); - onChanged(); - return this; - } - /** - * string extraData = 3; - */ - public Builder setExtraDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - extraData_ = value; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - private static final io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java deleted file mode 100644 index 8bdd256de20..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndRequestProtoOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractGlobalEndRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractGlobalEndRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - boolean hasAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * string xid = 2; - */ - java.lang.String getXid(); - /** - * string xid = 2; - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * string extraData = 3; - */ - java.lang.String getExtraData(); - /** - * string extraData = 3; - */ - com.google.protobuf.ByteString - getExtraDataBytes(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponse.java deleted file mode 100644 index eb183b7a64b..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponse.java +++ /dev/null @@ -1,67 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_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\037abstractGlobalEndResponse.proto\022\032io.se" + - "ata.protocol.protobuf\032!abstractTransacti" + - "onResponse.proto\032\022globalStatus.proto\"\310\001\n" + - "\036AbstractGlobalEndResponseProto\022a\n\033abstr" + - "actTransactionResponse\030\001 \001(\0132<.io.seata." + - "protocol.protobuf.AbstractTransactionRes" + - "ponseProto\022C\n\014globalStatus\030\002 \001(\0162-.io.se" + - "ata.protocol.protobuf.GlobalStatusProtoB" + - "@\n!io.seata.codec.protobuf.generatedB\031Ab" + - "stractGlobalEndResponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(), - io.seata.codec.protobuf.generated.GlobalStatus.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor, - new java.lang.String[] { "AbstractTransactionResponse", "GlobalStatus", }); - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(); - io.seata.codec.protobuf.generated.GlobalStatus.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponseProto.java deleted file mode 100644 index 86a100786a5..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponseProto.java +++ /dev/null @@ -1,687 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractGlobalEndResponseProto} - */ -public final class AbstractGlobalEndResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.class, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int GLOBALSTATUS_FIELD_NUMBER = 2; - private int globalStatus_; - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - public int getGlobalStatusValue() { - return globalStatus_; - } - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - public io.seata.codec.protobuf.generated.GlobalStatusProto getGlobalStatus() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.GlobalStatusProto result = io.seata.codec.protobuf.generated.GlobalStatusProto.valueOf(globalStatus_); - return result == null ? io.seata.codec.protobuf.generated.GlobalStatusProto.UNRECOGNIZED : result; - } - - 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 (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (globalStatus_ != io.seata.codec.protobuf.generated.GlobalStatusProto.UnKnown.getNumber()) { - output.writeEnum(2, globalStatus_); - } - unknownFields.writeTo(output); - } - - @java.lang.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_ != io.seata.codec.protobuf.generated.GlobalStatusProto.UnKnown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, globalStatus_); - } - 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 io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractGlobalEndResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.class, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.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(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - globalStatus_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.internal_static_io_seata_protocol_protobuf_AbstractGlobalEndResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto build() { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto result = new io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.globalStatus_ = globalStatus_; - 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 io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto other) { - if (other == io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - if (other.globalStatus_ != 0) { - setGlobalStatusValue(other.getGlobalStatusValue()); - } - 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 { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private int globalStatus_ = 0; - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - public int getGlobalStatusValue() { - return globalStatus_; - } - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - public Builder setGlobalStatusValue(int value) { - globalStatus_ = value; - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - public io.seata.codec.protobuf.generated.GlobalStatusProto getGlobalStatus() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.GlobalStatusProto result = io.seata.codec.protobuf.generated.GlobalStatusProto.valueOf(globalStatus_); - return result == null ? io.seata.codec.protobuf.generated.GlobalStatusProto.UNRECOGNIZED : result; - } - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - public Builder setGlobalStatus(io.seata.codec.protobuf.generated.GlobalStatusProto value) { - if (value == null) { - throw new NullPointerException(); - } - - globalStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - public Builder clearGlobalStatus() { - - globalStatus_ = 0; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - private static final io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java deleted file mode 100644 index a4b9294a401..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractGlobalEndResponseProtoOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractGlobalEndResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractGlobalEndResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractGlobalEndResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - boolean hasAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - int getGlobalStatusValue(); - /** - * .io.seata.protocol.protobuf.GlobalStatusProto globalStatus = 2; - */ - io.seata.codec.protobuf.generated.GlobalStatusProto getGlobalStatus(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequest.java deleted file mode 100644 index 723c92d908a..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequest.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_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\035abstractIdentifyRequest.proto\022\032io.seat" + - "a.protocol.protobuf\032\025abstractMessage.pro" + - "to\"\305\001\n\034AbstractIdentifyRequestProto\022I\n\017a" + - "bstractMessage\030\001 \001(\01320.io.seata.protocol" + - ".protobuf.AbstractMessageProto\022\017\n\007versio" + - "n\030\002 \001(\t\022\025\n\rapplicationId\030\003 \001(\t\022\037\n\027transa" + - "ctionServiceGroup\030\004 \001(\t\022\021\n\textraData\030\005 \001" + - "(\tB>\n!io.seata.codec.protobuf.generatedB" + - "\027AbstractIdentifyRequestP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor, - new java.lang.String[] { "AbstractMessage", "Version", "ApplicationId", "TransactionServiceGroup", "ExtraData", }); - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequestProto.java deleted file mode 100644 index e48f96410a8..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequestProto.java +++ /dev/null @@ -1,1110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractIdentifyRequestProto} - */ -public final class AbstractIdentifyRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - applicationId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - transactionServiceGroup_ = s; - break; - } - case 42: { - java.lang.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 (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 io.seata.codec.protobuf.generated.AbstractIdentifyRequest.internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractIdentifyRequest.internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.class, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int VERSION_FIELD_NUMBER = 2; - private volatile java.lang.Object version_; - /** - * string version = 2; - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * string version = 2; - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int APPLICATIONID_FIELD_NUMBER = 3; - private volatile java.lang.Object applicationId_; - /** - * string applicationId = 3; - */ - public java.lang.String getApplicationId() { - java.lang.Object ref = applicationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - applicationId_ = s; - return s; - } - } - /** - * string applicationId = 3; - */ - public com.google.protobuf.ByteString - getApplicationIdBytes() { - java.lang.Object ref = applicationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TRANSACTIONSERVICEGROUP_FIELD_NUMBER = 4; - private volatile java.lang.Object transactionServiceGroup_; - /** - * string transactionServiceGroup = 4; - */ - public java.lang.String getTransactionServiceGroup() { - java.lang.Object ref = transactionServiceGroup_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transactionServiceGroup_ = s; - return s; - } - } - /** - * string transactionServiceGroup = 4; - */ - public com.google.protobuf.ByteString - getTransactionServiceGroupBytes() { - java.lang.Object ref = transactionServiceGroup_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionServiceGroup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTRADATA_FIELD_NUMBER = 5; - private volatile java.lang.Object extraData_; - /** - * string extraData = 5; - */ - public java.lang.String getExtraData() { - java.lang.Object ref = extraData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } - } - /** - * string extraData = 5; - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - java.lang.Object ref = extraData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - if (!getVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); - } - if (!getApplicationIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, applicationId_); - } - if (!getTransactionServiceGroupBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, transactionServiceGroup_); - } - if (!getExtraDataBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, extraData_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); - } - if (!getApplicationIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, applicationId_); - } - if (!getTransactionServiceGroupBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, transactionServiceGroup_); - } - if (!getExtraDataBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, extraData_); - } - 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 io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractIdentifyRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractIdentifyRequestProto) - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractIdentifyRequest.internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractIdentifyRequest.internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.class, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.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(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - version_ = ""; - - applicationId_ = ""; - - transactionServiceGroup_ = ""; - - extraData_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractIdentifyRequest.internal_static_io_seata_protocol_protobuf_AbstractIdentifyRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto build() { - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto result = new io.seata.codec.protobuf.generated.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; - } - - @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 io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - io.seata.codec.protobuf.generated.AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private java.lang.Object version_ = ""; - /** - * string version = 2; - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string version = 2; - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string version = 2; - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - * string version = 2; - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * string version = 2; - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.lang.Object applicationId_ = ""; - /** - * string applicationId = 3; - */ - public java.lang.String getApplicationId() { - java.lang.Object ref = applicationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - applicationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string applicationId = 3; - */ - public com.google.protobuf.ByteString - getApplicationIdBytes() { - java.lang.Object ref = applicationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string applicationId = 3; - */ - public Builder setApplicationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationId_ = value; - onChanged(); - return this; - } - /** - * string applicationId = 3; - */ - public Builder clearApplicationId() { - - applicationId_ = getDefaultInstance().getApplicationId(); - onChanged(); - return this; - } - /** - * string applicationId = 3; - */ - public Builder setApplicationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - applicationId_ = value; - onChanged(); - return this; - } - - private java.lang.Object transactionServiceGroup_ = ""; - /** - * string transactionServiceGroup = 4; - */ - public java.lang.String getTransactionServiceGroup() { - java.lang.Object ref = transactionServiceGroup_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transactionServiceGroup_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string transactionServiceGroup = 4; - */ - public com.google.protobuf.ByteString - getTransactionServiceGroupBytes() { - java.lang.Object ref = transactionServiceGroup_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionServiceGroup_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string transactionServiceGroup = 4; - */ - public Builder setTransactionServiceGroup( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - transactionServiceGroup_ = value; - onChanged(); - return this; - } - /** - * string transactionServiceGroup = 4; - */ - public Builder clearTransactionServiceGroup() { - - transactionServiceGroup_ = getDefaultInstance().getTransactionServiceGroup(); - onChanged(); - return this; - } - /** - * string transactionServiceGroup = 4; - */ - public Builder setTransactionServiceGroupBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transactionServiceGroup_ = value; - onChanged(); - return this; - } - - private java.lang.Object extraData_ = ""; - /** - * string extraData = 5; - */ - public java.lang.String getExtraData() { - java.lang.Object ref = extraData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string extraData = 5; - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - java.lang.Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string extraData = 5; - */ - public Builder setExtraData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - extraData_ = value; - onChanged(); - return this; - } - /** - * string extraData = 5; - */ - public Builder clearExtraData() { - - extraData_ = getDefaultInstance().getExtraData(); - onChanged(); - return this; - } - /** - * string extraData = 5; - */ - public Builder setExtraDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - extraData_ = value; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractIdentifyRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractIdentifyRequestProto) - private static final io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java deleted file mode 100644 index e589eb735cf..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyRequestProtoOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractIdentifyRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractIdentifyRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - boolean hasAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); - - /** - * string version = 2; - */ - java.lang.String getVersion(); - /** - * string version = 2; - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - * string applicationId = 3; - */ - java.lang.String getApplicationId(); - /** - * string applicationId = 3; - */ - com.google.protobuf.ByteString - getApplicationIdBytes(); - - /** - * string transactionServiceGroup = 4; - */ - java.lang.String getTransactionServiceGroup(); - /** - * string transactionServiceGroup = 4; - */ - com.google.protobuf.ByteString - getTransactionServiceGroupBytes(); - - /** - * string extraData = 5; - */ - java.lang.String getExtraData(); - /** - * string extraData = 5; - */ - com.google.protobuf.ByteString - getExtraDataBytes(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponse.java deleted file mode 100644 index c1a43ca7b43..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponse.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_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\036abstractIdentifyResponse.proto\022\032io.sea" + - "ta.protocol.protobuf\032\033abstractResultMess" + - "age.proto\"\256\001\n\035AbstractIdentifyResponsePr" + - "oto\022U\n\025abstractResultMessage\030\001 \001(\01326.io." + - "seata.protocol.protobuf.AbstractResultMe" + - "ssageProto\022\017\n\007version\030\002 \001(\t\022\021\n\textraData" + - "\030\003 \001(\t\022\022\n\nidentified\030\004 \001(\010B?\n!io.seata.c" + - "odec.protobuf.generatedB\030AbstractIdentif" + - "yResponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractResultMessage.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor, - new java.lang.String[] { "AbstractResultMessage", "Version", "ExtraData", "Identified", }); - io.seata.codec.protobuf.generated.AbstractResultMessage.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponseProto.java deleted file mode 100644 index 95f4c31fe79..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponseProto.java +++ /dev/null @@ -1,914 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractIdentifyResponseProto} - */ -public final class AbstractIdentifyResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder subBuilder = null; - if (abstractResultMessage_ != null) { - subBuilder = abstractResultMessage_.toBuilder(); - } - abstractResultMessage_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractResultMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractResultMessage_); - abstractResultMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 26: { - java.lang.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 (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 io.seata.codec.protobuf.generated.AbstractIdentifyResponse.internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractIdentifyResponse.internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.class, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder.class); - } - - public static final int ABSTRACTRESULTMESSAGE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractResultMessageProto abstractResultMessage_; - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public boolean hasAbstractResultMessage() { - return abstractResultMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProto getAbstractResultMessage() { - return abstractResultMessage_ == null ? io.seata.codec.protobuf.generated.AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { - return getAbstractResultMessage(); - } - - public static final int VERSION_FIELD_NUMBER = 2; - private volatile java.lang.Object version_; - /** - * string version = 2; - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - * string version = 2; - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTRADATA_FIELD_NUMBER = 3; - private volatile java.lang.Object extraData_; - /** - * string extraData = 3; - */ - public java.lang.String getExtraData() { - java.lang.Object ref = extraData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } - } - /** - * string extraData = 3; - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - java.lang.Object ref = extraData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.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; - */ - public boolean getIdentified() { - return identified_; - } - - 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 (abstractResultMessage_ != null) { - output.writeMessage(1, getAbstractResultMessage()); - } - if (!getVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); - } - if (!getExtraDataBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); - } - if (identified_ != false) { - output.writeBool(4, identified_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); - } - if (!getExtraDataBytes().isEmpty()) { - 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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractIdentifyResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractIdentifyResponseProto) - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractIdentifyResponse.internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractIdentifyResponse.internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.class, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.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(); - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = null; - } else { - abstractResultMessage_ = null; - abstractResultMessageBuilder_ = null; - } - version_ = ""; - - extraData_ = ""; - - identified_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractIdentifyResponse.internal_static_io_seata_protocol_protobuf_AbstractIdentifyResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto build() { - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto result = new io.seata.codec.protobuf.generated.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; - } - - @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 io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractResultMessageProto abstractResultMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractResultMessageProto, io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder> abstractResultMessageBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public boolean hasAbstractResultMessage() { - return abstractResultMessageBuilder_ != null || abstractResultMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProto getAbstractResultMessage() { - if (abstractResultMessageBuilder_ == null) { - return abstractResultMessage_ == null ? io.seata.codec.protobuf.generated.AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } else { - return abstractResultMessageBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder setAbstractResultMessage(io.seata.codec.protobuf.generated.AbstractResultMessageProto value) { - if (abstractResultMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractResultMessage_ = value; - onChanged(); - } else { - abstractResultMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder setAbstractResultMessage( - io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder builderForValue) { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractResultMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder mergeAbstractResultMessage(io.seata.codec.protobuf.generated.AbstractResultMessageProto value) { - if (abstractResultMessageBuilder_ == null) { - if (abstractResultMessage_ != null) { - abstractResultMessage_ = - io.seata.codec.protobuf.generated.AbstractResultMessageProto.newBuilder(abstractResultMessage_).mergeFrom(value).buildPartial(); - } else { - abstractResultMessage_ = value; - } - onChanged(); - } else { - abstractResultMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder clearAbstractResultMessage() { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = null; - onChanged(); - } else { - abstractResultMessage_ = null; - abstractResultMessageBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder getAbstractResultMessageBuilder() { - - onChanged(); - return getAbstractResultMessageFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { - if (abstractResultMessageBuilder_ != null) { - return abstractResultMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractResultMessage_ == null ? - io.seata.codec.protobuf.generated.AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractResultMessageProto, io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder> - getAbstractResultMessageFieldBuilder() { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractResultMessageProto, io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder>( - getAbstractResultMessage(), - getParentForChildren(), - isClean()); - abstractResultMessage_ = null; - } - return abstractResultMessageBuilder_; - } - - private java.lang.Object version_ = ""; - /** - * string version = 2; - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string version = 2; - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string version = 2; - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - * string version = 2; - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * string version = 2; - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.lang.Object extraData_ = ""; - /** - * string extraData = 3; - */ - public java.lang.String getExtraData() { - java.lang.Object ref = extraData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string extraData = 3; - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - java.lang.Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string extraData = 3; - */ - public Builder setExtraData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - extraData_ = value; - onChanged(); - return this; - } - /** - * string extraData = 3; - */ - public Builder clearExtraData() { - - extraData_ = getDefaultInstance().getExtraData(); - onChanged(); - return this; - } - /** - * string extraData = 3; - */ - 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; - */ - public boolean getIdentified() { - return identified_; - } - /** - * bool identified = 4; - */ - public Builder setIdentified(boolean value) { - - identified_ = value; - onChanged(); - return this; - } - /** - * bool identified = 4; - */ - public Builder clearIdentified() { - - identified_ = false; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractIdentifyResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractIdentifyResponseProto) - private static final io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java deleted file mode 100644 index 5a98b2e4f0e..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractIdentifyResponseProtoOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractIdentifyResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractIdentifyResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractIdentifyResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - boolean hasAbstractResultMessage(); - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractResultMessageProto getAbstractResultMessage(); - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder(); - - /** - * string version = 2; - */ - java.lang.String getVersion(); - /** - * string version = 2; - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - * string extraData = 3; - */ - java.lang.String getExtraData(); - /** - * string extraData = 3; - */ - com.google.protobuf.ByteString - getExtraDataBytes(); - - /** - * bool identified = 4; - */ - boolean getIdentified(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessage.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessage.java deleted file mode 100644 index b2cb60e3d96..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessage.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractMessage.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractMessageProto_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\025abstractMessage.proto\022\032io.seata.protoc" + - "ol.protobuf\032\021messageType.proto\"Y\n\024Abstra" + - "ctMessageProto\022A\n\013messageType\030\001 \001(\0162,.io" + - ".seata.protocol.protobuf.MessageTypeProt" + - "oB6\n!io.seata.codec.protobuf.generatedB\017" + - "AbstractMessageP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.MessageType.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractMessageProto_descriptor, - new java.lang.String[] { "MessageType", }); - io.seata.codec.protobuf.generated.MessageType.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessageProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessageProto.java deleted file mode 100644 index 0dfa59da225..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessageProto.java +++ /dev/null @@ -1,506 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractMessage.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractMessageProto} - */ -public final class AbstractMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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; - } - - @java.lang.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 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: { - 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 (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 io.seata.codec.protobuf.generated.AbstractMessage.internal_static_io_seata_protocol_protobuf_AbstractMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractMessage.internal_static_io_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractMessageProto.class, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder.class); - } - - public static final int MESSAGETYPE_FIELD_NUMBER = 1; - private int messageType_; - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - public int getMessageTypeValue() { - return messageType_; - } - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - public io.seata.codec.protobuf.generated.MessageTypeProto getMessageType() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.MessageTypeProto result = io.seata.codec.protobuf.generated.MessageTypeProto.valueOf(messageType_); - return result == null ? io.seata.codec.protobuf.generated.MessageTypeProto.UNRECOGNIZED : result; - } - - 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 (messageType_ != io.seata.codec.protobuf.generated.MessageTypeProto.TYPE_GLOBAL_PRESERVED.getNumber()) { - output.writeEnum(1, messageType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (messageType_ != io.seata.codec.protobuf.generated.MessageTypeProto.TYPE_GLOBAL_PRESERVED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, messageType_); - } - 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 io.seata.codec.protobuf.generated.AbstractMessageProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractMessageProto other = (io.seata.codec.protobuf.generated.AbstractMessageProto) obj; - - if (messageType_ != other.messageType_) 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) + MESSAGETYPE_FIELD_NUMBER; - hash = (53 * hash) + messageType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.seata.codec.protobuf.generated.AbstractMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractMessageProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractMessageProto) - io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractMessage.internal_static_io_seata_protocol_protobuf_AbstractMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractMessage.internal_static_io_seata_protocol_protobuf_AbstractMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractMessageProto.class, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractMessageProto.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(); - messageType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractMessage.internal_static_io_seata_protocol_protobuf_AbstractMessageProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractMessageProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractMessageProto build() { - io.seata.codec.protobuf.generated.AbstractMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractMessageProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractMessageProto result = new io.seata.codec.protobuf.generated.AbstractMessageProto(this); - result.messageType_ = messageType_; - 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 io.seata.codec.protobuf.generated.AbstractMessageProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractMessageProto other) { - if (other == io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance()) return this; - if (other.messageType_ != 0) { - setMessageTypeValue(other.getMessageTypeValue()); - } - 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 { - io.seata.codec.protobuf.generated.AbstractMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int messageType_ = 0; - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - public int getMessageTypeValue() { - return messageType_; - } - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - public Builder setMessageTypeValue(int value) { - messageType_ = value; - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - public io.seata.codec.protobuf.generated.MessageTypeProto getMessageType() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.MessageTypeProto result = io.seata.codec.protobuf.generated.MessageTypeProto.valueOf(messageType_); - return result == null ? io.seata.codec.protobuf.generated.MessageTypeProto.UNRECOGNIZED : result; - } - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - public Builder setMessageType(io.seata.codec.protobuf.generated.MessageTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - messageType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - public Builder clearMessageType() { - - messageType_ = 0; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractMessageProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractMessageProto) - private static final io.seata.codec.protobuf.generated.AbstractMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractMessageProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessageProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessageProtoOrBuilder.java deleted file mode 100644 index 6fd1dcd3361..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractMessageProtoOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractMessage.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - int getMessageTypeValue(); - /** - * .io.seata.protocol.protobuf.MessageTypeProto messageType = 1; - */ - io.seata.codec.protobuf.generated.MessageTypeProto getMessageType(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessage.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessage.java deleted file mode 100644 index 8ea19002612..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessage.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractResultMessage.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_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\033abstractResultMessage.proto\022\032io.seata." + - "protocol.protobuf\032\020resultCode.proto\032\025abs" + - "tractMessage.proto\"\265\001\n\032AbstractResultMes" + - "sageProto\022I\n\017AbstractMessage\030\001 \001(\01320.io." + - "seata.protocol.protobuf.AbstractMessageP" + - "roto\022?\n\nresultCode\030\002 \001(\0162+.io.seata.prot" + - "ocol.protobuf.ResultCodeProto\022\013\n\003msg\030\003 \001" + - "(\tB<\n!io.seata.codec.protobuf.generatedB" + - "\025AbstractResultMessageP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.ResultCode.getDescriptor(), - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_descriptor, - new java.lang.String[] { "AbstractMessage", "ResultCode", "Msg", }); - io.seata.codec.protobuf.generated.ResultCode.getDescriptor(); - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessageProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessageProto.java deleted file mode 100644 index 226a373bc47..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessageProto.java +++ /dev/null @@ -1,814 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractResultMessage.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractResultMessageProto} - */ -public final class AbstractResultMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - resultCode_ = rawValue; - break; - } - case 26: { - java.lang.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 (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 io.seata.codec.protobuf.generated.AbstractResultMessage.internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractResultMessage.internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractResultMessageProto.class, io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int RESULTCODE_FIELD_NUMBER = 2; - private int resultCode_; - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - public int getResultCodeValue() { - return resultCode_; - } - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - public io.seata.codec.protobuf.generated.ResultCodeProto getResultCode() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.ResultCodeProto result = io.seata.codec.protobuf.generated.ResultCodeProto.valueOf(resultCode_); - return result == null ? io.seata.codec.protobuf.generated.ResultCodeProto.UNRECOGNIZED : result; - } - - public static final int MSG_FIELD_NUMBER = 3; - private volatile java.lang.Object msg_; - /** - * string msg = 3; - */ - public java.lang.String getMsg() { - java.lang.Object ref = msg_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - msg_ = s; - return s; - } - } - /** - * string msg = 3; - */ - public com.google.protobuf.ByteString - getMsgBytes() { - java.lang.Object ref = msg_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - msg_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - if (resultCode_ != io.seata.codec.protobuf.generated.ResultCodeProto.Failed.getNumber()) { - output.writeEnum(2, resultCode_); - } - if (!getMsgBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, msg_); - } - unknownFields.writeTo(output); - } - - @java.lang.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_ != io.seata.codec.protobuf.generated.ResultCodeProto.Failed.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, resultCode_); - } - if (!getMsgBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, msg_); - } - 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 io.seata.codec.protobuf.generated.AbstractResultMessageProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractResultMessageProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractResultMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractResultMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractResultMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractResultMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractResultMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractResultMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractResultMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractResultMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractResultMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractResultMessageProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractResultMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractResultMessageProto) - io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractResultMessage.internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractResultMessage.internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractResultMessageProto.class, io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractResultMessageProto.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(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - resultCode_ = 0; - - msg_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractResultMessage.internal_static_io_seata_protocol_protobuf_AbstractResultMessageProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractResultMessageProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractResultMessageProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractResultMessageProto build() { - io.seata.codec.protobuf.generated.AbstractResultMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractResultMessageProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractResultMessageProto result = new io.seata.codec.protobuf.generated.AbstractResultMessageProto(this); - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - result.resultCode_ = resultCode_; - result.msg_ = msg_; - 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 io.seata.codec.protobuf.generated.AbstractResultMessageProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractResultMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractResultMessageProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.AbstractResultMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractResultMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public Builder setAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public Builder setAbstractMessage( - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public Builder mergeAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - io.seata.codec.protobuf.generated.AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private int resultCode_ = 0; - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - public int getResultCodeValue() { - return resultCode_; - } - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - public Builder setResultCodeValue(int value) { - resultCode_ = value; - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - public io.seata.codec.protobuf.generated.ResultCodeProto getResultCode() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.ResultCodeProto result = io.seata.codec.protobuf.generated.ResultCodeProto.valueOf(resultCode_); - return result == null ? io.seata.codec.protobuf.generated.ResultCodeProto.UNRECOGNIZED : result; - } - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - public Builder setResultCode(io.seata.codec.protobuf.generated.ResultCodeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - resultCode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - public Builder clearResultCode() { - - resultCode_ = 0; - onChanged(); - return this; - } - - private java.lang.Object msg_ = ""; - /** - * string msg = 3; - */ - public java.lang.String getMsg() { - java.lang.Object ref = msg_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - msg_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string msg = 3; - */ - public com.google.protobuf.ByteString - getMsgBytes() { - java.lang.Object ref = msg_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - msg_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string msg = 3; - */ - public Builder setMsg( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - msg_ = value; - onChanged(); - return this; - } - /** - * string msg = 3; - */ - public Builder clearMsg() { - - msg_ = getDefaultInstance().getMsg(); - onChanged(); - return this; - } - /** - * string msg = 3; - */ - public Builder setMsgBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - msg_ = value; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractResultMessageProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractResultMessageProto) - private static final io.seata.codec.protobuf.generated.AbstractResultMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractResultMessageProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractResultMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractResultMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessageProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessageProtoOrBuilder.java deleted file mode 100644 index f607cfca773..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractResultMessageProtoOrBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractResultMessage.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractResultMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractResultMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - boolean hasAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto AbstractMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); - - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - int getResultCodeValue(); - /** - * .io.seata.protocol.protobuf.ResultCodeProto resultCode = 2; - */ - io.seata.codec.protobuf.generated.ResultCodeProto getResultCode(); - - /** - * string msg = 3; - */ - java.lang.String getMsg(); - /** - * string msg = 3; - */ - com.google.protobuf.ByteString - getMsgBytes(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequest.java deleted file mode 100644 index 932a204db6a..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_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 abstractTransactionRequest.proto\022\032io.s" + - "eata.protocol.protobuf\032\025abstractMessage." + - "proto\"l\n\037AbstractTransactionRequestProto" + - "\022I\n\017abstractMessage\030\001 \001(\01320.io.seata.pro" + - "tocol.protobuf.AbstractMessageProtoBA\n!i" + - "o.seata.codec.protobuf.generatedB\032Abstra" + - "ctTransactionRequestP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor, - new java.lang.String[] { "AbstractMessage", }); - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequestProto.java deleted file mode 100644 index d66418757a3..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequestProto.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractTransactionRequestProto} - */ -public final class AbstractTransactionRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.AbstractTransactionRequest.internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractTransactionRequest.internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.class, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder.class); - } - - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - 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 (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.AbstractTransactionRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractTransactionRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractTransactionRequestProto) - io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractTransactionRequest.internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractTransactionRequest.internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.class, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.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(); - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractTransactionRequest.internal_static_io_seata_protocol_protobuf_AbstractTransactionRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto build() { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto result = new io.seata.codec.protobuf.generated.AbstractTransactionRequestProto(this); - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.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 io.seata.codec.protobuf.generated.AbstractTransactionRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractTransactionRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto other) { - if (other == io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractMessage()) { - mergeAbstractMessage(other.getAbstractMessage()); - } - 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 { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractTransactionRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - io.seata.codec.protobuf.generated.AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - @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:io.seata.protocol.protobuf.AbstractTransactionRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractTransactionRequestProto) - private static final io.seata.codec.protobuf.generated.AbstractTransactionRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractTransactionRequestProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java deleted file mode 100644 index 0aabafaa550..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionRequestProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractTransactionRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractTransactionRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - boolean hasAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponse.java deleted file mode 100644 index c57e5ebba1d..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponse.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_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!abstractTransactionResponse.proto\022\032io." + - "seata.protocol.protobuf\032\033abstractResultM" + - "essage.proto\032\036transactionExceptionCode.p" + - "roto\"\326\001\n AbstractTransactionResponseProt" + - "o\022U\n\025abstractResultMessage\030\001 \001(\01326.io.se" + - "ata.protocol.protobuf.AbstractResultMess" + - "ageProto\022[\n\030transactionExceptionCode\030\002 \001" + - "(\01629.io.seata.protocol.protobuf.Transact" + - "ionExceptionCodeProtoBB\n!io.seata.codec." + - "protobuf.generatedB\033AbstractTransactionR" + - "esponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractResultMessage.getDescriptor(), - io.seata.codec.protobuf.generated.TransactionExceptionCode.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor, - new java.lang.String[] { "AbstractResultMessage", "TransactionExceptionCode", }); - io.seata.codec.protobuf.generated.AbstractResultMessage.getDescriptor(); - io.seata.codec.protobuf.generated.TransactionExceptionCode.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponseProto.java deleted file mode 100644 index 808ea002c3e..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponseProto.java +++ /dev/null @@ -1,687 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractTransactionResponseProto} - */ -public final class AbstractTransactionResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder subBuilder = null; - if (abstractResultMessage_ != null) { - subBuilder = abstractResultMessage_.toBuilder(); - } - abstractResultMessage_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.AbstractTransactionResponse.internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractTransactionResponse.internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.class, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder.class); - } - - public static final int ABSTRACTRESULTMESSAGE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractResultMessageProto abstractResultMessage_; - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public boolean hasAbstractResultMessage() { - return abstractResultMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProto getAbstractResultMessage() { - return abstractResultMessage_ == null ? io.seata.codec.protobuf.generated.AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { - return getAbstractResultMessage(); - } - - public static final int TRANSACTIONEXCEPTIONCODE_FIELD_NUMBER = 2; - private int transactionExceptionCode_; - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - public int getTransactionExceptionCodeValue() { - return transactionExceptionCode_; - } - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - public io.seata.codec.protobuf.generated.TransactionExceptionCodeProto getTransactionExceptionCode() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.TransactionExceptionCodeProto result = io.seata.codec.protobuf.generated.TransactionExceptionCodeProto.valueOf(transactionExceptionCode_); - return result == null ? io.seata.codec.protobuf.generated.TransactionExceptionCodeProto.UNRECOGNIZED : result; - } - - 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 (abstractResultMessage_ != null) { - output.writeMessage(1, getAbstractResultMessage()); - } - if (transactionExceptionCode_ != io.seata.codec.protobuf.generated.TransactionExceptionCodeProto.Unknown.getNumber()) { - output.writeEnum(2, transactionExceptionCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.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_ != io.seata.codec.protobuf.generated.TransactionExceptionCodeProto.Unknown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, transactionExceptionCode_); - } - 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 io.seata.codec.protobuf.generated.AbstractTransactionResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.AbstractTransactionResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.AbstractTransactionResponseProto) - io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.AbstractTransactionResponse.internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.AbstractTransactionResponse.internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.class, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.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(); - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = null; - } else { - abstractResultMessage_ = null; - abstractResultMessageBuilder_ = null; - } - transactionExceptionCode_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.AbstractTransactionResponse.internal_static_io_seata_protocol_protobuf_AbstractTransactionResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto build() { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto buildPartial() { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto result = new io.seata.codec.protobuf.generated.AbstractTransactionResponseProto(this); - if (abstractResultMessageBuilder_ == null) { - result.abstractResultMessage_ = abstractResultMessage_; - } else { - result.abstractResultMessage_ = abstractResultMessageBuilder_.build(); - } - result.transactionExceptionCode_ = transactionExceptionCode_; - 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 io.seata.codec.protobuf.generated.AbstractTransactionResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.AbstractTransactionResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto other) { - if (other == io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractResultMessage()) { - mergeAbstractResultMessage(other.getAbstractResultMessage()); - } - if (other.transactionExceptionCode_ != 0) { - setTransactionExceptionCodeValue(other.getTransactionExceptionCodeValue()); - } - 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 { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.AbstractTransactionResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractResultMessageProto abstractResultMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractResultMessageProto, io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder> abstractResultMessageBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public boolean hasAbstractResultMessage() { - return abstractResultMessageBuilder_ != null || abstractResultMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProto getAbstractResultMessage() { - if (abstractResultMessageBuilder_ == null) { - return abstractResultMessage_ == null ? io.seata.codec.protobuf.generated.AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } else { - return abstractResultMessageBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder setAbstractResultMessage(io.seata.codec.protobuf.generated.AbstractResultMessageProto value) { - if (abstractResultMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractResultMessage_ = value; - onChanged(); - } else { - abstractResultMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder setAbstractResultMessage( - io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder builderForValue) { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractResultMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder mergeAbstractResultMessage(io.seata.codec.protobuf.generated.AbstractResultMessageProto value) { - if (abstractResultMessageBuilder_ == null) { - if (abstractResultMessage_ != null) { - abstractResultMessage_ = - io.seata.codec.protobuf.generated.AbstractResultMessageProto.newBuilder(abstractResultMessage_).mergeFrom(value).buildPartial(); - } else { - abstractResultMessage_ = value; - } - onChanged(); - } else { - abstractResultMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public Builder clearAbstractResultMessage() { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessage_ = null; - onChanged(); - } else { - abstractResultMessage_ = null; - abstractResultMessageBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder getAbstractResultMessageBuilder() { - - onChanged(); - return getAbstractResultMessageFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder() { - if (abstractResultMessageBuilder_ != null) { - return abstractResultMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractResultMessage_ == null ? - io.seata.codec.protobuf.generated.AbstractResultMessageProto.getDefaultInstance() : abstractResultMessage_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractResultMessageProto, io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder> - getAbstractResultMessageFieldBuilder() { - if (abstractResultMessageBuilder_ == null) { - abstractResultMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractResultMessageProto, io.seata.codec.protobuf.generated.AbstractResultMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder>( - getAbstractResultMessage(), - getParentForChildren(), - isClean()); - abstractResultMessage_ = null; - } - return abstractResultMessageBuilder_; - } - - private int transactionExceptionCode_ = 0; - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - public int getTransactionExceptionCodeValue() { - return transactionExceptionCode_; - } - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - public Builder setTransactionExceptionCodeValue(int value) { - transactionExceptionCode_ = value; - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - public io.seata.codec.protobuf.generated.TransactionExceptionCodeProto getTransactionExceptionCode() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.TransactionExceptionCodeProto result = io.seata.codec.protobuf.generated.TransactionExceptionCodeProto.valueOf(transactionExceptionCode_); - return result == null ? io.seata.codec.protobuf.generated.TransactionExceptionCodeProto.UNRECOGNIZED : result; - } - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - public Builder setTransactionExceptionCode(io.seata.codec.protobuf.generated.TransactionExceptionCodeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - transactionExceptionCode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - public Builder clearTransactionExceptionCode() { - - transactionExceptionCode_ = 0; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.AbstractTransactionResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.AbstractTransactionResponseProto) - private static final io.seata.codec.protobuf.generated.AbstractTransactionResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.AbstractTransactionResponseProto(); - } - - public static io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java deleted file mode 100644 index e51ae836315..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/AbstractTransactionResponseProtoOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: abstractTransactionResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface AbstractTransactionResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.AbstractTransactionResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - boolean hasAbstractResultMessage(); - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractResultMessageProto getAbstractResultMessage(); - /** - * .io.seata.protocol.protobuf.AbstractResultMessageProto abstractResultMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractResultMessageProtoOrBuilder getAbstractResultMessageOrBuilder(); - - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - int getTransactionExceptionCodeValue(); - /** - * .io.seata.protocol.protobuf.TransactionExceptionCodeProto transactionExceptionCode = 2; - */ - io.seata.codec.protobuf.generated.TransactionExceptionCodeProto getTransactionExceptionCode(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequest.java deleted file mode 100644 index 9397498ede0..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_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\031branchCommitRequest.proto\022\032io.seata.pr" + - "otocol.protobuf\032\036abstractBranchEndReques" + - "t.proto\"w\n\030BranchCommitRequestProto\022[\n\030a" + - "bstractBranchEndRequest\030\001 \001(\01329.io.seata" + - ".protocol.protobuf.AbstractBranchEndRequ" + - "estProtoB:\n!io.seata.codec.protobuf.gene" + - "ratedB\023BranchCommitRequestP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractBranchEndRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_descriptor, - new java.lang.String[] { "AbstractBranchEndRequest", }); - io.seata.codec.protobuf.generated.AbstractBranchEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequestProto.java deleted file mode 100644 index 4319a2c4dd4..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequestProto.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchCommitRequestProto} - */ -public final class BranchCommitRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder subBuilder = null; - if (abstractBranchEndRequest_ != null) { - subBuilder = abstractBranchEndRequest_.toBuilder(); - } - abstractBranchEndRequest_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.BranchCommitRequest.internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchCommitRequest.internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchCommitRequestProto.class, io.seata.codec.protobuf.generated.BranchCommitRequestProto.Builder.class); - } - - public static final int ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto abstractBranchEndRequest_; - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public boolean hasAbstractBranchEndRequest() { - return abstractBranchEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getAbstractBranchEndRequest() { - return abstractBranchEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { - return getAbstractBranchEndRequest(); - } - - 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 (abstractBranchEndRequest_ != null) { - output.writeMessage(1, getAbstractBranchEndRequest()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.BranchCommitRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.BranchCommitRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.BranchCommitRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchCommitRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchCommitRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchCommitRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchCommitRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchCommitRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchCommitRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchCommitRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchCommitRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.BranchCommitRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchCommitRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.BranchCommitRequestProto) - io.seata.codec.protobuf.generated.BranchCommitRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.BranchCommitRequest.internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchCommitRequest.internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchCommitRequestProto.class, io.seata.codec.protobuf.generated.BranchCommitRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.BranchCommitRequestProto.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(); - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = null; - } else { - abstractBranchEndRequest_ = null; - abstractBranchEndRequestBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.BranchCommitRequest.internal_static_io_seata_protocol_protobuf_BranchCommitRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchCommitRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.BranchCommitRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchCommitRequestProto build() { - io.seata.codec.protobuf.generated.BranchCommitRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchCommitRequestProto buildPartial() { - io.seata.codec.protobuf.generated.BranchCommitRequestProto result = new io.seata.codec.protobuf.generated.BranchCommitRequestProto(this); - if (abstractBranchEndRequestBuilder_ == null) { - result.abstractBranchEndRequest_ = abstractBranchEndRequest_; - } else { - result.abstractBranchEndRequest_ = abstractBranchEndRequestBuilder_.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 io.seata.codec.protobuf.generated.BranchCommitRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.BranchCommitRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.BranchCommitRequestProto other) { - if (other == io.seata.codec.protobuf.generated.BranchCommitRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractBranchEndRequest()) { - mergeAbstractBranchEndRequest(other.getAbstractBranchEndRequest()); - } - 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 { - io.seata.codec.protobuf.generated.BranchCommitRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.BranchCommitRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto abstractBranchEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder> abstractBranchEndRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public boolean hasAbstractBranchEndRequest() { - return abstractBranchEndRequestBuilder_ != null || abstractBranchEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getAbstractBranchEndRequest() { - if (abstractBranchEndRequestBuilder_ == null) { - return abstractBranchEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } else { - return abstractBranchEndRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder setAbstractBranchEndRequest(io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto value) { - if (abstractBranchEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractBranchEndRequest_ = value; - onChanged(); - } else { - abstractBranchEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder setAbstractBranchEndRequest( - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder builderForValue) { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractBranchEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder mergeAbstractBranchEndRequest(io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto value) { - if (abstractBranchEndRequestBuilder_ == null) { - if (abstractBranchEndRequest_ != null) { - abstractBranchEndRequest_ = - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.newBuilder(abstractBranchEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractBranchEndRequest_ = value; - } - onChanged(); - } else { - abstractBranchEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder clearAbstractBranchEndRequest() { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = null; - onChanged(); - } else { - abstractBranchEndRequest_ = null; - abstractBranchEndRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder getAbstractBranchEndRequestBuilder() { - - onChanged(); - return getAbstractBranchEndRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { - if (abstractBranchEndRequestBuilder_ != null) { - return abstractBranchEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractBranchEndRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder> - getAbstractBranchEndRequestFieldBuilder() { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder>( - getAbstractBranchEndRequest(), - getParentForChildren(), - isClean()); - abstractBranchEndRequest_ = null; - } - return abstractBranchEndRequestBuilder_; - } - @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:io.seata.protocol.protobuf.BranchCommitRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.BranchCommitRequestProto) - private static final io.seata.codec.protobuf.generated.BranchCommitRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.BranchCommitRequestProto(); - } - - public static io.seata.codec.protobuf.generated.BranchCommitRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchCommitRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequestProtoOrBuilder.java deleted file mode 100644 index 572e698dd55..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitRequestProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface BranchCommitRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.BranchCommitRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - boolean hasAbstractBranchEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getAbstractBranchEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponse.java deleted file mode 100644 index e928d5dd067..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_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\032branchCommitResponse.proto\022\032io.seata.p" + - "rotocol.protobuf\032\037abstractBranchEndRespo" + - "nse.proto\"z\n\031BranchCommitResponseProto\022]" + - "\n\031abstractBranchEndResponse\030\001 \001(\0132:.io.s" + - "eata.protocol.protobuf.AbstractBranchEnd" + - "ResponseProtoB;\n!io.seata.codec.protobuf" + - ".generatedB\024BranchCommitResponseP\001b\006prot" + - "o3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractBranchEndResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_descriptor, - new java.lang.String[] { "AbstractBranchEndResponse", }); - io.seata.codec.protobuf.generated.AbstractBranchEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponseProto.java deleted file mode 100644 index e2846662286..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponseProto.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchCommitResponseProto} - */ -public final class BranchCommitResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder subBuilder = null; - if (abstractBranchEndResponse_ != null) { - subBuilder = abstractBranchEndResponse_.toBuilder(); - } - abstractBranchEndResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.BranchCommitResponse.internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchCommitResponse.internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchCommitResponseProto.class, io.seata.codec.protobuf.generated.BranchCommitResponseProto.Builder.class); - } - - public static final int ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto abstractBranchEndResponse_; - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public boolean hasAbstractBranchEndResponse() { - return abstractBranchEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getAbstractBranchEndResponse() { - return abstractBranchEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { - return getAbstractBranchEndResponse(); - } - - 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 (abstractBranchEndResponse_ != null) { - output.writeMessage(1, getAbstractBranchEndResponse()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.BranchCommitResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.BranchCommitResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.BranchCommitResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchCommitResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchCommitResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchCommitResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchCommitResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchCommitResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchCommitResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchCommitResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchCommitResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.BranchCommitResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchCommitResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.BranchCommitResponseProto) - io.seata.codec.protobuf.generated.BranchCommitResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.BranchCommitResponse.internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchCommitResponse.internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchCommitResponseProto.class, io.seata.codec.protobuf.generated.BranchCommitResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.BranchCommitResponseProto.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(); - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = null; - } else { - abstractBranchEndResponse_ = null; - abstractBranchEndResponseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.BranchCommitResponse.internal_static_io_seata_protocol_protobuf_BranchCommitResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchCommitResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.BranchCommitResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchCommitResponseProto build() { - io.seata.codec.protobuf.generated.BranchCommitResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchCommitResponseProto buildPartial() { - io.seata.codec.protobuf.generated.BranchCommitResponseProto result = new io.seata.codec.protobuf.generated.BranchCommitResponseProto(this); - if (abstractBranchEndResponseBuilder_ == null) { - result.abstractBranchEndResponse_ = abstractBranchEndResponse_; - } else { - result.abstractBranchEndResponse_ = abstractBranchEndResponseBuilder_.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 io.seata.codec.protobuf.generated.BranchCommitResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.BranchCommitResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.BranchCommitResponseProto other) { - if (other == io.seata.codec.protobuf.generated.BranchCommitResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractBranchEndResponse()) { - mergeAbstractBranchEndResponse(other.getAbstractBranchEndResponse()); - } - 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 { - io.seata.codec.protobuf.generated.BranchCommitResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.BranchCommitResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto abstractBranchEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder> abstractBranchEndResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public boolean hasAbstractBranchEndResponse() { - return abstractBranchEndResponseBuilder_ != null || abstractBranchEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getAbstractBranchEndResponse() { - if (abstractBranchEndResponseBuilder_ == null) { - return abstractBranchEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } else { - return abstractBranchEndResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder setAbstractBranchEndResponse(io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto value) { - if (abstractBranchEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractBranchEndResponse_ = value; - onChanged(); - } else { - abstractBranchEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder setAbstractBranchEndResponse( - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder builderForValue) { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractBranchEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder mergeAbstractBranchEndResponse(io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto value) { - if (abstractBranchEndResponseBuilder_ == null) { - if (abstractBranchEndResponse_ != null) { - abstractBranchEndResponse_ = - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.newBuilder(abstractBranchEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractBranchEndResponse_ = value; - } - onChanged(); - } else { - abstractBranchEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder clearAbstractBranchEndResponse() { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = null; - onChanged(); - } else { - abstractBranchEndResponse_ = null; - abstractBranchEndResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder getAbstractBranchEndResponseBuilder() { - - onChanged(); - return getAbstractBranchEndResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { - if (abstractBranchEndResponseBuilder_ != null) { - return abstractBranchEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractBranchEndResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder> - getAbstractBranchEndResponseFieldBuilder() { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder>( - getAbstractBranchEndResponse(), - getParentForChildren(), - isClean()); - abstractBranchEndResponse_ = null; - } - return abstractBranchEndResponseBuilder_; - } - @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:io.seata.protocol.protobuf.BranchCommitResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.BranchCommitResponseProto) - private static final io.seata.codec.protobuf.generated.BranchCommitResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.BranchCommitResponseProto(); - } - - public static io.seata.codec.protobuf.generated.BranchCommitResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchCommitResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponseProtoOrBuilder.java deleted file mode 100644 index 55a2d005699..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchCommitResponseProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchCommitResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface BranchCommitResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.BranchCommitResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - boolean hasAbstractBranchEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getAbstractBranchEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequest.java deleted file mode 100644 index 9cb4d7d81f6..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequest.java +++ /dev/null @@ -1,69 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_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\033branchRegisterRequest.proto\022\032io.seata." + - "protocol.protobuf\032\020branchType.proto\032 abs" + - "tractTransactionRequest.proto\"\211\002\n\032Branch" + - "RegisterRequestProto\022_\n\032abstractTransact" + - "ionRequest\030\001 \001(\0132;.io.seata.protocol.pro" + - "tobuf.AbstractTransactionRequestProto\022\013\n" + - "\003xid\030\002 \001(\t\022?\n\nbranchType\030\003 \001(\0162+.io.seat" + - "a.protocol.protobuf.BranchTypeProto\022\022\n\nr" + - "esourceId\030\004 \001(\t\022\017\n\007lockKey\030\005 \001(\t\022\027\n\017appl" + - "icationData\030\006 \001(\tB<\n!io.seata.codec.prot" + - "obuf.generatedB\025BranchRegisterRequestP\001b" + - "\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.BranchType.getDescriptor(), - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor, - new java.lang.String[] { "AbstractTransactionRequest", "Xid", "BranchType", "ResourceId", "LockKey", "ApplicationData", }); - io.seata.codec.protobuf.generated.BranchType.getDescriptor(); - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequestProto.java deleted file mode 100644 index c2c4eaddba1..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequestProto.java +++ /dev/null @@ -1,1195 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchRegisterRequestProto} - */ -public final class BranchRegisterRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - - branchType_ = rawValue; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceId_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - lockKey_ = s; - break; - } - case 50: { - java.lang.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 (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 io.seata.codec.protobuf.generated.BranchRegisterRequest.internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchRegisterRequest.internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchRegisterRequestProto.class, io.seata.codec.protobuf.generated.BranchRegisterRequestProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile java.lang.Object xid_; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BRANCHTYPE_FIELD_NUMBER = 3; - private int branchType_; - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - public int getBranchTypeValue() { - return branchType_; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - public io.seata.codec.protobuf.generated.BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchTypeProto result = io.seata.codec.protobuf.generated.BranchTypeProto.valueOf(branchType_); - return result == null ? io.seata.codec.protobuf.generated.BranchTypeProto.UNRECOGNIZED : result; - } - - public static final int RESOURCEID_FIELD_NUMBER = 4; - private volatile java.lang.Object resourceId_; - /** - * string resourceId = 4; - */ - public java.lang.String getResourceId() { - java.lang.Object ref = resourceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } - } - /** - * string resourceId = 4; - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - java.lang.Object ref = resourceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCKKEY_FIELD_NUMBER = 5; - private volatile java.lang.Object lockKey_; - /** - * string lockKey = 5; - */ - public java.lang.String getLockKey() { - java.lang.Object ref = lockKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lockKey_ = s; - return s; - } - } - /** - * string lockKey = 5; - */ - public com.google.protobuf.ByteString - getLockKeyBytes() { - java.lang.Object ref = lockKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lockKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int APPLICATIONDATA_FIELD_NUMBER = 6; - private volatile java.lang.Object applicationData_; - /** - * string applicationData = 6; - */ - public java.lang.String getApplicationData() { - java.lang.Object ref = applicationData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } - } - /** - * string applicationData = 6; - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - java.lang.Object ref = applicationData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!getXidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (branchType_ != io.seata.codec.protobuf.generated.BranchTypeProto.AT.getNumber()) { - output.writeEnum(3, branchType_); - } - if (!getResourceIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceId_); - } - if (!getLockKeyBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lockKey_); - } - if (!getApplicationDataBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getXidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (branchType_ != io.seata.codec.protobuf.generated.BranchTypeProto.AT.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, branchType_); - } - if (!getResourceIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceId_); - } - if (!getLockKeyBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lockKey_); - } - if (!getApplicationDataBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); - } - 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 io.seata.codec.protobuf.generated.BranchRegisterRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.BranchRegisterRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchRegisterRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.BranchRegisterRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchRegisterRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.BranchRegisterRequestProto) - io.seata.codec.protobuf.generated.BranchRegisterRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.BranchRegisterRequest.internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchRegisterRequest.internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchRegisterRequestProto.class, io.seata.codec.protobuf.generated.BranchRegisterRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.BranchRegisterRequestProto.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(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - xid_ = ""; - - branchType_ = 0; - - resourceId_ = ""; - - lockKey_ = ""; - - applicationData_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.BranchRegisterRequest.internal_static_io_seata_protocol_protobuf_BranchRegisterRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRegisterRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.BranchRegisterRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRegisterRequestProto build() { - io.seata.codec.protobuf.generated.BranchRegisterRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRegisterRequestProto buildPartial() { - io.seata.codec.protobuf.generated.BranchRegisterRequestProto result = new io.seata.codec.protobuf.generated.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; - } - - @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 io.seata.codec.protobuf.generated.BranchRegisterRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.BranchRegisterRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.BranchRegisterRequestProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.BranchRegisterRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.BranchRegisterRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private java.lang.Object xid_ = ""; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - */ - public Builder setXid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - */ - 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; - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - public int getBranchTypeValue() { - return branchType_; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - public Builder setBranchTypeValue(int value) { - branchType_ = value; - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - public io.seata.codec.protobuf.generated.BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchTypeProto result = io.seata.codec.protobuf.generated.BranchTypeProto.valueOf(branchType_); - return result == null ? io.seata.codec.protobuf.generated.BranchTypeProto.UNRECOGNIZED : result; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - public Builder setBranchType(io.seata.codec.protobuf.generated.BranchTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - public Builder clearBranchType() { - - branchType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object resourceId_ = ""; - /** - * string resourceId = 4; - */ - public java.lang.String getResourceId() { - java.lang.Object ref = resourceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string resourceId = 4; - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - java.lang.Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resourceId = 4; - */ - public Builder setResourceId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceId_ = value; - onChanged(); - return this; - } - /** - * string resourceId = 4; - */ - public Builder clearResourceId() { - - resourceId_ = getDefaultInstance().getResourceId(); - onChanged(); - return this; - } - /** - * string resourceId = 4; - */ - public Builder setResourceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceId_ = value; - onChanged(); - return this; - } - - private java.lang.Object lockKey_ = ""; - /** - * string lockKey = 5; - */ - public java.lang.String getLockKey() { - java.lang.Object ref = lockKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lockKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string lockKey = 5; - */ - public com.google.protobuf.ByteString - getLockKeyBytes() { - java.lang.Object ref = lockKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lockKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string lockKey = 5; - */ - public Builder setLockKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - lockKey_ = value; - onChanged(); - return this; - } - /** - * string lockKey = 5; - */ - public Builder clearLockKey() { - - lockKey_ = getDefaultInstance().getLockKey(); - onChanged(); - return this; - } - /** - * string lockKey = 5; - */ - public Builder setLockKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - lockKey_ = value; - onChanged(); - return this; - } - - private java.lang.Object applicationData_ = ""; - /** - * string applicationData = 6; - */ - public java.lang.String getApplicationData() { - java.lang.Object ref = applicationData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string applicationData = 6; - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - java.lang.Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string applicationData = 6; - */ - public Builder setApplicationData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationData_ = value; - onChanged(); - return this; - } - /** - * string applicationData = 6; - */ - public Builder clearApplicationData() { - - applicationData_ = getDefaultInstance().getApplicationData(); - onChanged(); - return this; - } - /** - * string applicationData = 6; - */ - public Builder setApplicationDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - applicationData_ = value; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.BranchRegisterRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.BranchRegisterRequestProto) - private static final io.seata.codec.protobuf.generated.BranchRegisterRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.BranchRegisterRequestProto(); - } - - public static io.seata.codec.protobuf.generated.BranchRegisterRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRegisterRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java deleted file mode 100644 index 7d55b7d3a0e..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterRequestProtoOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface BranchRegisterRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.BranchRegisterRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - boolean hasAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * string xid = 2; - */ - java.lang.String getXid(); - /** - * string xid = 2; - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - int getBranchTypeValue(); - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 3; - */ - io.seata.codec.protobuf.generated.BranchTypeProto getBranchType(); - - /** - * string resourceId = 4; - */ - java.lang.String getResourceId(); - /** - * string resourceId = 4; - */ - com.google.protobuf.ByteString - getResourceIdBytes(); - - /** - * string lockKey = 5; - */ - java.lang.String getLockKey(); - /** - * string lockKey = 5; - */ - com.google.protobuf.ByteString - getLockKeyBytes(); - - /** - * string applicationData = 6; - */ - java.lang.String getApplicationData(); - /** - * string applicationData = 6; - */ - com.google.protobuf.ByteString - getApplicationDataBytes(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponse.java deleted file mode 100644 index aceb49945c2..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_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\034branchRegisterResponse.proto\022\032io.seata" + - ".protocol.protobuf\032!abstractTransactionR" + - "esponse.proto\"\222\001\n\033BranchRegisterResponse" + - "Proto\022a\n\033abstractTransactionResponse\030\001 \001" + - "(\0132<.io.seata.protocol.protobuf.Abstract" + - "TransactionResponseProto\022\020\n\010branchId\030\002 \001" + - "(\003B=\n!io.seata.codec.protobuf.generatedB" + - "\026BranchRegisterResponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor, - new java.lang.String[] { "AbstractTransactionResponse", "BranchId", }); - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponseProto.java deleted file mode 100644 index 8c3658e9fe0..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponseProto.java +++ /dev/null @@ -1,660 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchRegisterResponseProto} - */ -public final class BranchRegisterResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.BranchRegisterResponse.internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchRegisterResponse.internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchRegisterResponseProto.class, io.seata.codec.protobuf.generated.BranchRegisterResponseProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int BRANCHID_FIELD_NUMBER = 2; - private long branchId_; - /** - * int64 branchId = 2; - */ - public long getBranchId() { - return branchId_; - } - - 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 (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (branchId_ != 0L) { - output.writeInt64(2, branchId_); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.BranchRegisterResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.BranchRegisterResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchRegisterResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.BranchRegisterResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchRegisterResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.BranchRegisterResponseProto) - io.seata.codec.protobuf.generated.BranchRegisterResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.BranchRegisterResponse.internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchRegisterResponse.internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchRegisterResponseProto.class, io.seata.codec.protobuf.generated.BranchRegisterResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.BranchRegisterResponseProto.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(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - branchId_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.BranchRegisterResponse.internal_static_io_seata_protocol_protobuf_BranchRegisterResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRegisterResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.BranchRegisterResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRegisterResponseProto build() { - io.seata.codec.protobuf.generated.BranchRegisterResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRegisterResponseProto buildPartial() { - io.seata.codec.protobuf.generated.BranchRegisterResponseProto result = new io.seata.codec.protobuf.generated.BranchRegisterResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.branchId_ = branchId_; - 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 io.seata.codec.protobuf.generated.BranchRegisterResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.BranchRegisterResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.BranchRegisterResponseProto other) { - if (other == io.seata.codec.protobuf.generated.BranchRegisterResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - if (other.getBranchId() != 0L) { - setBranchId(other.getBranchId()); - } - 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 { - io.seata.codec.protobuf.generated.BranchRegisterResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.BranchRegisterResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private long branchId_ ; - /** - * int64 branchId = 2; - */ - public long getBranchId() { - return branchId_; - } - /** - * int64 branchId = 2; - */ - public Builder setBranchId(long value) { - - branchId_ = value; - onChanged(); - return this; - } - /** - * int64 branchId = 2; - */ - public Builder clearBranchId() { - - branchId_ = 0L; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.BranchRegisterResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.BranchRegisterResponseProto) - private static final io.seata.codec.protobuf.generated.BranchRegisterResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.BranchRegisterResponseProto(); - } - - public static io.seata.codec.protobuf.generated.BranchRegisterResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRegisterResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java deleted file mode 100644 index eaa4328313d..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRegisterResponseProtoOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRegisterResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface BranchRegisterResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.BranchRegisterResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - boolean hasAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * int64 branchId = 2; - */ - long getBranchId(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequest.java deleted file mode 100644 index 5b31fa92f9c..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequest.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_BranchReportRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_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\031branchReportRequest.proto\022\032io.seata.pr" + - "otocol.protobuf\032\022branchStatus.proto\032\020bra" + - "nchType.proto\032 abstractTransactionReques" + - "t.proto\"\307\002\n\030BranchReportRequestProto\022_\n\032" + - "abstractTransactionRequest\030\001 \001(\0132;.io.se" + - "ata.protocol.protobuf.AbstractTransactio" + - "nRequestProto\022\013\n\003xid\030\002 \001(\t\022\020\n\010branchId\030\003" + - " \001(\003\022\022\n\nresourceId\030\004 \001(\t\022=\n\006status\030\005 \001(\016" + - "2-.io.seata.protocol.protobuf.BranchStat" + - "usProto\022\027\n\017applicationData\030\006 \001(\t\022?\n\nbran" + - "chType\030\007 \001(\0162+.io.seata.protocol.protobu" + - "f.BranchTypeProtoB:\n!io.seata.codec.prot" + - "obuf.generatedB\023BranchReportRequestP\001b\006p" + - "roto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.BranchStatus.getDescriptor(), - io.seata.codec.protobuf.generated.BranchType.getDescriptor(), - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_descriptor, - new java.lang.String[] { "AbstractTransactionRequest", "Xid", "BranchId", "ResourceId", "Status", "ApplicationData", "BranchType", }); - io.seata.codec.protobuf.generated.BranchStatus.getDescriptor(); - io.seata.codec.protobuf.generated.BranchType.getDescriptor(); - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequestProto.java deleted file mode 100644 index e7475b9630c..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequestProto.java +++ /dev/null @@ -1,1203 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.BranchReportRequestProto} - */ -public final class BranchReportRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 24: { - - branchId_ = input.readInt64(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceId_ = s; - break; - } - case 40: { - int rawValue = input.readEnum(); - - status_ = rawValue; - break; - } - case 50: { - java.lang.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 (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 io.seata.codec.protobuf.generated.BranchReportRequest.internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchReportRequest.internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchReportRequestProto.class, io.seata.codec.protobuf.generated.BranchReportRequestProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile java.lang.Object xid_; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.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; - */ - public long getBranchId() { - return branchId_; - } - - public static final int RESOURCEID_FIELD_NUMBER = 4; - private volatile java.lang.Object resourceId_; - /** - * string resourceId = 4; - */ - public java.lang.String getResourceId() { - java.lang.Object ref = resourceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } - } - /** - * string resourceId = 4; - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - java.lang.Object ref = resourceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_FIELD_NUMBER = 5; - private int status_; - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - public int getStatusValue() { - return status_; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - public io.seata.codec.protobuf.generated.BranchStatusProto getStatus() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchStatusProto result = io.seata.codec.protobuf.generated.BranchStatusProto.valueOf(status_); - return result == null ? io.seata.codec.protobuf.generated.BranchStatusProto.UNRECOGNIZED : result; - } - - public static final int APPLICATIONDATA_FIELD_NUMBER = 6; - private volatile java.lang.Object applicationData_; - /** - * string applicationData = 6; - */ - public java.lang.String getApplicationData() { - java.lang.Object ref = applicationData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } - } - /** - * string applicationData = 6; - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - java.lang.Object ref = applicationData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BRANCHTYPE_FIELD_NUMBER = 7; - private int branchType_; - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - public int getBranchTypeValue() { - return branchType_; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - public io.seata.codec.protobuf.generated.BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchTypeProto result = io.seata.codec.protobuf.generated.BranchTypeProto.valueOf(branchType_); - return result == null ? io.seata.codec.protobuf.generated.BranchTypeProto.UNRECOGNIZED : result; - } - - 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 (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!getXidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (branchId_ != 0L) { - output.writeInt64(3, branchId_); - } - if (!getResourceIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceId_); - } - if (status_ != io.seata.codec.protobuf.generated.BranchStatusProto.BUnknown.getNumber()) { - output.writeEnum(5, status_); - } - if (!getApplicationDataBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, applicationData_); - } - if (branchType_ != io.seata.codec.protobuf.generated.BranchTypeProto.AT.getNumber()) { - output.writeEnum(7, branchType_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getXidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (branchId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, branchId_); - } - if (!getResourceIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceId_); - } - if (status_ != io.seata.codec.protobuf.generated.BranchStatusProto.BUnknown.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, status_); - } - if (!getApplicationDataBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, applicationData_); - } - if (branchType_ != io.seata.codec.protobuf.generated.BranchTypeProto.AT.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, branchType_); - } - 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 io.seata.codec.protobuf.generated.BranchReportRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.BranchReportRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.BranchReportRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchReportRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchReportRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchReportRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchReportRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchReportRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchReportRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchReportRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchReportRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.BranchReportRequestProto 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 io.seata.protocol.protobuf.BranchReportRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.BranchReportRequestProto) - io.seata.codec.protobuf.generated.BranchReportRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.BranchReportRequest.internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchReportRequest.internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchReportRequestProto.class, io.seata.codec.protobuf.generated.BranchReportRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.BranchReportRequestProto.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(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - xid_ = ""; - - branchId_ = 0L; - - resourceId_ = ""; - - status_ = 0; - - applicationData_ = ""; - - branchType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.BranchReportRequest.internal_static_io_seata_protocol_protobuf_BranchReportRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchReportRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.BranchReportRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchReportRequestProto build() { - io.seata.codec.protobuf.generated.BranchReportRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchReportRequestProto buildPartial() { - io.seata.codec.protobuf.generated.BranchReportRequestProto result = new io.seata.codec.protobuf.generated.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; - } - - @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 io.seata.codec.protobuf.generated.BranchReportRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.BranchReportRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.BranchReportRequestProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.BranchReportRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.BranchReportRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private java.lang.Object xid_ = ""; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - */ - public Builder setXid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - */ - 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; - */ - public long getBranchId() { - return branchId_; - } - /** - * int64 branchId = 3; - */ - public Builder setBranchId(long value) { - - branchId_ = value; - onChanged(); - return this; - } - /** - * int64 branchId = 3; - */ - public Builder clearBranchId() { - - branchId_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object resourceId_ = ""; - /** - * string resourceId = 4; - */ - public java.lang.String getResourceId() { - java.lang.Object ref = resourceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string resourceId = 4; - */ - public com.google.protobuf.ByteString - getResourceIdBytes() { - java.lang.Object ref = resourceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resourceId = 4; - */ - public Builder setResourceId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceId_ = value; - onChanged(); - return this; - } - /** - * string resourceId = 4; - */ - public Builder clearResourceId() { - - resourceId_ = getDefaultInstance().getResourceId(); - onChanged(); - return this; - } - /** - * string resourceId = 4; - */ - 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; - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - public int getStatusValue() { - return status_; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - public Builder setStatusValue(int value) { - status_ = value; - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - public io.seata.codec.protobuf.generated.BranchStatusProto getStatus() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchStatusProto result = io.seata.codec.protobuf.generated.BranchStatusProto.valueOf(status_); - return result == null ? io.seata.codec.protobuf.generated.BranchStatusProto.UNRECOGNIZED : result; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - public Builder setStatus(io.seata.codec.protobuf.generated.BranchStatusProto value) { - if (value == null) { - throw new NullPointerException(); - } - - status_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - public Builder clearStatus() { - - status_ = 0; - onChanged(); - return this; - } - - private java.lang.Object applicationData_ = ""; - /** - * string applicationData = 6; - */ - public java.lang.String getApplicationData() { - java.lang.Object ref = applicationData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - applicationData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string applicationData = 6; - */ - public com.google.protobuf.ByteString - getApplicationDataBytes() { - java.lang.Object ref = applicationData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - applicationData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string applicationData = 6; - */ - public Builder setApplicationData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - applicationData_ = value; - onChanged(); - return this; - } - /** - * string applicationData = 6; - */ - public Builder clearApplicationData() { - - applicationData_ = getDefaultInstance().getApplicationData(); - onChanged(); - return this; - } - /** - * string applicationData = 6; - */ - 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; - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - public int getBranchTypeValue() { - return branchType_; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - public Builder setBranchTypeValue(int value) { - branchType_ = value; - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - public io.seata.codec.protobuf.generated.BranchTypeProto getBranchType() { - @SuppressWarnings("deprecation") - io.seata.codec.protobuf.generated.BranchTypeProto result = io.seata.codec.protobuf.generated.BranchTypeProto.valueOf(branchType_); - return result == null ? io.seata.codec.protobuf.generated.BranchTypeProto.UNRECOGNIZED : result; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - public Builder setBranchType(io.seata.codec.protobuf.generated.BranchTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - public Builder clearBranchType() { - - branchType_ = 0; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.BranchReportRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.BranchReportRequestProto) - private static final io.seata.codec.protobuf.generated.BranchReportRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.BranchReportRequestProto(); - } - - public static io.seata.codec.protobuf.generated.BranchReportRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchReportRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequestProtoOrBuilder.java deleted file mode 100644 index 81526f8a4b1..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportRequestProtoOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface BranchReportRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.BranchReportRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - boolean hasAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * string xid = 2; - */ - java.lang.String getXid(); - /** - * string xid = 2; - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * int64 branchId = 3; - */ - long getBranchId(); - - /** - * string resourceId = 4; - */ - java.lang.String getResourceId(); - /** - * string resourceId = 4; - */ - com.google.protobuf.ByteString - getResourceIdBytes(); - - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - int getStatusValue(); - /** - * .io.seata.protocol.protobuf.BranchStatusProto status = 5; - */ - io.seata.codec.protobuf.generated.BranchStatusProto getStatus(); - - /** - * string applicationData = 6; - */ - java.lang.String getApplicationData(); - /** - * string applicationData = 6; - */ - com.google.protobuf.ByteString - getApplicationDataBytes(); - - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - int getBranchTypeValue(); - /** - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 7; - */ - io.seata.codec.protobuf.generated.BranchTypeProto getBranchType(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponse.java deleted file mode 100644 index 07562d3fe46..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_BranchReportResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_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\032branchReportResponse.proto\022\032io.seata.p" + - "rotocol.protobuf\032!abstractTransactionRes" + - "ponse.proto\"~\n\031BranchReportResponseProto" + - "\022a\n\033abstractTransactionResponse\030\001 \001(\0132<." + - "io.seata.protocol.protobuf.AbstractTrans" + - "actionResponseProtoB;\n!io.seata.codec.pr" + - "otobuf.generatedB\024BranchReportResponseP\001" + - "b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_descriptor, - new java.lang.String[] { "AbstractTransactionResponse", }); - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponseProto.java deleted file mode 100644 index 5a8dbb3752d..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponseProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.BranchReportResponseProto} - */ -public final class BranchReportResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.BranchReportResponse.internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchReportResponse.internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchReportResponseProto.class, io.seata.codec.protobuf.generated.BranchReportResponseProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - 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 (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.BranchReportResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.BranchReportResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.BranchReportResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchReportResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchReportResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchReportResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchReportResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchReportResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchReportResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchReportResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchReportResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.BranchReportResponseProto 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 io.seata.protocol.protobuf.BranchReportResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.BranchReportResponseProto) - io.seata.codec.protobuf.generated.BranchReportResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.BranchReportResponse.internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchReportResponse.internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchReportResponseProto.class, io.seata.codec.protobuf.generated.BranchReportResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.BranchReportResponseProto.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(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.BranchReportResponse.internal_static_io_seata_protocol_protobuf_BranchReportResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchReportResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.BranchReportResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchReportResponseProto build() { - io.seata.codec.protobuf.generated.BranchReportResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchReportResponseProto buildPartial() { - io.seata.codec.protobuf.generated.BranchReportResponseProto result = new io.seata.codec.protobuf.generated.BranchReportResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.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 io.seata.codec.protobuf.generated.BranchReportResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.BranchReportResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.BranchReportResponseProto other) { - if (other == io.seata.codec.protobuf.generated.BranchReportResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - 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 { - io.seata.codec.protobuf.generated.BranchReportResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.BranchReportResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - @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:io.seata.protocol.protobuf.BranchReportResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.BranchReportResponseProto) - private static final io.seata.codec.protobuf.generated.BranchReportResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.BranchReportResponseProto(); - } - - public static io.seata.codec.protobuf.generated.BranchReportResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchReportResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponseProtoOrBuilder.java deleted file mode 100644 index 09412aab969..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchReportResponseProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchReportResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface BranchReportResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.BranchReportResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - boolean hasAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequest.java deleted file mode 100644 index ffc71fdd056..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequest.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_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\033branchRollbackRequest.proto\022\032io.seata." + - "protocol.protobuf\032\036abstractBranchEndRequ" + - "est.proto\"y\n\032BranchRollbackRequestProto\022" + - "[\n\030abstractBranchEndRequest\030\001 \001(\01329.io.s" + - "eata.protocol.protobuf.AbstractBranchEnd" + - "RequestProtoB<\n!io.seata.codec.protobuf." + - "generatedB\025BranchRollbackRequestP\001b\006prot" + - "o3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractBranchEndRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor, - new java.lang.String[] { "AbstractBranchEndRequest", }); - io.seata.codec.protobuf.generated.AbstractBranchEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequestProto.java deleted file mode 100644 index 3a66d306844..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequestProto.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchRollbackRequestProto} - */ -public final class BranchRollbackRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder subBuilder = null; - if (abstractBranchEndRequest_ != null) { - subBuilder = abstractBranchEndRequest_.toBuilder(); - } - abstractBranchEndRequest_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.BranchRollbackRequest.internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchRollbackRequest.internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchRollbackRequestProto.class, io.seata.codec.protobuf.generated.BranchRollbackRequestProto.Builder.class); - } - - public static final int ABSTRACTBRANCHENDREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto abstractBranchEndRequest_; - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public boolean hasAbstractBranchEndRequest() { - return abstractBranchEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getAbstractBranchEndRequest() { - return abstractBranchEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { - return getAbstractBranchEndRequest(); - } - - 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 (abstractBranchEndRequest_ != null) { - output.writeMessage(1, getAbstractBranchEndRequest()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.BranchRollbackRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.BranchRollbackRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchRollbackRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.BranchRollbackRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchRollbackRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.BranchRollbackRequestProto) - io.seata.codec.protobuf.generated.BranchRollbackRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.BranchRollbackRequest.internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchRollbackRequest.internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchRollbackRequestProto.class, io.seata.codec.protobuf.generated.BranchRollbackRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.BranchRollbackRequestProto.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(); - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = null; - } else { - abstractBranchEndRequest_ = null; - abstractBranchEndRequestBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.BranchRollbackRequest.internal_static_io_seata_protocol_protobuf_BranchRollbackRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRollbackRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.BranchRollbackRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRollbackRequestProto build() { - io.seata.codec.protobuf.generated.BranchRollbackRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRollbackRequestProto buildPartial() { - io.seata.codec.protobuf.generated.BranchRollbackRequestProto result = new io.seata.codec.protobuf.generated.BranchRollbackRequestProto(this); - if (abstractBranchEndRequestBuilder_ == null) { - result.abstractBranchEndRequest_ = abstractBranchEndRequest_; - } else { - result.abstractBranchEndRequest_ = abstractBranchEndRequestBuilder_.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 io.seata.codec.protobuf.generated.BranchRollbackRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.BranchRollbackRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.BranchRollbackRequestProto other) { - if (other == io.seata.codec.protobuf.generated.BranchRollbackRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractBranchEndRequest()) { - mergeAbstractBranchEndRequest(other.getAbstractBranchEndRequest()); - } - 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 { - io.seata.codec.protobuf.generated.BranchRollbackRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.BranchRollbackRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto abstractBranchEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder> abstractBranchEndRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public boolean hasAbstractBranchEndRequest() { - return abstractBranchEndRequestBuilder_ != null || abstractBranchEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getAbstractBranchEndRequest() { - if (abstractBranchEndRequestBuilder_ == null) { - return abstractBranchEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } else { - return abstractBranchEndRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder setAbstractBranchEndRequest(io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto value) { - if (abstractBranchEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractBranchEndRequest_ = value; - onChanged(); - } else { - abstractBranchEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder setAbstractBranchEndRequest( - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder builderForValue) { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractBranchEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder mergeAbstractBranchEndRequest(io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto value) { - if (abstractBranchEndRequestBuilder_ == null) { - if (abstractBranchEndRequest_ != null) { - abstractBranchEndRequest_ = - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.newBuilder(abstractBranchEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractBranchEndRequest_ = value; - } - onChanged(); - } else { - abstractBranchEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public Builder clearAbstractBranchEndRequest() { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequest_ = null; - onChanged(); - } else { - abstractBranchEndRequest_ = null; - abstractBranchEndRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder getAbstractBranchEndRequestBuilder() { - - onChanged(); - return getAbstractBranchEndRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder() { - if (abstractBranchEndRequestBuilder_ != null) { - return abstractBranchEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractBranchEndRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.getDefaultInstance() : abstractBranchEndRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder> - getAbstractBranchEndRequestFieldBuilder() { - if (abstractBranchEndRequestBuilder_ == null) { - abstractBranchEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder>( - getAbstractBranchEndRequest(), - getParentForChildren(), - isClean()); - abstractBranchEndRequest_ = null; - } - return abstractBranchEndRequestBuilder_; - } - @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:io.seata.protocol.protobuf.BranchRollbackRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.BranchRollbackRequestProto) - private static final io.seata.codec.protobuf.generated.BranchRollbackRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.BranchRollbackRequestProto(); - } - - public static io.seata.codec.protobuf.generated.BranchRollbackRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRollbackRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java deleted file mode 100644 index 969274078a8..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackRequestProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface BranchRollbackRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.BranchRollbackRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - boolean hasAbstractBranchEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProto getAbstractBranchEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractBranchEndRequestProto abstractBranchEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractBranchEndRequestProtoOrBuilder getAbstractBranchEndRequestOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponse.java deleted file mode 100644 index 66b04b0abed..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_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\034branchRollbackResponse.proto\022\032io.seata" + - ".protocol.protobuf\032\037abstractBranchEndRes" + - "ponse.proto\"|\n\033BranchRollbackResponsePro" + - "to\022]\n\031abstractBranchEndResponse\030\001 \001(\0132:." + - "io.seata.protocol.protobuf.AbstractBranc" + - "hEndResponseProtoB=\n!io.seata.codec.prot" + - "obuf.generatedB\026BranchRollbackResponseP\001" + - "b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractBranchEndResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor, - new java.lang.String[] { "AbstractBranchEndResponse", }); - io.seata.codec.protobuf.generated.AbstractBranchEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponseProto.java deleted file mode 100644 index 50dd87d787c..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponseProto.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchRollbackResponseProto} - */ -public final class BranchRollbackResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder subBuilder = null; - if (abstractBranchEndResponse_ != null) { - subBuilder = abstractBranchEndResponse_.toBuilder(); - } - abstractBranchEndResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.BranchRollbackResponse.internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchRollbackResponse.internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchRollbackResponseProto.class, io.seata.codec.protobuf.generated.BranchRollbackResponseProto.Builder.class); - } - - public static final int ABSTRACTBRANCHENDRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto abstractBranchEndResponse_; - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public boolean hasAbstractBranchEndResponse() { - return abstractBranchEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getAbstractBranchEndResponse() { - return abstractBranchEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { - return getAbstractBranchEndResponse(); - } - - 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 (abstractBranchEndResponse_ != null) { - output.writeMessage(1, getAbstractBranchEndResponse()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.BranchRollbackResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.BranchRollbackResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.BranchRollbackResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.BranchRollbackResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.BranchRollbackResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.BranchRollbackResponseProto) - io.seata.codec.protobuf.generated.BranchRollbackResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.BranchRollbackResponse.internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.BranchRollbackResponse.internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.BranchRollbackResponseProto.class, io.seata.codec.protobuf.generated.BranchRollbackResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.BranchRollbackResponseProto.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(); - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = null; - } else { - abstractBranchEndResponse_ = null; - abstractBranchEndResponseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.BranchRollbackResponse.internal_static_io_seata_protocol_protobuf_BranchRollbackResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRollbackResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.BranchRollbackResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRollbackResponseProto build() { - io.seata.codec.protobuf.generated.BranchRollbackResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRollbackResponseProto buildPartial() { - io.seata.codec.protobuf.generated.BranchRollbackResponseProto result = new io.seata.codec.protobuf.generated.BranchRollbackResponseProto(this); - if (abstractBranchEndResponseBuilder_ == null) { - result.abstractBranchEndResponse_ = abstractBranchEndResponse_; - } else { - result.abstractBranchEndResponse_ = abstractBranchEndResponseBuilder_.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 io.seata.codec.protobuf.generated.BranchRollbackResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.BranchRollbackResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.BranchRollbackResponseProto other) { - if (other == io.seata.codec.protobuf.generated.BranchRollbackResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractBranchEndResponse()) { - mergeAbstractBranchEndResponse(other.getAbstractBranchEndResponse()); - } - 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 { - io.seata.codec.protobuf.generated.BranchRollbackResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.BranchRollbackResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto abstractBranchEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder> abstractBranchEndResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public boolean hasAbstractBranchEndResponse() { - return abstractBranchEndResponseBuilder_ != null || abstractBranchEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getAbstractBranchEndResponse() { - if (abstractBranchEndResponseBuilder_ == null) { - return abstractBranchEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } else { - return abstractBranchEndResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder setAbstractBranchEndResponse(io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto value) { - if (abstractBranchEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractBranchEndResponse_ = value; - onChanged(); - } else { - abstractBranchEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder setAbstractBranchEndResponse( - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder builderForValue) { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractBranchEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder mergeAbstractBranchEndResponse(io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto value) { - if (abstractBranchEndResponseBuilder_ == null) { - if (abstractBranchEndResponse_ != null) { - abstractBranchEndResponse_ = - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.newBuilder(abstractBranchEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractBranchEndResponse_ = value; - } - onChanged(); - } else { - abstractBranchEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public Builder clearAbstractBranchEndResponse() { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponse_ = null; - onChanged(); - } else { - abstractBranchEndResponse_ = null; - abstractBranchEndResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder getAbstractBranchEndResponseBuilder() { - - onChanged(); - return getAbstractBranchEndResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder() { - if (abstractBranchEndResponseBuilder_ != null) { - return abstractBranchEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractBranchEndResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.getDefaultInstance() : abstractBranchEndResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder> - getAbstractBranchEndResponseFieldBuilder() { - if (abstractBranchEndResponseBuilder_ == null) { - abstractBranchEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder>( - getAbstractBranchEndResponse(), - getParentForChildren(), - isClean()); - abstractBranchEndResponse_ = null; - } - return abstractBranchEndResponseBuilder_; - } - @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:io.seata.protocol.protobuf.BranchRollbackResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.BranchRollbackResponseProto) - private static final io.seata.codec.protobuf.generated.BranchRollbackResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.BranchRollbackResponseProto(); - } - - public static io.seata.codec.protobuf.generated.BranchRollbackResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.BranchRollbackResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java deleted file mode 100644 index 25e5fffa507..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchRollbackResponseProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchRollbackResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface BranchRollbackResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.BranchRollbackResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - boolean hasAbstractBranchEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProto getAbstractBranchEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractBranchEndResponseProto abstractBranchEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractBranchEndResponseProtoOrBuilder getAbstractBranchEndResponseOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchStatus.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchStatus.java deleted file mode 100644 index 29d9d2b0c41..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchStatus.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchStatus.proto - -package io.seata.codec.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 { - java.lang.String[] descriptorData = { - "\n\022branchStatus.proto\022\032io.seata.protocol." + - "protobuf*\274\002\n\021BranchStatusProto\022\014\n\010BUnkno" + - "wn\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\037PhaseTwo_C" + - "ommitFailed_Retryable\020\006\022%\n!PhaseTwo_Comm" + - "itFailed_Unretryable\020\007\022\027\n\023PhaseTwo_Rollb" + - "acked\020\010\022%\n!PhaseTwo_RollbackFailed_Retry" + - "able\020\t\022\'\n#PhaseTwo_RollbackFailed_Unretr" + - "yable\020\nB3\n!io.seata.codec.protobuf.gener" + - "atedB\014BranchStatusP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchStatusProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchStatusProto.java deleted file mode 100644 index ac5bd9422ac..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchStatusProto.java +++ /dev/null @@ -1,276 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchStatus.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code io.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), - 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; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BranchStatusProto valueOf(int value) { - return forNumber(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; - 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() { - 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 io.seata.codec.protobuf.generated.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 java.lang.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:io.seata.protocol.protobuf.BranchStatusProto) -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchType.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchType.java deleted file mode 100644 index 5779ccaab53..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchType.proto - -package io.seata.codec.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 { - java.lang.String[] descriptorData = { - "\n\020branchType.proto\022\032io.seata.protocol.pr" + - "otobuf*\"\n\017BranchTypeProto\022\006\n\002AT\020\000\022\007\n\003TCC" + - "\020\001B1\n!io.seata.codec.protobuf.generatedB" + - "\nBranchTypeP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchTypeProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchTypeProto.java deleted file mode 100644 index 03f36e3f7a5..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/BranchTypeProto.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: branchType.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code io.seata.protocol.protobuf.BranchTypeProto} - */ -public enum BranchTypeProto - implements com.google.protobuf.ProtocolMessageEnum { - /** - * AT = 0; - */ - AT(0), - /** - * TCC = 1; - */ - TCC(1), - UNRECOGNIZED(-1), - ; - - /** - * AT = 0; - */ - public static final int AT_VALUE = 0; - /** - * TCC = 1; - */ - public static final int TCC_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BranchTypeProto valueOf(int value) { - return forNumber(value); - } - - public static BranchTypeProto forNumber(int value) { - switch (value) { - case 0: return AT; - case 1: return TCC; - 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() { - 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 io.seata.codec.protobuf.generated.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 java.lang.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:io.seata.protocol.protobuf.BranchTypeProto) -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequest.java deleted file mode 100644 index 19cb54e919a..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequest.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_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\030globalBeginRequest.proto\022\032io.seata.pro" + - "tocol.protobuf\032 abstractTransactionReque" + - "st.proto\"\244\001\n\027GlobalBeginRequestProto\022_\n\032" + - "abstractTransactionRequest\030\001 \001(\0132;.io.se" + - "ata.protocol.protobuf.AbstractTransactio" + - "nRequestProto\022\017\n\007timeout\030\002 \001(\005\022\027\n\017transa" + - "ctionName\030\003 \001(\tB9\n!io.seata.codec.protob" + - "uf.generatedB\022GlobalBeginRequestP\001b\006prot" + - "o3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor, - new java.lang.String[] { "AbstractTransactionRequest", "Timeout", "TransactionName", }); - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequestProto.java deleted file mode 100644 index fe763c3e624..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequestProto.java +++ /dev/null @@ -1,778 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalBeginRequestProto} - */ -public final class GlobalBeginRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionRequest_); - abstractTransactionRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - timeout_ = input.readInt32(); - break; - } - case 26: { - java.lang.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 (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 io.seata.codec.protobuf.generated.GlobalBeginRequest.internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalBeginRequest.internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalBeginRequestProto.class, io.seata.codec.protobuf.generated.GlobalBeginRequestProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int TIMEOUT_FIELD_NUMBER = 2; - private int timeout_; - /** - * int32 timeout = 2; - */ - public int getTimeout() { - return timeout_; - } - - public static final int TRANSACTIONNAME_FIELD_NUMBER = 3; - private volatile java.lang.Object transactionName_; - /** - * string transactionName = 3; - */ - public java.lang.String getTransactionName() { - java.lang.Object ref = transactionName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transactionName_ = s; - return s; - } - } - /** - * string transactionName = 3; - */ - public com.google.protobuf.ByteString - getTransactionNameBytes() { - java.lang.Object ref = transactionName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (timeout_ != 0) { - output.writeInt32(2, timeout_); - } - if (!getTransactionNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, transactionName_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getTransactionNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, transactionName_); - } - 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 io.seata.codec.protobuf.generated.GlobalBeginRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalBeginRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalBeginRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalBeginRequestProto 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 io.seata.protocol.protobuf.GlobalBeginRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalBeginRequestProto) - io.seata.codec.protobuf.generated.GlobalBeginRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalBeginRequest.internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalBeginRequest.internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalBeginRequestProto.class, io.seata.codec.protobuf.generated.GlobalBeginRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalBeginRequestProto.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(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - timeout_ = 0; - - transactionName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalBeginRequest.internal_static_io_seata_protocol_protobuf_GlobalBeginRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalBeginRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalBeginRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalBeginRequestProto build() { - io.seata.codec.protobuf.generated.GlobalBeginRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalBeginRequestProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalBeginRequestProto result = new io.seata.codec.protobuf.generated.GlobalBeginRequestProto(this); - if (abstractTransactionRequestBuilder_ == null) { - result.abstractTransactionRequest_ = abstractTransactionRequest_; - } else { - result.abstractTransactionRequest_ = abstractTransactionRequestBuilder_.build(); - } - result.timeout_ = timeout_; - result.transactionName_ = transactionName_; - 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 io.seata.codec.protobuf.generated.GlobalBeginRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalBeginRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalBeginRequestProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.GlobalBeginRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalBeginRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private int timeout_ ; - /** - * int32 timeout = 2; - */ - public int getTimeout() { - return timeout_; - } - /** - * int32 timeout = 2; - */ - public Builder setTimeout(int value) { - - timeout_ = value; - onChanged(); - return this; - } - /** - * int32 timeout = 2; - */ - public Builder clearTimeout() { - - timeout_ = 0; - onChanged(); - return this; - } - - private java.lang.Object transactionName_ = ""; - /** - * string transactionName = 3; - */ - public java.lang.String getTransactionName() { - java.lang.Object ref = transactionName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transactionName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string transactionName = 3; - */ - public com.google.protobuf.ByteString - getTransactionNameBytes() { - java.lang.Object ref = transactionName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string transactionName = 3; - */ - public Builder setTransactionName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - transactionName_ = value; - onChanged(); - return this; - } - /** - * string transactionName = 3; - */ - public Builder clearTransactionName() { - - transactionName_ = getDefaultInstance().getTransactionName(); - onChanged(); - return this; - } - /** - * string transactionName = 3; - */ - public Builder setTransactionNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transactionName_ = value; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.GlobalBeginRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalBeginRequestProto) - private static final io.seata.codec.protobuf.generated.GlobalBeginRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalBeginRequestProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalBeginRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalBeginRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java deleted file mode 100644 index 59b1c1c0549..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginRequestProtoOrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalBeginRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalBeginRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - boolean hasAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - * int32 timeout = 2; - */ - int getTimeout(); - - /** - * string transactionName = 3; - */ - java.lang.String getTransactionName(); - /** - * string transactionName = 3; - */ - com.google.protobuf.ByteString - getTransactionNameBytes(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponse.java deleted file mode 100644 index 2b6130643c6..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_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\031globalBeginResponse.proto\022\032io.seata.pr" + - "otocol.protobuf\032!abstractTransactionResp" + - "onse.proto\"\235\001\n\030GlobalBeginResponseProto\022" + - "a\n\033abstractTransactionResponse\030\001 \001(\0132<.i" + - "o.seata.protocol.protobuf.AbstractTransa" + - "ctionResponseProto\022\013\n\003xid\030\002 \001(\t\022\021\n\textra" + - "Data\030\003 \001(\tB:\n!io.seata.codec.protobuf.ge" + - "neratedB\023GlobalBeginResponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor, - new java.lang.String[] { "AbstractTransactionResponse", "Xid", "ExtraData", }); - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponseProto.java deleted file mode 100644 index 7d949102a0b..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponseProto.java +++ /dev/null @@ -1,848 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalBeginResponseProto} - */ -public final class GlobalBeginResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractTransactionResponse_); - abstractTransactionResponse_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - xid_ = s; - break; - } - case 26: { - java.lang.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 (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 io.seata.codec.protobuf.generated.GlobalBeginResponse.internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalBeginResponse.internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalBeginResponseProto.class, io.seata.codec.protobuf.generated.GlobalBeginResponseProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int XID_FIELD_NUMBER = 2; - private volatile java.lang.Object xid_; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXTRADATA_FIELD_NUMBER = 3; - private volatile java.lang.Object extraData_; - /** - * string extraData = 3; - */ - public java.lang.String getExtraData() { - java.lang.Object ref = extraData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } - } - /** - * string extraData = 3; - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - java.lang.Object ref = extraData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (!getXidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xid_); - } - if (!getExtraDataBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraData_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getXidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xid_); - } - if (!getExtraDataBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, extraData_); - } - 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 io.seata.codec.protobuf.generated.GlobalBeginResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalBeginResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalBeginResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalBeginResponseProto 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 io.seata.protocol.protobuf.GlobalBeginResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalBeginResponseProto) - io.seata.codec.protobuf.generated.GlobalBeginResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalBeginResponse.internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalBeginResponse.internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalBeginResponseProto.class, io.seata.codec.protobuf.generated.GlobalBeginResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalBeginResponseProto.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(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - xid_ = ""; - - extraData_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalBeginResponse.internal_static_io_seata_protocol_protobuf_GlobalBeginResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalBeginResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalBeginResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalBeginResponseProto build() { - io.seata.codec.protobuf.generated.GlobalBeginResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalBeginResponseProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalBeginResponseProto result = new io.seata.codec.protobuf.generated.GlobalBeginResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.xid_ = xid_; - result.extraData_ = extraData_; - 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 io.seata.codec.protobuf.generated.GlobalBeginResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalBeginResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalBeginResponseProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.GlobalBeginResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalBeginResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private java.lang.Object xid_ = ""; - /** - * string xid = 2; - */ - public java.lang.String getXid() { - java.lang.Object ref = xid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - xid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string xid = 2; - */ - public com.google.protobuf.ByteString - getXidBytes() { - java.lang.Object ref = xid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string xid = 2; - */ - public Builder setXid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - xid_ = value; - onChanged(); - return this; - } - /** - * string xid = 2; - */ - public Builder clearXid() { - - xid_ = getDefaultInstance().getXid(); - onChanged(); - return this; - } - /** - * string xid = 2; - */ - public Builder setXidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - xid_ = value; - onChanged(); - return this; - } - - private java.lang.Object extraData_ = ""; - /** - * string extraData = 3; - */ - public java.lang.String getExtraData() { - java.lang.Object ref = extraData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extraData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string extraData = 3; - */ - public com.google.protobuf.ByteString - getExtraDataBytes() { - java.lang.Object ref = extraData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extraData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string extraData = 3; - */ - public Builder setExtraData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - extraData_ = value; - onChanged(); - return this; - } - /** - * string extraData = 3; - */ - public Builder clearExtraData() { - - extraData_ = getDefaultInstance().getExtraData(); - onChanged(); - return this; - } - /** - * string extraData = 3; - */ - public Builder setExtraDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - extraData_ = value; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.GlobalBeginResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalBeginResponseProto) - private static final io.seata.codec.protobuf.generated.GlobalBeginResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalBeginResponseProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalBeginResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalBeginResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java deleted file mode 100644 index 621147f00d4..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalBeginResponseProtoOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalBeginResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalBeginResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalBeginResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - boolean hasAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * string xid = 2; - */ - java.lang.String getXid(); - /** - * string xid = 2; - */ - com.google.protobuf.ByteString - getXidBytes(); - - /** - * string extraData = 3; - */ - java.lang.String getExtraData(); - /** - * string extraData = 3; - */ - com.google.protobuf.ByteString - getExtraDataBytes(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequest.java deleted file mode 100644 index 49a94816a92..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_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\031globalCommitRequest.proto\022\032io.seata.pr" + - "otocol.protobuf\032\036abstractGlobalEndReques" + - "t.proto\"w\n\030GlobalCommitRequestProto\022[\n\030a" + - "bstractGlobalEndRequest\030\001 \001(\01329.io.seata" + - ".protocol.protobuf.AbstractGlobalEndRequ" + - "estProtoB:\n!io.seata.codec.protobuf.gene" + - "ratedB\023GlobalCommitRequestP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor, - new java.lang.String[] { "AbstractGlobalEndRequest", }); - io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequestProto.java deleted file mode 100644 index 804e082bf1a..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequestProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalCommitRequestProto} - */ -public final class GlobalCommitRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder subBuilder = null; - if (abstractGlobalEndRequest_ != null) { - subBuilder = abstractGlobalEndRequest_.toBuilder(); - } - abstractGlobalEndRequest_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.GlobalCommitRequest.internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalCommitRequest.internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalCommitRequestProto.class, io.seata.codec.protobuf.generated.GlobalCommitRequestProto.Builder.class); - } - - public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - return getAbstractGlobalEndRequest(); - } - - 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 (abstractGlobalEndRequest_ != null) { - output.writeMessage(1, getAbstractGlobalEndRequest()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.GlobalCommitRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalCommitRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalCommitRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalCommitRequestProto 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 io.seata.protocol.protobuf.GlobalCommitRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalCommitRequestProto) - io.seata.codec.protobuf.generated.GlobalCommitRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalCommitRequest.internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalCommitRequest.internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalCommitRequestProto.class, io.seata.codec.protobuf.generated.GlobalCommitRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalCommitRequestProto.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(); - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalCommitRequest.internal_static_io_seata_protocol_protobuf_GlobalCommitRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalCommitRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalCommitRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalCommitRequestProto build() { - io.seata.codec.protobuf.generated.GlobalCommitRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalCommitRequestProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalCommitRequestProto result = new io.seata.codec.protobuf.generated.GlobalCommitRequestProto(this); - if (abstractGlobalEndRequestBuilder_ == null) { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; - } else { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.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 io.seata.codec.protobuf.generated.GlobalCommitRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalCommitRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalCommitRequestProto other) { - if (other == io.seata.codec.protobuf.generated.GlobalCommitRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndRequest()) { - mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); - } - 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 { - io.seata.codec.protobuf.generated.GlobalCommitRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalCommitRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - return abstractGlobalEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } else { - return abstractGlobalEndRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest(io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndRequest_ = value; - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest( - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder builderForValue) { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder mergeAbstractGlobalEndRequest(io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (abstractGlobalEndRequest_ != null) { - abstractGlobalEndRequest_ = - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndRequest_ = value; - } - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder clearAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - onChanged(); - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { - - onChanged(); - return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - if (abstractGlobalEndRequestBuilder_ != null) { - return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder> - getAbstractGlobalEndRequestFieldBuilder() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder>( - getAbstractGlobalEndRequest(), - getParentForChildren(), - isClean()); - abstractGlobalEndRequest_ = null; - } - return abstractGlobalEndRequestBuilder_; - } - @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:io.seata.protocol.protobuf.GlobalCommitRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalCommitRequestProto) - private static final io.seata.codec.protobuf.generated.GlobalCommitRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalCommitRequestProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalCommitRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalCommitRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java deleted file mode 100644 index 9ecafc23e13..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitRequestProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalCommitRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalCommitRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - boolean hasAbstractGlobalEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponse.java deleted file mode 100644 index 2d5b343ba95..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_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\032globalCommitResponse.proto\022\032io.seata.p" + - "rotocol.protobuf\032\037abstractGlobalEndRespo" + - "nse.proto\"z\n\031GlobalCommitResponseProto\022]" + - "\n\031abstractGlobalEndResponse\030\001 \001(\0132:.io.s" + - "eata.protocol.protobuf.AbstractGlobalEnd" + - "ResponseProtoB;\n!io.seata.codec.protobuf" + - ".generatedB\024GlobalCommitResponseP\001b\006prot" + - "o3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor, - new java.lang.String[] { "AbstractGlobalEndResponse", }); - io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponseProto.java deleted file mode 100644 index 4527aa37a27..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponseProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalCommitResponseProto} - */ -public final class GlobalCommitResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder subBuilder = null; - if (abstractGlobalEndResponse_ != null) { - subBuilder = abstractGlobalEndResponse_.toBuilder(); - } - abstractGlobalEndResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.GlobalCommitResponse.internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalCommitResponse.internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalCommitResponseProto.class, io.seata.codec.protobuf.generated.GlobalCommitResponseProto.Builder.class); - } - - public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - return getAbstractGlobalEndResponse(); - } - - 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 (abstractGlobalEndResponse_ != null) { - output.writeMessage(1, getAbstractGlobalEndResponse()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.GlobalCommitResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalCommitResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalCommitResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalCommitResponseProto 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 io.seata.protocol.protobuf.GlobalCommitResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalCommitResponseProto) - io.seata.codec.protobuf.generated.GlobalCommitResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalCommitResponse.internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalCommitResponse.internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalCommitResponseProto.class, io.seata.codec.protobuf.generated.GlobalCommitResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalCommitResponseProto.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(); - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalCommitResponse.internal_static_io_seata_protocol_protobuf_GlobalCommitResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalCommitResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalCommitResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalCommitResponseProto build() { - io.seata.codec.protobuf.generated.GlobalCommitResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalCommitResponseProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalCommitResponseProto result = new io.seata.codec.protobuf.generated.GlobalCommitResponseProto(this); - if (abstractGlobalEndResponseBuilder_ == null) { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; - } else { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.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 io.seata.codec.protobuf.generated.GlobalCommitResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalCommitResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalCommitResponseProto other) { - if (other == io.seata.codec.protobuf.generated.GlobalCommitResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndResponse()) { - mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); - } - 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 { - io.seata.codec.protobuf.generated.GlobalCommitResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalCommitResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - return abstractGlobalEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } else { - return abstractGlobalEndResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse(io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndResponse_ = value; - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse( - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder builderForValue) { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder mergeAbstractGlobalEndResponse(io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (abstractGlobalEndResponse_ != null) { - abstractGlobalEndResponse_ = - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndResponse_ = value; - } - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder clearAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - onChanged(); - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { - - onChanged(); - return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - if (abstractGlobalEndResponseBuilder_ != null) { - return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder> - getAbstractGlobalEndResponseFieldBuilder() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder>( - getAbstractGlobalEndResponse(), - getParentForChildren(), - isClean()); - abstractGlobalEndResponse_ = null; - } - return abstractGlobalEndResponseBuilder_; - } - @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:io.seata.protocol.protobuf.GlobalCommitResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalCommitResponseProto) - private static final io.seata.codec.protobuf.generated.GlobalCommitResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalCommitResponseProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalCommitResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalCommitResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java deleted file mode 100644 index ba48e77352b..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalCommitResponseProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalCommitResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalCommitResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalCommitResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - boolean hasAbstractGlobalEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequest.java deleted file mode 100644 index 42310a89e7a..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_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\034globalLockQueryRequest.proto\022\032io.seata" + - ".protocol.protobuf\032\033branchRegisterReques" + - "t.proto\"t\n\033GlobalLockQueryRequestProto\022U" + - "\n\025branchRegisterRequest\030\001 \001(\01326.io.seata" + - ".protocol.protobuf.BranchRegisterRequest" + - "ProtoB=\n!io.seata.codec.protobuf.generat" + - "edB\026GlobalLockQueryRequestP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.BranchRegisterRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor, - new java.lang.String[] { "BranchRegisterRequest", }); - io.seata.codec.protobuf.generated.BranchRegisterRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequestProto.java deleted file mode 100644 index 566d0c8c85f..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequestProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalLockQueryRequestProto} - */ -public final class GlobalLockQueryRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.BranchRegisterRequestProto.Builder subBuilder = null; - if (branchRegisterRequest_ != null) { - subBuilder = branchRegisterRequest_.toBuilder(); - } - branchRegisterRequest_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.GlobalLockQueryRequest.internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalLockQueryRequest.internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto.class, io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto.Builder.class); - } - - public static final int BRANCHREGISTERREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.BranchRegisterRequestProto branchRegisterRequest_; - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public boolean hasBranchRegisterRequest() { - return branchRegisterRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public io.seata.codec.protobuf.generated.BranchRegisterRequestProto getBranchRegisterRequest() { - return branchRegisterRequest_ == null ? io.seata.codec.protobuf.generated.BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public io.seata.codec.protobuf.generated.BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder() { - return getBranchRegisterRequest(); - } - - 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 (branchRegisterRequest_ != null) { - output.writeMessage(1, getBranchRegisterRequest()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto 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 io.seata.protocol.protobuf.GlobalLockQueryRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalLockQueryRequestProto) - io.seata.codec.protobuf.generated.GlobalLockQueryRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalLockQueryRequest.internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalLockQueryRequest.internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto.class, io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto.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(); - if (branchRegisterRequestBuilder_ == null) { - branchRegisterRequest_ = null; - } else { - branchRegisterRequest_ = null; - branchRegisterRequestBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalLockQueryRequest.internal_static_io_seata_protocol_protobuf_GlobalLockQueryRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto build() { - io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto result = new io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto(this); - if (branchRegisterRequestBuilder_ == null) { - result.branchRegisterRequest_ = branchRegisterRequest_; - } else { - result.branchRegisterRequest_ = branchRegisterRequestBuilder_.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 io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto other) { - if (other == io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto.getDefaultInstance()) return this; - if (other.hasBranchRegisterRequest()) { - mergeBranchRegisterRequest(other.getBranchRegisterRequest()); - } - 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 { - io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.BranchRegisterRequestProto branchRegisterRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.BranchRegisterRequestProto, io.seata.codec.protobuf.generated.BranchRegisterRequestProto.Builder, io.seata.codec.protobuf.generated.BranchRegisterRequestProtoOrBuilder> branchRegisterRequestBuilder_; - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public boolean hasBranchRegisterRequest() { - return branchRegisterRequestBuilder_ != null || branchRegisterRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public io.seata.codec.protobuf.generated.BranchRegisterRequestProto getBranchRegisterRequest() { - if (branchRegisterRequestBuilder_ == null) { - return branchRegisterRequest_ == null ? io.seata.codec.protobuf.generated.BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; - } else { - return branchRegisterRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public Builder setBranchRegisterRequest(io.seata.codec.protobuf.generated.BranchRegisterRequestProto value) { - if (branchRegisterRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - branchRegisterRequest_ = value; - onChanged(); - } else { - branchRegisterRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public Builder setBranchRegisterRequest( - io.seata.codec.protobuf.generated.BranchRegisterRequestProto.Builder builderForValue) { - if (branchRegisterRequestBuilder_ == null) { - branchRegisterRequest_ = builderForValue.build(); - onChanged(); - } else { - branchRegisterRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public Builder mergeBranchRegisterRequest(io.seata.codec.protobuf.generated.BranchRegisterRequestProto value) { - if (branchRegisterRequestBuilder_ == null) { - if (branchRegisterRequest_ != null) { - branchRegisterRequest_ = - io.seata.codec.protobuf.generated.BranchRegisterRequestProto.newBuilder(branchRegisterRequest_).mergeFrom(value).buildPartial(); - } else { - branchRegisterRequest_ = value; - } - onChanged(); - } else { - branchRegisterRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public Builder clearBranchRegisterRequest() { - if (branchRegisterRequestBuilder_ == null) { - branchRegisterRequest_ = null; - onChanged(); - } else { - branchRegisterRequest_ = null; - branchRegisterRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public io.seata.codec.protobuf.generated.BranchRegisterRequestProto.Builder getBranchRegisterRequestBuilder() { - - onChanged(); - return getBranchRegisterRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - public io.seata.codec.protobuf.generated.BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder() { - if (branchRegisterRequestBuilder_ != null) { - return branchRegisterRequestBuilder_.getMessageOrBuilder(); - } else { - return branchRegisterRequest_ == null ? - io.seata.codec.protobuf.generated.BranchRegisterRequestProto.getDefaultInstance() : branchRegisterRequest_; - } - } - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.BranchRegisterRequestProto, io.seata.codec.protobuf.generated.BranchRegisterRequestProto.Builder, io.seata.codec.protobuf.generated.BranchRegisterRequestProtoOrBuilder> - getBranchRegisterRequestFieldBuilder() { - if (branchRegisterRequestBuilder_ == null) { - branchRegisterRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.BranchRegisterRequestProto, io.seata.codec.protobuf.generated.BranchRegisterRequestProto.Builder, io.seata.codec.protobuf.generated.BranchRegisterRequestProtoOrBuilder>( - getBranchRegisterRequest(), - getParentForChildren(), - isClean()); - branchRegisterRequest_ = null; - } - return branchRegisterRequestBuilder_; - } - @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:io.seata.protocol.protobuf.GlobalLockQueryRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalLockQueryRequestProto) - private static final io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java deleted file mode 100644 index bfe66892020..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryRequestProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalLockQueryRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalLockQueryRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - boolean hasBranchRegisterRequest(); - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - io.seata.codec.protobuf.generated.BranchRegisterRequestProto getBranchRegisterRequest(); - /** - * .io.seata.protocol.protobuf.BranchRegisterRequestProto branchRegisterRequest = 1; - */ - io.seata.codec.protobuf.generated.BranchRegisterRequestProtoOrBuilder getBranchRegisterRequestOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponse.java deleted file mode 100644 index 1c0727f3dc7..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_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\035globalLockQueryResponse.proto\022\032io.seat" + - "a.protocol.protobuf\032!abstractTransaction" + - "Response.proto\"\223\001\n\034GlobalLockQueryRespon" + - "seProto\022a\n\033abstractTransactionResponse\030\001" + - " \001(\0132<.io.seata.protocol.protobuf.Abstra" + - "ctTransactionResponseProto\022\020\n\010lockable\030\002" + - " \001(\010B>\n!io.seata.codec.protobuf.generate" + - "dB\027GlobalLockQueryResponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor, - new java.lang.String[] { "AbstractTransactionResponse", "Lockable", }); - io.seata.codec.protobuf.generated.AbstractTransactionResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponseProto.java deleted file mode 100644 index 01302f0274b..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponseProto.java +++ /dev/null @@ -1,652 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalLockQueryResponseProto} - */ -public final class GlobalLockQueryResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder subBuilder = null; - if (abstractTransactionResponse_ != null) { - subBuilder = abstractTransactionResponse_.toBuilder(); - } - abstractTransactionResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.GlobalLockQueryResponse.internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalLockQueryResponse.internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto.class, io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - return getAbstractTransactionResponse(); - } - - public static final int LOCKABLE_FIELD_NUMBER = 2; - private boolean lockable_; - /** - * bool lockable = 2; - */ - public boolean getLockable() { - return lockable_; - } - - 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 (abstractTransactionResponse_ != null) { - output.writeMessage(1, getAbstractTransactionResponse()); - } - if (lockable_ != false) { - output.writeBool(2, lockable_); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto 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 io.seata.protocol.protobuf.GlobalLockQueryResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalLockQueryResponseProto) - io.seata.codec.protobuf.generated.GlobalLockQueryResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalLockQueryResponse.internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalLockQueryResponse.internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto.class, io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto.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(); - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - lockable_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalLockQueryResponse.internal_static_io_seata_protocol_protobuf_GlobalLockQueryResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto build() { - io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto result = new io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto(this); - if (abstractTransactionResponseBuilder_ == null) { - result.abstractTransactionResponse_ = abstractTransactionResponse_; - } else { - result.abstractTransactionResponse_ = abstractTransactionResponseBuilder_.build(); - } - result.lockable_ = lockable_; - 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 io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto other) { - if (other == io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractTransactionResponse()) { - mergeAbstractTransactionResponse(other.getAbstractTransactionResponse()); - } - if (other.getLockable() != false) { - setLockable(other.getLockable()); - } - 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 { - io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionResponseProto abstractTransactionResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> abstractTransactionResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public boolean hasAbstractTransactionResponse() { - return abstractTransactionResponseBuilder_ != null || abstractTransactionResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - return abstractTransactionResponse_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } else { - return abstractTransactionResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionResponse_ = value; - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder setAbstractTransactionResponse( - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder builderForValue) { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder mergeAbstractTransactionResponse(io.seata.codec.protobuf.generated.AbstractTransactionResponseProto value) { - if (abstractTransactionResponseBuilder_ == null) { - if (abstractTransactionResponse_ != null) { - abstractTransactionResponse_ = - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.newBuilder(abstractTransactionResponse_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionResponse_ = value; - } - onChanged(); - } else { - abstractTransactionResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public Builder clearAbstractTransactionResponse() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponse_ = null; - onChanged(); - } else { - abstractTransactionResponse_ = null; - abstractTransactionResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder getAbstractTransactionResponseBuilder() { - - onChanged(); - return getAbstractTransactionResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder() { - if (abstractTransactionResponseBuilder_ != null) { - return abstractTransactionResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.getDefaultInstance() : abstractTransactionResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder> - getAbstractTransactionResponseFieldBuilder() { - if (abstractTransactionResponseBuilder_ == null) { - abstractTransactionResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto, io.seata.codec.protobuf.generated.AbstractTransactionResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder>( - getAbstractTransactionResponse(), - getParentForChildren(), - isClean()); - abstractTransactionResponse_ = null; - } - return abstractTransactionResponseBuilder_; - } - - private boolean lockable_ ; - /** - * bool lockable = 2; - */ - public boolean getLockable() { - return lockable_; - } - /** - * bool lockable = 2; - */ - public Builder setLockable(boolean value) { - - lockable_ = value; - onChanged(); - return this; - } - /** - * bool lockable = 2; - */ - public Builder clearLockable() { - - lockable_ = false; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.GlobalLockQueryResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalLockQueryResponseProto) - private static final io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java deleted file mode 100644 index c5b73eb9f8c..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalLockQueryResponseProtoOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalLockQueryResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalLockQueryResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalLockQueryResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - boolean hasAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder(); - - /** - * bool lockable = 2; - */ - boolean getLockable(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequest.java deleted file mode 100644 index 8071ce5f933..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequest.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_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\033globalRollbackRequest.proto\022\032io.seata." + - "protocol.protobuf\032\036abstractGlobalEndRequ" + - "est.proto\"y\n\032GlobalRollbackRequestProto\022" + - "[\n\030abstractGlobalEndRequest\030\001 \001(\01329.io.s" + - "eata.protocol.protobuf.AbstractGlobalEnd" + - "RequestProtoB<\n!io.seata.codec.protobuf." + - "generatedB\025GlobalRollbackRequestP\001b\006prot" + - "o3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor, - new java.lang.String[] { "AbstractGlobalEndRequest", }); - io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequestProto.java deleted file mode 100644 index fcf1920ea98..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequestProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalRollbackRequestProto} - */ -public final class GlobalRollbackRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder subBuilder = null; - if (abstractGlobalEndRequest_ != null) { - subBuilder = abstractGlobalEndRequest_.toBuilder(); - } - abstractGlobalEndRequest_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.GlobalRollbackRequest.internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalRollbackRequest.internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalRollbackRequestProto.class, io.seata.codec.protobuf.generated.GlobalRollbackRequestProto.Builder.class); - } - - public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - return getAbstractGlobalEndRequest(); - } - - 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 (abstractGlobalEndRequest_ != null) { - output.writeMessage(1, getAbstractGlobalEndRequest()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.GlobalRollbackRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalRollbackRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalRollbackRequestProto 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 io.seata.protocol.protobuf.GlobalRollbackRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalRollbackRequestProto) - io.seata.codec.protobuf.generated.GlobalRollbackRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalRollbackRequest.internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalRollbackRequest.internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalRollbackRequestProto.class, io.seata.codec.protobuf.generated.GlobalRollbackRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalRollbackRequestProto.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(); - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalRollbackRequest.internal_static_io_seata_protocol_protobuf_GlobalRollbackRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalRollbackRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalRollbackRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalRollbackRequestProto build() { - io.seata.codec.protobuf.generated.GlobalRollbackRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalRollbackRequestProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalRollbackRequestProto result = new io.seata.codec.protobuf.generated.GlobalRollbackRequestProto(this); - if (abstractGlobalEndRequestBuilder_ == null) { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; - } else { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.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 io.seata.codec.protobuf.generated.GlobalRollbackRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalRollbackRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalRollbackRequestProto other) { - if (other == io.seata.codec.protobuf.generated.GlobalRollbackRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndRequest()) { - mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); - } - 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 { - io.seata.codec.protobuf.generated.GlobalRollbackRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalRollbackRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - return abstractGlobalEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } else { - return abstractGlobalEndRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest(io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndRequest_ = value; - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest( - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder builderForValue) { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder mergeAbstractGlobalEndRequest(io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (abstractGlobalEndRequest_ != null) { - abstractGlobalEndRequest_ = - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndRequest_ = value; - } - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder clearAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - onChanged(); - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { - - onChanged(); - return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - if (abstractGlobalEndRequestBuilder_ != null) { - return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder> - getAbstractGlobalEndRequestFieldBuilder() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder>( - getAbstractGlobalEndRequest(), - getParentForChildren(), - isClean()); - abstractGlobalEndRequest_ = null; - } - return abstractGlobalEndRequestBuilder_; - } - @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:io.seata.protocol.protobuf.GlobalRollbackRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalRollbackRequestProto) - private static final io.seata.codec.protobuf.generated.GlobalRollbackRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalRollbackRequestProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalRollbackRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalRollbackRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java deleted file mode 100644 index fd68a5ca628..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackRequestProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalRollbackRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalRollbackRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - boolean hasAbstractGlobalEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponse.java deleted file mode 100644 index 6c2fa29b72b..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_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\034globalRollbackResponse.proto\022\032io.seata" + - ".protocol.protobuf\032\037abstractGlobalEndRes" + - "ponse.proto\"|\n\033GlobalRollbackResponsePro" + - "to\022]\n\031abstractGlobalEndResponse\030\001 \001(\0132:." + - "io.seata.protocol.protobuf.AbstractGloba" + - "lEndResponseProtoB=\n!io.seata.codec.prot" + - "obuf.generatedB\026GlobalRollbackResponseP\001" + - "b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor, - new java.lang.String[] { "AbstractGlobalEndResponse", }); - io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponseProto.java deleted file mode 100644 index fe014a7cf3f..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponseProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalRollbackResponseProto} - */ -public final class GlobalRollbackResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder subBuilder = null; - if (abstractGlobalEndResponse_ != null) { - subBuilder = abstractGlobalEndResponse_.toBuilder(); - } - abstractGlobalEndResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.GlobalRollbackResponse.internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalRollbackResponse.internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalRollbackResponseProto.class, io.seata.codec.protobuf.generated.GlobalRollbackResponseProto.Builder.class); - } - - public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - return getAbstractGlobalEndResponse(); - } - - 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 (abstractGlobalEndResponse_ != null) { - output.writeMessage(1, getAbstractGlobalEndResponse()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.GlobalRollbackResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalRollbackResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalRollbackResponseProto 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 io.seata.protocol.protobuf.GlobalRollbackResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalRollbackResponseProto) - io.seata.codec.protobuf.generated.GlobalRollbackResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalRollbackResponse.internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalRollbackResponse.internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalRollbackResponseProto.class, io.seata.codec.protobuf.generated.GlobalRollbackResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalRollbackResponseProto.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(); - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalRollbackResponse.internal_static_io_seata_protocol_protobuf_GlobalRollbackResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalRollbackResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalRollbackResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalRollbackResponseProto build() { - io.seata.codec.protobuf.generated.GlobalRollbackResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalRollbackResponseProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalRollbackResponseProto result = new io.seata.codec.protobuf.generated.GlobalRollbackResponseProto(this); - if (abstractGlobalEndResponseBuilder_ == null) { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; - } else { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.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 io.seata.codec.protobuf.generated.GlobalRollbackResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalRollbackResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalRollbackResponseProto other) { - if (other == io.seata.codec.protobuf.generated.GlobalRollbackResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndResponse()) { - mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); - } - 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 { - io.seata.codec.protobuf.generated.GlobalRollbackResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalRollbackResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - return abstractGlobalEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } else { - return abstractGlobalEndResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse(io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndResponse_ = value; - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse( - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder builderForValue) { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder mergeAbstractGlobalEndResponse(io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (abstractGlobalEndResponse_ != null) { - abstractGlobalEndResponse_ = - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndResponse_ = value; - } - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder clearAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - onChanged(); - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { - - onChanged(); - return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - if (abstractGlobalEndResponseBuilder_ != null) { - return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder> - getAbstractGlobalEndResponseFieldBuilder() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder>( - getAbstractGlobalEndResponse(), - getParentForChildren(), - isClean()); - abstractGlobalEndResponse_ = null; - } - return abstractGlobalEndResponseBuilder_; - } - @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:io.seata.protocol.protobuf.GlobalRollbackResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalRollbackResponseProto) - private static final io.seata.codec.protobuf.generated.GlobalRollbackResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalRollbackResponseProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalRollbackResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalRollbackResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java deleted file mode 100644 index 326e86ad65c..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalRollbackResponseProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalRollbackResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalRollbackResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalRollbackResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - boolean hasAbstractGlobalEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatus.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatus.java deleted file mode 100644 index 6b97208ee0a..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatus.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatus.proto - -package io.seata.codec.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 { - java.lang.String[] descriptorData = { - "\n\022globalStatus.proto\022\032io.seata.protocol." + - "protobuf*\305\002\n\021GlobalStatusProto\022\013\n\007UnKnow" + - "n\020\000\022\t\n\005Begin\020\001\022\016\n\nCommitting\020\002\022\022\n\016Commit" + - "Retrying\020\003\022\017\n\013Rollbacking\020\004\022\024\n\020RollbackR" + - "etrying\020\005\022\026\n\022TimeoutRollbacking\020\006\022\033\n\027Tim" + - "eoutRollbackRetrying\020\007\022\023\n\017AsyncCommittin" + - "g\020\010\022\r\n\tCommitted\020\t\022\020\n\014CommitFailed\020\n\022\016\n\n" + - "Rollbacked\020\013\022\022\n\016RollbackFailed\020\014\022\025\n\021Time" + - "outRollbacked\020\r\022\031\n\025TimeoutRollbackFailed" + - "\020\016\022\014\n\010Finished\020\017B3\n!io.seata.codec.proto" + - "buf.generatedB\014GlobalStatusP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusProto.java deleted file mode 100644 index 48eda72ada0..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusProto.java +++ /dev/null @@ -1,365 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatus.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code io.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 java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static GlobalStatusProto valueOf(int value) { - return forNumber(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() { - 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 io.seata.codec.protobuf.generated.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 java.lang.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:io.seata.protocol.protobuf.GlobalStatusProto) -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequest.java deleted file mode 100644 index ddd8b7151b8..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_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\031globalStatusRequest.proto\022\032io.seata.pr" + - "otocol.protobuf\032\036abstractGlobalEndReques" + - "t.proto\"w\n\030GlobalStatusRequestProto\022[\n\030a" + - "bstractGlobalEndRequest\030\001 \001(\01329.io.seata" + - ".protocol.protobuf.AbstractGlobalEndRequ" + - "estProtoB:\n!io.seata.codec.protobuf.gene" + - "ratedB\023GlobalStatusRequestP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor, - new java.lang.String[] { "AbstractGlobalEndRequest", }); - io.seata.codec.protobuf.generated.AbstractGlobalEndRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequestProto.java deleted file mode 100644 index 98038137059..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequestProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalStatusRequestProto} - */ -public final class GlobalStatusRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder subBuilder = null; - if (abstractGlobalEndRequest_ != null) { - subBuilder = abstractGlobalEndRequest_.toBuilder(); - } - abstractGlobalEndRequest_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.GlobalStatusRequest.internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalStatusRequest.internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalStatusRequestProto.class, io.seata.codec.protobuf.generated.GlobalStatusRequestProto.Builder.class); - } - - public static final int ABSTRACTGLOBALENDREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - return abstractGlobalEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - return getAbstractGlobalEndRequest(); - } - - 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 (abstractGlobalEndRequest_ != null) { - output.writeMessage(1, getAbstractGlobalEndRequest()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.GlobalStatusRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalStatusRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalStatusRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalStatusRequestProto 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 io.seata.protocol.protobuf.GlobalStatusRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalStatusRequestProto) - io.seata.codec.protobuf.generated.GlobalStatusRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalStatusRequest.internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalStatusRequest.internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalStatusRequestProto.class, io.seata.codec.protobuf.generated.GlobalStatusRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalStatusRequestProto.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(); - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalStatusRequest.internal_static_io_seata_protocol_protobuf_GlobalStatusRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalStatusRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalStatusRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalStatusRequestProto build() { - io.seata.codec.protobuf.generated.GlobalStatusRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalStatusRequestProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalStatusRequestProto result = new io.seata.codec.protobuf.generated.GlobalStatusRequestProto(this); - if (abstractGlobalEndRequestBuilder_ == null) { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequest_; - } else { - result.abstractGlobalEndRequest_ = abstractGlobalEndRequestBuilder_.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 io.seata.codec.protobuf.generated.GlobalStatusRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalStatusRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalStatusRequestProto other) { - if (other == io.seata.codec.protobuf.generated.GlobalStatusRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndRequest()) { - mergeAbstractGlobalEndRequest(other.getAbstractGlobalEndRequest()); - } - 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 { - io.seata.codec.protobuf.generated.GlobalStatusRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalStatusRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto abstractGlobalEndRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder> abstractGlobalEndRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public boolean hasAbstractGlobalEndRequest() { - return abstractGlobalEndRequestBuilder_ != null || abstractGlobalEndRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - return abstractGlobalEndRequest_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } else { - return abstractGlobalEndRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest(io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndRequest_ = value; - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder setAbstractGlobalEndRequest( - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder builderForValue) { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder mergeAbstractGlobalEndRequest(io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto value) { - if (abstractGlobalEndRequestBuilder_ == null) { - if (abstractGlobalEndRequest_ != null) { - abstractGlobalEndRequest_ = - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.newBuilder(abstractGlobalEndRequest_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndRequest_ = value; - } - onChanged(); - } else { - abstractGlobalEndRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public Builder clearAbstractGlobalEndRequest() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequest_ = null; - onChanged(); - } else { - abstractGlobalEndRequest_ = null; - abstractGlobalEndRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder getAbstractGlobalEndRequestBuilder() { - - onChanged(); - return getAbstractGlobalEndRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder() { - if (abstractGlobalEndRequestBuilder_ != null) { - return abstractGlobalEndRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.getDefaultInstance() : abstractGlobalEndRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder> - getAbstractGlobalEndRequestFieldBuilder() { - if (abstractGlobalEndRequestBuilder_ == null) { - abstractGlobalEndRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder>( - getAbstractGlobalEndRequest(), - getParentForChildren(), - isClean()); - abstractGlobalEndRequest_ = null; - } - return abstractGlobalEndRequestBuilder_; - } - @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:io.seata.protocol.protobuf.GlobalStatusRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalStatusRequestProto) - private static final io.seata.codec.protobuf.generated.GlobalStatusRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalStatusRequestProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalStatusRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalStatusRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java deleted file mode 100644 index 08a51add453..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusRequestProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalStatusRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalStatusRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - boolean hasAbstractGlobalEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProto getAbstractGlobalEndRequest(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndRequestProto abstractGlobalEndRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndRequestProtoOrBuilder getAbstractGlobalEndRequestOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponse.java deleted file mode 100644 index 39c96f70359..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponse.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_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\032globalStatusResponse.proto\022\032io.seata.p" + - "rotocol.protobuf\032\037abstractGlobalEndRespo" + - "nse.proto\"z\n\031GlobalStatusResponseProto\022]" + - "\n\031abstractGlobalEndResponse\030\001 \001(\0132:.io.s" + - "eata.protocol.protobuf.AbstractGlobalEnd" + - "ResponseProtoB;\n!io.seata.codec.protobuf" + - ".generatedB\024GlobalStatusResponseP\001b\006prot" + - "o3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor, - new java.lang.String[] { "AbstractGlobalEndResponse", }); - io.seata.codec.protobuf.generated.AbstractGlobalEndResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponseProto.java deleted file mode 100644 index d2023faa6a0..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponseProto.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - * Protobuf type {@code io.seata.protocol.protobuf.GlobalStatusResponseProto} - */ -public final class GlobalStatusResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder subBuilder = null; - if (abstractGlobalEndResponse_ != null) { - subBuilder = abstractGlobalEndResponse_.toBuilder(); - } - abstractGlobalEndResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.GlobalStatusResponse.internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalStatusResponse.internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalStatusResponseProto.class, io.seata.codec.protobuf.generated.GlobalStatusResponseProto.Builder.class); - } - - public static final int ABSTRACTGLOBALENDRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - return abstractGlobalEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - return getAbstractGlobalEndResponse(); - } - - 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 (abstractGlobalEndResponse_ != null) { - output.writeMessage(1, getAbstractGlobalEndResponse()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.GlobalStatusResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.GlobalStatusResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.GlobalStatusResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.GlobalStatusResponseProto 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 io.seata.protocol.protobuf.GlobalStatusResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.GlobalStatusResponseProto) - io.seata.codec.protobuf.generated.GlobalStatusResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.GlobalStatusResponse.internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.GlobalStatusResponse.internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.GlobalStatusResponseProto.class, io.seata.codec.protobuf.generated.GlobalStatusResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.GlobalStatusResponseProto.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(); - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.GlobalStatusResponse.internal_static_io_seata_protocol_protobuf_GlobalStatusResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalStatusResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.GlobalStatusResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalStatusResponseProto build() { - io.seata.codec.protobuf.generated.GlobalStatusResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalStatusResponseProto buildPartial() { - io.seata.codec.protobuf.generated.GlobalStatusResponseProto result = new io.seata.codec.protobuf.generated.GlobalStatusResponseProto(this); - if (abstractGlobalEndResponseBuilder_ == null) { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponse_; - } else { - result.abstractGlobalEndResponse_ = abstractGlobalEndResponseBuilder_.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 io.seata.codec.protobuf.generated.GlobalStatusResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.GlobalStatusResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.GlobalStatusResponseProto other) { - if (other == io.seata.codec.protobuf.generated.GlobalStatusResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractGlobalEndResponse()) { - mergeAbstractGlobalEndResponse(other.getAbstractGlobalEndResponse()); - } - 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 { - io.seata.codec.protobuf.generated.GlobalStatusResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.GlobalStatusResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto abstractGlobalEndResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder> abstractGlobalEndResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public boolean hasAbstractGlobalEndResponse() { - return abstractGlobalEndResponseBuilder_ != null || abstractGlobalEndResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - return abstractGlobalEndResponse_ == null ? io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } else { - return abstractGlobalEndResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse(io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractGlobalEndResponse_ = value; - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder setAbstractGlobalEndResponse( - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder builderForValue) { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder mergeAbstractGlobalEndResponse(io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto value) { - if (abstractGlobalEndResponseBuilder_ == null) { - if (abstractGlobalEndResponse_ != null) { - abstractGlobalEndResponse_ = - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.newBuilder(abstractGlobalEndResponse_).mergeFrom(value).buildPartial(); - } else { - abstractGlobalEndResponse_ = value; - } - onChanged(); - } else { - abstractGlobalEndResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public Builder clearAbstractGlobalEndResponse() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponse_ = null; - onChanged(); - } else { - abstractGlobalEndResponse_ = null; - abstractGlobalEndResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder getAbstractGlobalEndResponseBuilder() { - - onChanged(); - return getAbstractGlobalEndResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder() { - if (abstractGlobalEndResponseBuilder_ != null) { - return abstractGlobalEndResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractGlobalEndResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.getDefaultInstance() : abstractGlobalEndResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder> - getAbstractGlobalEndResponseFieldBuilder() { - if (abstractGlobalEndResponseBuilder_ == null) { - abstractGlobalEndResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder>( - getAbstractGlobalEndResponse(), - getParentForChildren(), - isClean()); - abstractGlobalEndResponse_ = null; - } - return abstractGlobalEndResponseBuilder_; - } - @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:io.seata.protocol.protobuf.GlobalStatusResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.GlobalStatusResponseProto) - private static final io.seata.codec.protobuf.generated.GlobalStatusResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.GlobalStatusResponseProto(); - } - - public static io.seata.codec.protobuf.generated.GlobalStatusResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.GlobalStatusResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java deleted file mode 100644 index 345bb4d693f..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/GlobalStatusResponseProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: globalStatusResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface GlobalStatusResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.GlobalStatusResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - boolean hasAbstractGlobalEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProto getAbstractGlobalEndResponse(); - /** - * .io.seata.protocol.protobuf.AbstractGlobalEndResponseProto abstractGlobalEndResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractGlobalEndResponseProtoOrBuilder getAbstractGlobalEndResponseOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessage.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessage.java deleted file mode 100644 index d06ad556c74..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessage.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: heartbeatMessage.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_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\026heartbeatMessage.proto\022\032io.seata.proto" + - "col.protobuf\"%\n\025HeartbeatMessageProto\022\014\n" + - "\004ping\030\001 \001(\010B7\n!io.seata.codec.protobuf.g" + - "eneratedB\020HeartbeatMessageP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_descriptor, - new java.lang.String[] { "Ping", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessageProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessageProto.java deleted file mode 100644 index 02324093199..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessageProto.java +++ /dev/null @@ -1,479 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: heartbeatMessage.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.HeartbeatMessageProto} - */ -public final class HeartbeatMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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: { - - 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 (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 io.seata.codec.protobuf.generated.HeartbeatMessage.internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.HeartbeatMessage.internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.HeartbeatMessageProto.class, io.seata.codec.protobuf.generated.HeartbeatMessageProto.Builder.class); - } - - public static final int PING_FIELD_NUMBER = 1; - private boolean ping_; - /** - * bool ping = 1; - */ - public boolean getPing() { - return ping_; - } - - 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 (ping_ != false) { - output.writeBool(1, ping_); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.HeartbeatMessageProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.HeartbeatMessageProto other = (io.seata.codec.protobuf.generated.HeartbeatMessageProto) obj; - - if (getPing() - != other.getPing()) 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) + PING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getPing()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.seata.codec.protobuf.generated.HeartbeatMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.HeartbeatMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.HeartbeatMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.HeartbeatMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.HeartbeatMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.HeartbeatMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.HeartbeatMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.HeartbeatMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.HeartbeatMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.HeartbeatMessageProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.HeartbeatMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.HeartbeatMessageProto) - io.seata.codec.protobuf.generated.HeartbeatMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.HeartbeatMessage.internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.HeartbeatMessage.internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.HeartbeatMessageProto.class, io.seata.codec.protobuf.generated.HeartbeatMessageProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.HeartbeatMessageProto.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(); - ping_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.HeartbeatMessage.internal_static_io_seata_protocol_protobuf_HeartbeatMessageProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.HeartbeatMessageProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.HeartbeatMessageProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.HeartbeatMessageProto build() { - io.seata.codec.protobuf.generated.HeartbeatMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.HeartbeatMessageProto buildPartial() { - io.seata.codec.protobuf.generated.HeartbeatMessageProto result = new io.seata.codec.protobuf.generated.HeartbeatMessageProto(this); - result.ping_ = ping_; - 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 io.seata.codec.protobuf.generated.HeartbeatMessageProto) { - return mergeFrom((io.seata.codec.protobuf.generated.HeartbeatMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.HeartbeatMessageProto other) { - if (other == io.seata.codec.protobuf.generated.HeartbeatMessageProto.getDefaultInstance()) return this; - if (other.getPing() != false) { - setPing(other.getPing()); - } - 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 { - io.seata.codec.protobuf.generated.HeartbeatMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.HeartbeatMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean ping_ ; - /** - * bool ping = 1; - */ - public boolean getPing() { - return ping_; - } - /** - * bool ping = 1; - */ - public Builder setPing(boolean value) { - - ping_ = value; - onChanged(); - return this; - } - /** - * bool ping = 1; - */ - public Builder clearPing() { - - ping_ = false; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.HeartbeatMessageProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.HeartbeatMessageProto) - private static final io.seata.codec.protobuf.generated.HeartbeatMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.HeartbeatMessageProto(); - } - - public static io.seata.codec.protobuf.generated.HeartbeatMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.HeartbeatMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessageProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessageProtoOrBuilder.java deleted file mode 100644 index fd70ed05686..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/HeartbeatMessageProtoOrBuilder.java +++ /dev/null @@ -1,14 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: heartbeatMessage.proto - -package io.seata.codec.protobuf.generated; - -public interface HeartbeatMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.HeartbeatMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * bool ping = 1; - */ - boolean getPing(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessage.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessage.java deleted file mode 100644 index 87e601f1991..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessage.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedResultMessage.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_MergedResultMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_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\031mergedResultMessage.proto\022\032io.seata.pr" + - "otocol.protobuf\032\025abstractMessage.proto\032\031" + - "google/protobuf/any.proto\"\211\001\n\030MergedResu" + - "ltMessageProto\022I\n\017abstractMessage\030\001 \001(\0132" + - "0.io.seata.protocol.protobuf.AbstractMes" + - "sageProto\022\"\n\004msgs\030\002 \003(\0132\024.google.protobu" + - "f.AnyB:\n!io.seata.codec.protobuf.generat" + - "edB\023MergedResultMessageP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_descriptor, - new java.lang.String[] { "AbstractMessage", "Msgs", }); - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessageProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessageProto.java deleted file mode 100644 index f934a50e428..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessageProto.java +++ /dev/null @@ -1,950 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedResultMessage.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.MergedResultMessageProto} - */ -public final class MergedResultMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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(); - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - msgs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - 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 (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - msgs_ = java.util.Collections.unmodifiableList(msgs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.MergedResultMessage.internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.MergedResultMessage.internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.MergedResultMessageProto.class, io.seata.codec.protobuf.generated.MergedResultMessageProto.Builder.class); - } - - private int bitField0_; - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int MSGS_FIELD_NUMBER = 2; - private java.util.List msgs_; - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List getMsgsList() { - return msgs_; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List - getMsgsOrBuilderList() { - return msgs_; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public int getMsgsCount() { - return msgs_.size(); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any getMsgs(int index) { - return msgs_.get(index); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.AnyOrBuilder getMsgsOrBuilder( - int index) { - return msgs_.get(index); - } - - 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 (abstractMessage_ != null) { - output.writeMessage(1, getAbstractMessage()); - } - for (int i = 0; i < msgs_.size(); i++) { - output.writeMessage(2, msgs_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.MergedResultMessageProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.MergedResultMessageProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.MergedResultMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.MergedResultMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.MergedResultMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.MergedResultMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.MergedResultMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.MergedResultMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.MergedResultMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.MergedResultMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.MergedResultMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.MergedResultMessageProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.MergedResultMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.MergedResultMessageProto) - io.seata.codec.protobuf.generated.MergedResultMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.MergedResultMessage.internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.MergedResultMessage.internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.MergedResultMessageProto.class, io.seata.codec.protobuf.generated.MergedResultMessageProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.MergedResultMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMsgsFieldBuilder(); - } - } - @java.lang.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_ & ~0x00000002); - } else { - msgsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.MergedResultMessage.internal_static_io_seata_protocol_protobuf_MergedResultMessageProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.MergedResultMessageProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.MergedResultMessageProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.MergedResultMessageProto build() { - io.seata.codec.protobuf.generated.MergedResultMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.MergedResultMessageProto buildPartial() { - io.seata.codec.protobuf.generated.MergedResultMessageProto result = new io.seata.codec.protobuf.generated.MergedResultMessageProto(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - if (msgsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - msgs_ = java.util.Collections.unmodifiableList(msgs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.msgs_ = msgs_; - } else { - result.msgs_ = msgsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - 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 io.seata.codec.protobuf.generated.MergedResultMessageProto) { - return mergeFrom((io.seata.codec.protobuf.generated.MergedResultMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.MergedResultMessageProto other) { - if (other == io.seata.codec.protobuf.generated.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_ & ~0x00000002); - } else { - ensureMsgsIsMutable(); - msgs_.addAll(other.msgs_); - } - onChanged(); - } - } else { - if (!other.msgs_.isEmpty()) { - if (msgsBuilder_.isEmpty()) { - msgsBuilder_.dispose(); - msgsBuilder_ = null; - msgs_ = other.msgs_; - bitField0_ = (bitField0_ & ~0x00000002); - msgsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMsgsFieldBuilder() : null; - } else { - msgsBuilder_.addAllMessages(other.msgs_); - } - } - } - 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 { - io.seata.codec.protobuf.generated.MergedResultMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.MergedResultMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - io.seata.codec.protobuf.generated.AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private java.util.List msgs_ = - java.util.Collections.emptyList(); - private void ensureMsgsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - msgs_ = new java.util.ArrayList(msgs_); - bitField0_ |= 0x00000002; - } - } - - 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( - java.lang.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_ & ~0x00000002); - 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_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - msgs_ = null; - } - return msgsBuilder_; - } - @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:io.seata.protocol.protobuf.MergedResultMessageProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.MergedResultMessageProto) - private static final io.seata.codec.protobuf.generated.MergedResultMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.MergedResultMessageProto(); - } - - public static io.seata.codec.protobuf.generated.MergedResultMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.MergedResultMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessageProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessageProtoOrBuilder.java deleted file mode 100644 index a5242faec2b..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedResultMessageProtoOrBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedResultMessage.proto - -package io.seata.codec.protobuf.generated; - -public interface MergedResultMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.MergedResultMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - boolean hasAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - io.seata.codec.protobuf.generated.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/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessage.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessage.java deleted file mode 100644 index 01921fb18b2..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessage.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedWarpMessage.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_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\027mergedWarpMessage.proto\022\032io.seata.prot" + - "ocol.protobuf\032\025abstractMessage.proto\032\031go" + - "ogle/protobuf/any.proto\"\227\001\n\026MergedWarpMe" + - "ssageProto\022I\n\017abstractMessage\030\001 \001(\01320.io" + - ".seata.protocol.protobuf.AbstractMessage" + - "Proto\022\"\n\004msgs\030\002 \003(\0132\024.google.protobuf.An" + - "y\022\016\n\006msgIds\030\003 \003(\005B8\n!io.seata.codec.prot" + - "obuf.generatedB\021MergedWarpMessageP\001b\006pro" + - "to3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_descriptor, - new java.lang.String[] { "AbstractMessage", "Msgs", "MsgIds", }); - io.seata.codec.protobuf.generated.AbstractMessage.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessageProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessageProto.java deleted file mode 100644 index 8c74e4d72b7..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessageProto.java +++ /dev/null @@ -1,1110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedWarpMessage.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.MergedWarpMessageProto} - */ -public final class MergedWarpMessageProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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(); - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder subBuilder = null; - if (abstractMessage_ != null) { - subBuilder = abstractMessage_.toBuilder(); - } - abstractMessage_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractMessageProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractMessage_); - abstractMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - msgs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - msgs_.add( - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - msgIds_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - msgIds_.addInt(input.readInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - msgIds_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - 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 (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - msgs_ = java.util.Collections.unmodifiableList(msgs_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - msgIds_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.MergedWarpMessage.internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.MergedWarpMessage.internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.MergedWarpMessageProto.class, io.seata.codec.protobuf.generated.MergedWarpMessageProto.Builder.class); - } - - private int bitField0_; - public static final int ABSTRACTMESSAGE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - return getAbstractMessage(); - } - - public static final int MSGS_FIELD_NUMBER = 2; - private java.util.List msgs_; - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List getMsgsList() { - return msgs_; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public java.util.List - getMsgsOrBuilderList() { - return msgs_; - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public int getMsgsCount() { - return msgs_.size(); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - public com.google.protobuf.Any getMsgs(int index) { - return msgs_.get(index); - } - /** - * repeated .google.protobuf.Any msgs = 2; - */ - 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; - */ - public java.util.List - getMsgIdsList() { - return msgIds_; - } - /** - * repeated int32 msgIds = 3; - */ - public int getMsgIdsCount() { - return msgIds_.size(); - } - /** - * repeated int32 msgIds = 3; - */ - public int getMsgIds(int index) { - return msgIds_.getInt(index); - } - private int msgIdsMemoizedSerializedSize = -1; - - 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 { - 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); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.MergedWarpMessageProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.MergedWarpMessageProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.MergedWarpMessageProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.MergedWarpMessageProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.MergedWarpMessageProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.MergedWarpMessageProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.MergedWarpMessageProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.MergedWarpMessageProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.MergedWarpMessageProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.MergedWarpMessageProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.MergedWarpMessageProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.MergedWarpMessageProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.MergedWarpMessageProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.MergedWarpMessageProto) - io.seata.codec.protobuf.generated.MergedWarpMessageProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.MergedWarpMessage.internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.MergedWarpMessage.internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.MergedWarpMessageProto.class, io.seata.codec.protobuf.generated.MergedWarpMessageProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.MergedWarpMessageProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMsgsFieldBuilder(); - } - } - @java.lang.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_ & ~0x00000002); - } else { - msgsBuilder_.clear(); - } - msgIds_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.MergedWarpMessage.internal_static_io_seata_protocol_protobuf_MergedWarpMessageProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.MergedWarpMessageProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.MergedWarpMessageProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.MergedWarpMessageProto build() { - io.seata.codec.protobuf.generated.MergedWarpMessageProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.MergedWarpMessageProto buildPartial() { - io.seata.codec.protobuf.generated.MergedWarpMessageProto result = new io.seata.codec.protobuf.generated.MergedWarpMessageProto(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (abstractMessageBuilder_ == null) { - result.abstractMessage_ = abstractMessage_; - } else { - result.abstractMessage_ = abstractMessageBuilder_.build(); - } - if (msgsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - msgs_ = java.util.Collections.unmodifiableList(msgs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.msgs_ = msgs_; - } else { - result.msgs_ = msgsBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - msgIds_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.msgIds_ = msgIds_; - result.bitField0_ = to_bitField0_; - 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 io.seata.codec.protobuf.generated.MergedWarpMessageProto) { - return mergeFrom((io.seata.codec.protobuf.generated.MergedWarpMessageProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.MergedWarpMessageProto other) { - if (other == io.seata.codec.protobuf.generated.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_ & ~0x00000002); - } else { - ensureMsgsIsMutable(); - msgs_.addAll(other.msgs_); - } - onChanged(); - } - } else { - if (!other.msgs_.isEmpty()) { - if (msgsBuilder_.isEmpty()) { - msgsBuilder_.dispose(); - msgsBuilder_ = null; - msgs_ = other.msgs_; - bitField0_ = (bitField0_ & ~0x00000002); - 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_ & ~0x00000004); - } else { - ensureMsgIdsIsMutable(); - msgIds_.addAll(other.msgIds_); - } - onChanged(); - } - 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 { - io.seata.codec.protobuf.generated.MergedWarpMessageProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.MergedWarpMessageProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private io.seata.codec.protobuf.generated.AbstractMessageProto abstractMessage_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> abstractMessageBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public boolean hasAbstractMessage() { - return abstractMessageBuilder_ != null || abstractMessage_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage() { - if (abstractMessageBuilder_ == null) { - return abstractMessage_ == null ? io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } else { - return abstractMessageBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractMessage_ = value; - onChanged(); - } else { - abstractMessageBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder setAbstractMessage( - io.seata.codec.protobuf.generated.AbstractMessageProto.Builder builderForValue) { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = builderForValue.build(); - onChanged(); - } else { - abstractMessageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder mergeAbstractMessage(io.seata.codec.protobuf.generated.AbstractMessageProto value) { - if (abstractMessageBuilder_ == null) { - if (abstractMessage_ != null) { - abstractMessage_ = - io.seata.codec.protobuf.generated.AbstractMessageProto.newBuilder(abstractMessage_).mergeFrom(value).buildPartial(); - } else { - abstractMessage_ = value; - } - onChanged(); - } else { - abstractMessageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public Builder clearAbstractMessage() { - if (abstractMessageBuilder_ == null) { - abstractMessage_ = null; - onChanged(); - } else { - abstractMessage_ = null; - abstractMessageBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProto.Builder getAbstractMessageBuilder() { - - onChanged(); - return getAbstractMessageFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - public io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder getAbstractMessageOrBuilder() { - if (abstractMessageBuilder_ != null) { - return abstractMessageBuilder_.getMessageOrBuilder(); - } else { - return abstractMessage_ == null ? - io.seata.codec.protobuf.generated.AbstractMessageProto.getDefaultInstance() : abstractMessage_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder> - getAbstractMessageFieldBuilder() { - if (abstractMessageBuilder_ == null) { - abstractMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractMessageProto, io.seata.codec.protobuf.generated.AbstractMessageProto.Builder, io.seata.codec.protobuf.generated.AbstractMessageProtoOrBuilder>( - getAbstractMessage(), - getParentForChildren(), - isClean()); - abstractMessage_ = null; - } - return abstractMessageBuilder_; - } - - private java.util.List msgs_ = - java.util.Collections.emptyList(); - private void ensureMsgsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - msgs_ = new java.util.ArrayList(msgs_); - bitField0_ |= 0x00000002; - } - } - - 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( - java.lang.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_ & ~0x00000002); - 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_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - msgs_ = null; - } - return msgsBuilder_; - } - - private com.google.protobuf.Internal.IntList msgIds_ = emptyIntList(); - private void ensureMsgIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - msgIds_ = mutableCopy(msgIds_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated int32 msgIds = 3; - */ - public java.util.List - getMsgIdsList() { - return ((bitField0_ & 0x00000004) != 0) ? - java.util.Collections.unmodifiableList(msgIds_) : msgIds_; - } - /** - * repeated int32 msgIds = 3; - */ - public int getMsgIdsCount() { - return msgIds_.size(); - } - /** - * repeated int32 msgIds = 3; - */ - public int getMsgIds(int index) { - return msgIds_.getInt(index); - } - /** - * repeated int32 msgIds = 3; - */ - public Builder setMsgIds( - int index, int value) { - ensureMsgIdsIsMutable(); - msgIds_.setInt(index, value); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - */ - public Builder addMsgIds(int value) { - ensureMsgIdsIsMutable(); - msgIds_.addInt(value); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - */ - public Builder addAllMsgIds( - java.lang.Iterable values) { - ensureMsgIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, msgIds_); - onChanged(); - return this; - } - /** - * repeated int32 msgIds = 3; - */ - public Builder clearMsgIds() { - msgIds_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.MergedWarpMessageProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.MergedWarpMessageProto) - private static final io.seata.codec.protobuf.generated.MergedWarpMessageProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.MergedWarpMessageProto(); - } - - public static io.seata.codec.protobuf.generated.MergedWarpMessageProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.MergedWarpMessageProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessageProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessageProtoOrBuilder.java deleted file mode 100644 index dde68138a89..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MergedWarpMessageProtoOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: mergedWarpMessage.proto - -package io.seata.codec.protobuf.generated; - -public interface MergedWarpMessageProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.MergedWarpMessageProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - boolean hasAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - io.seata.codec.protobuf.generated.AbstractMessageProto getAbstractMessage(); - /** - * .io.seata.protocol.protobuf.AbstractMessageProto abstractMessage = 1; - */ - io.seata.codec.protobuf.generated.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; - */ - java.util.List getMsgIdsList(); - /** - * repeated int32 msgIds = 3; - */ - int getMsgIdsCount(); - /** - * repeated int32 msgIds = 3; - */ - int getMsgIds(int index); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MessageType.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MessageType.java deleted file mode 100644 index 12295e85d89..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MessageType.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: messageType.proto - -package io.seata.codec.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\032io.seata.protocol.p" + - "rotobuf*\335\005\n\020MessageTypeProto\022\031\n\025TYPE_GLO" + - "BAL_PRESERVED\020\000\022\025\n\021TYPE_GLOBAL_BEGIN\020\001\022\034" + - "\n\030TYPE_GLOBAL_BEGIN_RESULT\020\002\022\026\n\022TYPE_GLO" + - "BAL_COMMIT\020\007\022\035\n\031TYPE_GLOBAL_COMMIT_RESUL" + - "T\020\010\022\030\n\024TYPE_GLOBAL_ROLLBACK\020\t\022\037\n\033TYPE_GL" + - "OBAL_ROLLBACK_RESULT\020\n\022\026\n\022TYPE_GLOBAL_ST" + - "ATUS\020\017\022\035\n\031TYPE_GLOBAL_STATUS_RESULT\020\020\022\032\n" + - "\026TYPE_GLOBAL_LOCK_QUERY\020\025\022!\n\035TYPE_GLOBAL" + - "_LOCK_QUERY_RESULT\020\026\022\026\n\022TYPE_BRANCH_COMM", - "IT\020\003\022\035\n\031TYPE_BRANCH_COMMIT_RESULT\020\004\022\030\n\024T" + - "YPE_BRANCH_ROLLBACK\020\005\022\037\n\033TYPE_BRANCH_ROL" + - "LBACK_RESULT\020\006\022\030\n\024TYPE_BRANCH_REGISTER\020\013" + - "\022\037\n\033TYPE_BRANCH_REGISTER_RESULT\020\014\022\035\n\031TYP" + - "E_BRANCH_STATUS_REPORT\020\r\022$\n TYPE_BRANCH_" + - "STATUS_REPORT_RESULT\020\016\022\024\n\020TYPE_SEATA_MER" + - "GE\020;\022\033\n\027TYPE_SEATA_MERGE_RESULT\020<\022\020\n\014TYP" + - "E_REG_CLT\020e\022\027\n\023TYPE_REG_CLT_RESULT\020f\022\017\n\013" + - "TYPE_REG_RM\020g\022\026\n\022TYPE_REG_RM_RESULT\020h\022\030\n" + - "\024TYPE_UNDO_LOG_DELETE\020oB2\n!io.seata.code", - "c.protobuf.generatedB\013MessageTypeP\001b\006pro" + - "to3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MessageTypeProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MessageTypeProto.java deleted file mode 100644 index 16567225b42..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/MessageTypeProto.java +++ /dev/null @@ -1,553 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: messageType.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code io.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_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), - 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_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; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @Deprecated - public static MessageTypeProto valueOf(int value) { - return forNumber(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 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; - 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() { - 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 io.seata.codec.protobuf.generated.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:io.seata.protocol.protobuf.MessageTypeProto) -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequest.java deleted file mode 100644 index a3b126786c2..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequest.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_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\027registerRMRequest.proto\022\032io.seata.prot" + - "ocol.protobuf\032\035abstractIdentifyRequest.p" + - "roto\"\210\001\n\026RegisterRMRequestProto\022Y\n\027abstr" + - "actIdentifyRequest\030\001 \001(\01328.io.seata.prot" + - "ocol.protobuf.AbstractIdentifyRequestPro" + - "to\022\023\n\013resourceIds\030\002 \001(\tB8\n!io.seata.code" + - "c.protobuf.generatedB\021RegisterRMRequestP" + - "\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractIdentifyRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_descriptor, - new java.lang.String[] { "AbstractIdentifyRequest", "ResourceIds", }); - io.seata.codec.protobuf.generated.AbstractIdentifyRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequestProto.java deleted file mode 100644 index b78713e8989..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequestProto.java +++ /dev/null @@ -1,729 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.RegisterRMRequestProto} - */ -public final class RegisterRMRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder subBuilder = null; - if (abstractIdentifyRequest_ != null) { - subBuilder = abstractIdentifyRequest_.toBuilder(); - } - abstractIdentifyRequest_ = input.readMessage(io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abstractIdentifyRequest_); - abstractIdentifyRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.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 (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 io.seata.codec.protobuf.generated.RegisterRMRequest.internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.RegisterRMRequest.internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.RegisterRMRequestProto.class, io.seata.codec.protobuf.generated.RegisterRMRequestProto.Builder.class); - } - - public static final int ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto abstractIdentifyRequest_; - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public boolean hasAbstractIdentifyRequest() { - return abstractIdentifyRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getAbstractIdentifyRequest() { - return abstractIdentifyRequest_ == null ? io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { - return getAbstractIdentifyRequest(); - } - - public static final int RESOURCEIDS_FIELD_NUMBER = 2; - private volatile java.lang.Object resourceIds_; - /** - * string resourceIds = 2; - */ - public java.lang.String getResourceIds() { - java.lang.Object ref = resourceIds_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceIds_ = s; - return s; - } - } - /** - * string resourceIds = 2; - */ - public com.google.protobuf.ByteString - getResourceIdsBytes() { - java.lang.Object ref = resourceIds_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceIds_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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 (abstractIdentifyRequest_ != null) { - output.writeMessage(1, getAbstractIdentifyRequest()); - } - if (!getResourceIdsBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceIds_); - } - unknownFields.writeTo(output); - } - - @java.lang.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 (!getResourceIdsBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceIds_); - } - 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 io.seata.codec.protobuf.generated.RegisterRMRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.RegisterRMRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.RegisterRMRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterRMRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterRMRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterRMRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterRMRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterRMRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterRMRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.RegisterRMRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.RegisterRMRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.RegisterRMRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.RegisterRMRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.RegisterRMRequestProto) - io.seata.codec.protobuf.generated.RegisterRMRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.RegisterRMRequest.internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.RegisterRMRequest.internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.RegisterRMRequestProto.class, io.seata.codec.protobuf.generated.RegisterRMRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.RegisterRMRequestProto.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(); - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = null; - } else { - abstractIdentifyRequest_ = null; - abstractIdentifyRequestBuilder_ = null; - } - resourceIds_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.RegisterRMRequest.internal_static_io_seata_protocol_protobuf_RegisterRMRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterRMRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.RegisterRMRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterRMRequestProto build() { - io.seata.codec.protobuf.generated.RegisterRMRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterRMRequestProto buildPartial() { - io.seata.codec.protobuf.generated.RegisterRMRequestProto result = new io.seata.codec.protobuf.generated.RegisterRMRequestProto(this); - if (abstractIdentifyRequestBuilder_ == null) { - result.abstractIdentifyRequest_ = abstractIdentifyRequest_; - } else { - result.abstractIdentifyRequest_ = abstractIdentifyRequestBuilder_.build(); - } - result.resourceIds_ = resourceIds_; - 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 io.seata.codec.protobuf.generated.RegisterRMRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.RegisterRMRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.RegisterRMRequestProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - @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 { - io.seata.codec.protobuf.generated.RegisterRMRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.RegisterRMRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto abstractIdentifyRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder> abstractIdentifyRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public boolean hasAbstractIdentifyRequest() { - return abstractIdentifyRequestBuilder_ != null || abstractIdentifyRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getAbstractIdentifyRequest() { - if (abstractIdentifyRequestBuilder_ == null) { - return abstractIdentifyRequest_ == null ? io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } else { - return abstractIdentifyRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder setAbstractIdentifyRequest(io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto value) { - if (abstractIdentifyRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractIdentifyRequest_ = value; - onChanged(); - } else { - abstractIdentifyRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder setAbstractIdentifyRequest( - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder builderForValue) { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractIdentifyRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder mergeAbstractIdentifyRequest(io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto value) { - if (abstractIdentifyRequestBuilder_ == null) { - if (abstractIdentifyRequest_ != null) { - abstractIdentifyRequest_ = - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.newBuilder(abstractIdentifyRequest_).mergeFrom(value).buildPartial(); - } else { - abstractIdentifyRequest_ = value; - } - onChanged(); - } else { - abstractIdentifyRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder clearAbstractIdentifyRequest() { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = null; - onChanged(); - } else { - abstractIdentifyRequest_ = null; - abstractIdentifyRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder getAbstractIdentifyRequestBuilder() { - - onChanged(); - return getAbstractIdentifyRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { - if (abstractIdentifyRequestBuilder_ != null) { - return abstractIdentifyRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractIdentifyRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder> - getAbstractIdentifyRequestFieldBuilder() { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder>( - getAbstractIdentifyRequest(), - getParentForChildren(), - isClean()); - abstractIdentifyRequest_ = null; - } - return abstractIdentifyRequestBuilder_; - } - - private java.lang.Object resourceIds_ = ""; - /** - * string resourceIds = 2; - */ - public java.lang.String getResourceIds() { - java.lang.Object ref = resourceIds_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceIds_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string resourceIds = 2; - */ - public com.google.protobuf.ByteString - getResourceIdsBytes() { - java.lang.Object ref = resourceIds_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceIds_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resourceIds = 2; - */ - public Builder setResourceIds( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceIds_ = value; - onChanged(); - return this; - } - /** - * string resourceIds = 2; - */ - public Builder clearResourceIds() { - - resourceIds_ = getDefaultInstance().getResourceIds(); - onChanged(); - return this; - } - /** - * string resourceIds = 2; - */ - public Builder setResourceIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceIds_ = value; - onChanged(); - return this; - } - @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:io.seata.protocol.protobuf.RegisterRMRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.RegisterRMRequestProto) - private static final io.seata.codec.protobuf.generated.RegisterRMRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.RegisterRMRequestProto(); - } - - public static io.seata.codec.protobuf.generated.RegisterRMRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterRMRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequestProtoOrBuilder.java deleted file mode 100644 index 4ccc81ea232..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMRequestProtoOrBuilder.java +++ /dev/null @@ -1,32 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface RegisterRMRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.RegisterRMRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - boolean hasAbstractIdentifyRequest(); - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getAbstractIdentifyRequest(); - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder(); - - /** - * string resourceIds = 2; - */ - java.lang.String getResourceIds(); - /** - * string resourceIds = 2; - */ - com.google.protobuf.ByteString - getResourceIdsBytes(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponse.java deleted file mode 100644 index 53a22239123..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponse.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_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\030registerRMResponse.proto\022\032io.seata.pro" + - "tocol.protobuf\032\036abstractIdentifyResponse" + - ".proto\"v\n\027RegisterRMResponseProto\022[\n\030abs" + - "tractIdentifyResponse\030\001 \001(\01329.io.seata.p" + - "rotocol.protobuf.AbstractIdentifyRespons" + - "eProtoB9\n!io.seata.codec.protobuf.genera" + - "tedB\022RegisterRMResponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractIdentifyResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_descriptor, - new java.lang.String[] { "AbstractIdentifyResponse", }); - io.seata.codec.protobuf.generated.AbstractIdentifyResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponseProto.java deleted file mode 100644 index 30a622295d4..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponseProto.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.RegisterRMResponseProto} - */ -public final class RegisterRMResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder subBuilder = null; - if (abstractIdentifyResponse_ != null) { - subBuilder = abstractIdentifyResponse_.toBuilder(); - } - abstractIdentifyResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.RegisterRMResponse.internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.RegisterRMResponse.internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.RegisterRMResponseProto.class, io.seata.codec.protobuf.generated.RegisterRMResponseProto.Builder.class); - } - - public static final int ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto abstractIdentifyResponse_; - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public boolean hasAbstractIdentifyResponse() { - return abstractIdentifyResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getAbstractIdentifyResponse() { - return abstractIdentifyResponse_ == null ? io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { - return getAbstractIdentifyResponse(); - } - - 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 (abstractIdentifyResponse_ != null) { - output.writeMessage(1, getAbstractIdentifyResponse()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.RegisterRMResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.RegisterRMResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.RegisterRMResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterRMResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterRMResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterRMResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterRMResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterRMResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterRMResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.RegisterRMResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.RegisterRMResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.RegisterRMResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.RegisterRMResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.RegisterRMResponseProto) - io.seata.codec.protobuf.generated.RegisterRMResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.RegisterRMResponse.internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.RegisterRMResponse.internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.RegisterRMResponseProto.class, io.seata.codec.protobuf.generated.RegisterRMResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.RegisterRMResponseProto.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(); - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = null; - } else { - abstractIdentifyResponse_ = null; - abstractIdentifyResponseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.RegisterRMResponse.internal_static_io_seata_protocol_protobuf_RegisterRMResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterRMResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.RegisterRMResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterRMResponseProto build() { - io.seata.codec.protobuf.generated.RegisterRMResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterRMResponseProto buildPartial() { - io.seata.codec.protobuf.generated.RegisterRMResponseProto result = new io.seata.codec.protobuf.generated.RegisterRMResponseProto(this); - if (abstractIdentifyResponseBuilder_ == null) { - result.abstractIdentifyResponse_ = abstractIdentifyResponse_; - } else { - result.abstractIdentifyResponse_ = abstractIdentifyResponseBuilder_.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 io.seata.codec.protobuf.generated.RegisterRMResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.RegisterRMResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.RegisterRMResponseProto other) { - if (other == io.seata.codec.protobuf.generated.RegisterRMResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractIdentifyResponse()) { - mergeAbstractIdentifyResponse(other.getAbstractIdentifyResponse()); - } - 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 { - io.seata.codec.protobuf.generated.RegisterRMResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.RegisterRMResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto abstractIdentifyResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder> abstractIdentifyResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public boolean hasAbstractIdentifyResponse() { - return abstractIdentifyResponseBuilder_ != null || abstractIdentifyResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getAbstractIdentifyResponse() { - if (abstractIdentifyResponseBuilder_ == null) { - return abstractIdentifyResponse_ == null ? io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } else { - return abstractIdentifyResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder setAbstractIdentifyResponse(io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto value) { - if (abstractIdentifyResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractIdentifyResponse_ = value; - onChanged(); - } else { - abstractIdentifyResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder setAbstractIdentifyResponse( - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder builderForValue) { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractIdentifyResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder mergeAbstractIdentifyResponse(io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto value) { - if (abstractIdentifyResponseBuilder_ == null) { - if (abstractIdentifyResponse_ != null) { - abstractIdentifyResponse_ = - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.newBuilder(abstractIdentifyResponse_).mergeFrom(value).buildPartial(); - } else { - abstractIdentifyResponse_ = value; - } - onChanged(); - } else { - abstractIdentifyResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder clearAbstractIdentifyResponse() { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = null; - onChanged(); - } else { - abstractIdentifyResponse_ = null; - abstractIdentifyResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder getAbstractIdentifyResponseBuilder() { - - onChanged(); - return getAbstractIdentifyResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { - if (abstractIdentifyResponseBuilder_ != null) { - return abstractIdentifyResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractIdentifyResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder> - getAbstractIdentifyResponseFieldBuilder() { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder>( - getAbstractIdentifyResponse(), - getParentForChildren(), - isClean()); - abstractIdentifyResponse_ = null; - } - return abstractIdentifyResponseBuilder_; - } - @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:io.seata.protocol.protobuf.RegisterRMResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.RegisterRMResponseProto) - private static final io.seata.codec.protobuf.generated.RegisterRMResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.RegisterRMResponseProto(); - } - - public static io.seata.codec.protobuf.generated.RegisterRMResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterRMResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponseProtoOrBuilder.java deleted file mode 100644 index 1cc8319bf47..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterRMResponseProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerRMResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface RegisterRMResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.RegisterRMResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - boolean hasAbstractIdentifyResponse(); - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getAbstractIdentifyResponse(); - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequest.java deleted file mode 100644 index cff375761f7..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_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\027registerTMRequest.proto\022\032io.seata.prot" + - "ocol.protobuf\032\035abstractIdentifyRequest.p" + - "roto\"s\n\026RegisterTMRequestProto\022Y\n\027abstra" + - "ctIdentifyRequest\030\001 \001(\01328.io.seata.proto" + - "col.protobuf.AbstractIdentifyRequestProt" + - "oB8\n!io.seata.codec.protobuf.generatedB\021" + - "RegisterTMRequestP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractIdentifyRequest.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_descriptor, - new java.lang.String[] { "AbstractIdentifyRequest", }); - io.seata.codec.protobuf.generated.AbstractIdentifyRequest.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequestProto.java deleted file mode 100644 index 36263c6f58a..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequestProto.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.RegisterTMRequestProto} - */ -public final class RegisterTMRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder subBuilder = null; - if (abstractIdentifyRequest_ != null) { - subBuilder = abstractIdentifyRequest_.toBuilder(); - } - abstractIdentifyRequest_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.RegisterTMRequest.internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.RegisterTMRequest.internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.RegisterTMRequestProto.class, io.seata.codec.protobuf.generated.RegisterTMRequestProto.Builder.class); - } - - public static final int ABSTRACTIDENTIFYREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto abstractIdentifyRequest_; - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public boolean hasAbstractIdentifyRequest() { - return abstractIdentifyRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getAbstractIdentifyRequest() { - return abstractIdentifyRequest_ == null ? io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { - return getAbstractIdentifyRequest(); - } - - 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 (abstractIdentifyRequest_ != null) { - output.writeMessage(1, getAbstractIdentifyRequest()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.RegisterTMRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.RegisterTMRequestProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.RegisterTMRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterTMRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterTMRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterTMRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterTMRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterTMRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterTMRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.RegisterTMRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.RegisterTMRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.RegisterTMRequestProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.RegisterTMRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.RegisterTMRequestProto) - io.seata.codec.protobuf.generated.RegisterTMRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.RegisterTMRequest.internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.RegisterTMRequest.internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.RegisterTMRequestProto.class, io.seata.codec.protobuf.generated.RegisterTMRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.RegisterTMRequestProto.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(); - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = null; - } else { - abstractIdentifyRequest_ = null; - abstractIdentifyRequestBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.RegisterTMRequest.internal_static_io_seata_protocol_protobuf_RegisterTMRequestProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterTMRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.RegisterTMRequestProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterTMRequestProto build() { - io.seata.codec.protobuf.generated.RegisterTMRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterTMRequestProto buildPartial() { - io.seata.codec.protobuf.generated.RegisterTMRequestProto result = new io.seata.codec.protobuf.generated.RegisterTMRequestProto(this); - if (abstractIdentifyRequestBuilder_ == null) { - result.abstractIdentifyRequest_ = abstractIdentifyRequest_; - } else { - result.abstractIdentifyRequest_ = abstractIdentifyRequestBuilder_.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 io.seata.codec.protobuf.generated.RegisterTMRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.RegisterTMRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.RegisterTMRequestProto other) { - if (other == io.seata.codec.protobuf.generated.RegisterTMRequestProto.getDefaultInstance()) return this; - if (other.hasAbstractIdentifyRequest()) { - mergeAbstractIdentifyRequest(other.getAbstractIdentifyRequest()); - } - 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 { - io.seata.codec.protobuf.generated.RegisterTMRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.RegisterTMRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto abstractIdentifyRequest_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder> abstractIdentifyRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public boolean hasAbstractIdentifyRequest() { - return abstractIdentifyRequestBuilder_ != null || abstractIdentifyRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getAbstractIdentifyRequest() { - if (abstractIdentifyRequestBuilder_ == null) { - return abstractIdentifyRequest_ == null ? io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } else { - return abstractIdentifyRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder setAbstractIdentifyRequest(io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto value) { - if (abstractIdentifyRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractIdentifyRequest_ = value; - onChanged(); - } else { - abstractIdentifyRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder setAbstractIdentifyRequest( - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder builderForValue) { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractIdentifyRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder mergeAbstractIdentifyRequest(io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto value) { - if (abstractIdentifyRequestBuilder_ == null) { - if (abstractIdentifyRequest_ != null) { - abstractIdentifyRequest_ = - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.newBuilder(abstractIdentifyRequest_).mergeFrom(value).buildPartial(); - } else { - abstractIdentifyRequest_ = value; - } - onChanged(); - } else { - abstractIdentifyRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public Builder clearAbstractIdentifyRequest() { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequest_ = null; - onChanged(); - } else { - abstractIdentifyRequest_ = null; - abstractIdentifyRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder getAbstractIdentifyRequestBuilder() { - - onChanged(); - return getAbstractIdentifyRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder() { - if (abstractIdentifyRequestBuilder_ != null) { - return abstractIdentifyRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractIdentifyRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.getDefaultInstance() : abstractIdentifyRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder> - getAbstractIdentifyRequestFieldBuilder() { - if (abstractIdentifyRequestBuilder_ == null) { - abstractIdentifyRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder>( - getAbstractIdentifyRequest(), - getParentForChildren(), - isClean()); - abstractIdentifyRequest_ = null; - } - return abstractIdentifyRequestBuilder_; - } - @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:io.seata.protocol.protobuf.RegisterTMRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.RegisterTMRequestProto) - private static final io.seata.codec.protobuf.generated.RegisterTMRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.RegisterTMRequestProto(); - } - - public static io.seata.codec.protobuf.generated.RegisterTMRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterTMRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequestProtoOrBuilder.java deleted file mode 100644 index 59b1c55c4b7..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMRequestProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface RegisterTMRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.RegisterTMRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - boolean hasAbstractIdentifyRequest(); - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProto getAbstractIdentifyRequest(); - /** - * .io.seata.protocol.protobuf.AbstractIdentifyRequestProto abstractIdentifyRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractIdentifyRequestProtoOrBuilder getAbstractIdentifyRequestOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponse.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponse.java deleted file mode 100644 index c37a2db4661..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponse.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMResponse.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_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\030registerTMResponse.proto\022\032io.seata.pro" + - "tocol.protobuf\032\036abstractIdentifyResponse" + - ".proto\"v\n\027RegisterTMResponseProto\022[\n\030abs" + - "tractIdentifyResponse\030\001 \001(\01329.io.seata.p" + - "rotocol.protobuf.AbstractIdentifyRespons" + - "eProtoB9\n!io.seata.codec.protobuf.genera" + - "tedB\022RegisterTMResponseP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractIdentifyResponse.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_descriptor, - new java.lang.String[] { "AbstractIdentifyResponse", }); - io.seata.codec.protobuf.generated.AbstractIdentifyResponse.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponseProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponseProto.java deleted file mode 100644 index f6f3789e692..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponseProto.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMResponse.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.RegisterTMResponseProto} - */ -public final class RegisterTMResponseProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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() { - } - - @java.lang.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 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 10: { - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder subBuilder = null; - if (abstractIdentifyResponse_ != null) { - subBuilder = abstractIdentifyResponse_.toBuilder(); - } - abstractIdentifyResponse_ = input.readMessage(io.seata.codec.protobuf.generated.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 (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 io.seata.codec.protobuf.generated.RegisterTMResponse.internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.RegisterTMResponse.internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.RegisterTMResponseProto.class, io.seata.codec.protobuf.generated.RegisterTMResponseProto.Builder.class); - } - - public static final int ABSTRACTIDENTIFYRESPONSE_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto abstractIdentifyResponse_; - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public boolean hasAbstractIdentifyResponse() { - return abstractIdentifyResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getAbstractIdentifyResponse() { - return abstractIdentifyResponse_ == null ? io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { - return getAbstractIdentifyResponse(); - } - - 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 (abstractIdentifyResponse_ != null) { - output.writeMessage(1, getAbstractIdentifyResponse()); - } - unknownFields.writeTo(output); - } - - @java.lang.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; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.seata.codec.protobuf.generated.RegisterTMResponseProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.RegisterTMResponseProto other = (io.seata.codec.protobuf.generated.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; - } - - @java.lang.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 io.seata.codec.protobuf.generated.RegisterTMResponseProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterTMResponseProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterTMResponseProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterTMResponseProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterTMResponseProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.RegisterTMResponseProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.RegisterTMResponseProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.RegisterTMResponseProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.RegisterTMResponseProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.RegisterTMResponseProto 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; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.RegisterTMResponseProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.RegisterTMResponseProto) - io.seata.codec.protobuf.generated.RegisterTMResponseProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.RegisterTMResponse.internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.RegisterTMResponse.internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.RegisterTMResponseProto.class, io.seata.codec.protobuf.generated.RegisterTMResponseProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.RegisterTMResponseProto.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(); - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = null; - } else { - abstractIdentifyResponse_ = null; - abstractIdentifyResponseBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.RegisterTMResponse.internal_static_io_seata_protocol_protobuf_RegisterTMResponseProto_descriptor; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterTMResponseProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.RegisterTMResponseProto.getDefaultInstance(); - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterTMResponseProto build() { - io.seata.codec.protobuf.generated.RegisterTMResponseProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterTMResponseProto buildPartial() { - io.seata.codec.protobuf.generated.RegisterTMResponseProto result = new io.seata.codec.protobuf.generated.RegisterTMResponseProto(this); - if (abstractIdentifyResponseBuilder_ == null) { - result.abstractIdentifyResponse_ = abstractIdentifyResponse_; - } else { - result.abstractIdentifyResponse_ = abstractIdentifyResponseBuilder_.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 io.seata.codec.protobuf.generated.RegisterTMResponseProto) { - return mergeFrom((io.seata.codec.protobuf.generated.RegisterTMResponseProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.RegisterTMResponseProto other) { - if (other == io.seata.codec.protobuf.generated.RegisterTMResponseProto.getDefaultInstance()) return this; - if (other.hasAbstractIdentifyResponse()) { - mergeAbstractIdentifyResponse(other.getAbstractIdentifyResponse()); - } - 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 { - io.seata.codec.protobuf.generated.RegisterTMResponseProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.RegisterTMResponseProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto abstractIdentifyResponse_; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder> abstractIdentifyResponseBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public boolean hasAbstractIdentifyResponse() { - return abstractIdentifyResponseBuilder_ != null || abstractIdentifyResponse_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getAbstractIdentifyResponse() { - if (abstractIdentifyResponseBuilder_ == null) { - return abstractIdentifyResponse_ == null ? io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } else { - return abstractIdentifyResponseBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder setAbstractIdentifyResponse(io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto value) { - if (abstractIdentifyResponseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractIdentifyResponse_ = value; - onChanged(); - } else { - abstractIdentifyResponseBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder setAbstractIdentifyResponse( - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder builderForValue) { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = builderForValue.build(); - onChanged(); - } else { - abstractIdentifyResponseBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder mergeAbstractIdentifyResponse(io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto value) { - if (abstractIdentifyResponseBuilder_ == null) { - if (abstractIdentifyResponse_ != null) { - abstractIdentifyResponse_ = - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.newBuilder(abstractIdentifyResponse_).mergeFrom(value).buildPartial(); - } else { - abstractIdentifyResponse_ = value; - } - onChanged(); - } else { - abstractIdentifyResponseBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public Builder clearAbstractIdentifyResponse() { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponse_ = null; - onChanged(); - } else { - abstractIdentifyResponse_ = null; - abstractIdentifyResponseBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder getAbstractIdentifyResponseBuilder() { - - onChanged(); - return getAbstractIdentifyResponseFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - public io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder() { - if (abstractIdentifyResponseBuilder_ != null) { - return abstractIdentifyResponseBuilder_.getMessageOrBuilder(); - } else { - return abstractIdentifyResponse_ == null ? - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.getDefaultInstance() : abstractIdentifyResponse_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder> - getAbstractIdentifyResponseFieldBuilder() { - if (abstractIdentifyResponseBuilder_ == null) { - abstractIdentifyResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto.Builder, io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder>( - getAbstractIdentifyResponse(), - getParentForChildren(), - isClean()); - abstractIdentifyResponse_ = null; - } - return abstractIdentifyResponseBuilder_; - } - @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:io.seata.protocol.protobuf.RegisterTMResponseProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.RegisterTMResponseProto) - private static final io.seata.codec.protobuf.generated.RegisterTMResponseProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.RegisterTMResponseProto(); - } - - public static io.seata.codec.protobuf.generated.RegisterTMResponseProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.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; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.seata.codec.protobuf.generated.RegisterTMResponseProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponseProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponseProtoOrBuilder.java deleted file mode 100644 index 87b08c955d2..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/RegisterTMResponseProtoOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: registerTMResponse.proto - -package io.seata.codec.protobuf.generated; - -public interface RegisterTMResponseProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.RegisterTMResponseProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - boolean hasAbstractIdentifyResponse(); - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProto getAbstractIdentifyResponse(); - /** - * .io.seata.protocol.protobuf.AbstractIdentifyResponseProto abstractIdentifyResponse = 1; - */ - io.seata.codec.protobuf.generated.AbstractIdentifyResponseProtoOrBuilder getAbstractIdentifyResponseOrBuilder(); -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/ResultCode.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/ResultCode.java deleted file mode 100644 index d5e4398ff11..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/ResultCode.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: resultCode.proto - -package io.seata.codec.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 { - java.lang.String[] descriptorData = { - "\n\020resultCode.proto\022\032io.seata.protocol.pr" + - "otobuf**\n\017ResultCodeProto\022\n\n\006Failed\020\000\022\013\n" + - "\007Success\020\001B1\n!io.seata.codec.protobuf.ge" + - "neratedB\nResultCodeP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/ResultCodeProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/ResultCodeProto.java deleted file mode 100644 index 55c7d7148c2..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/ResultCodeProto.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: resultCode.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code io.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 java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ResultCodeProto valueOf(int value) { - return forNumber(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() { - 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 io.seata.codec.protobuf.generated.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 java.lang.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:io.seata.protocol.protobuf.ResultCodeProto) -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/TransactionExceptionCode.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/TransactionExceptionCode.java deleted file mode 100644 index b005ec93808..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/TransactionExceptionCode.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: transactionExceptionCode.proto - -package io.seata.codec.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 { - java.lang.String[] descriptorData = { - "\n\036transactionExceptionCode.proto\022\032io.sea" + - "ta.protocol.protobuf*\374\003\n\035TransactionExce" + - "ptionCodeProto\022\013\n\007Unknown\020\000\022\023\n\017LockKeyCo" + - "nflict\020\001\022\006\n\002IO\020\002\022\"\n\036BranchRollbackFailed" + - "_Retriable\020\003\022$\n BranchRollbackFailed_Unr" + - "etriable\020\004\022\030\n\024BranchRegisterFailed\020\005\022\026\n\022" + - "BranchReportFailed\020\006\022\027\n\023LockableCheckFai" + - "led\020\007\022\035\n\031BranchTransactionNotExist\020\010\022\035\n\031" + - "GlobalTransactionNotExist\020\t\022\036\n\032GlobalTra" + - "nsactionNotActive\020\n\022\"\n\036GlobalTransaction" + - "StatusInvalid\020\013\022#\n\037FailedToSendBranchCom" + - "mitRequest\020\014\022%\n!FailedToSendBranchRollba" + - "ckRequest\020\r\022\025\n\021FailedToAddBranch\020\016\022\037\n\033Fa" + - "iledLockGlobalTranscation\020\017\022\026\n\022FailedWri" + - "teSession\020\020B?\n!io.seata.codec.protobuf.g" + - "eneratedB\030TransactionExceptionCodeP\001b\006pr" + - "oto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/TransactionExceptionCodeProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/TransactionExceptionCodeProto.java deleted file mode 100644 index 18626fa634a..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/TransactionExceptionCodeProto.java +++ /dev/null @@ -1,352 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: transactionExceptionCode.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf enum {@code io.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), - 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; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TransactionExceptionCodeProto valueOf(int value) { - return forNumber(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; - 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() { - 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 io.seata.codec.protobuf.generated.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 java.lang.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:io.seata.protocol.protobuf.TransactionExceptionCodeProto) -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequest.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequest.java deleted file mode 100644 index ae063ed3d7c..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequest.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: undoLogDeleteRequest.proto - -package io.seata.codec.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_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_io_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\032io.seata.p" + - "rotocol.protobuf\032 abstractTransactionReq" + - "uest.proto\032\020branchType.proto\"\343\001\n\031UndoLog" + - "DeleteRequestProto\022_\n\032abstractTransactio" + - "nRequest\030\001 \001(\0132;.io.seata.protocol.proto" + - "buf.AbstractTransactionRequestProto\022\022\n\nr" + - "esourceId\030\002 \001(\t\022\020\n\010saveDays\030\003 \001(\005\022?\n\nbra" + - "nchType\030\004 \001(\0162+.io.seata.protocol.protob" + - "uf.BranchTypeProtoB;\n!io.seata.codec.pro" + - "tobuf.generatedB\024UndoLogDeleteRequestP\001b", - "\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(), - io.seata.codec.protobuf.generated.BranchType.getDescriptor(), - }, assigner); - internal_static_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor, - new String[] { "AbstractTransactionRequest", "ResourceId", "SaveDays", "BranchType", }); - io.seata.codec.protobuf.generated.AbstractTransactionRequest.getDescriptor(); - io.seata.codec.protobuf.generated.BranchType.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequestProto.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequestProto.java deleted file mode 100644 index 7202459b054..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequestProto.java +++ /dev/null @@ -1,933 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: undoLogDeleteRequest.proto - -package io.seata.codec.protobuf.generated; - -/** - *
- * PublishRequest is a publish request.
- * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.UndoLogDeleteRequestProto} - */ -public final class UndoLogDeleteRequestProto extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.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_ = ""; - saveDays_ = 0; - branchType_ = 0; - } - - @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(); - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder subBuilder = null; - if (abstractTransactionRequest_ != null) { - subBuilder = abstractTransactionRequest_.toBuilder(); - } - abstractTransactionRequest_ = input.readMessage(io.seata.codec.protobuf.generated.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; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.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 io.seata.codec.protobuf.generated.UndoLogDeleteRequest.internal_static_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.UndoLogDeleteRequest.internal_static_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto.class, io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto.Builder.class); - } - - public static final int ABSTRACTTRANSACTIONREQUEST_FIELD_NUMBER = 1; - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - return getAbstractTransactionRequest(); - } - - public static final int RESOURCEID_FIELD_NUMBER = 2; - private volatile Object resourceId_; - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 2; - */ - 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; - */ - 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; - */ - public int getSaveDays() { - return saveDays_; - } - - public static final int BRANCHTYPE_FIELD_NUMBER = 4; - private int branchType_; - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public int getBranchTypeValue() { - return branchType_; - } - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public io.seata.codec.protobuf.generated.BranchTypeProto getBranchType() { - io.seata.codec.protobuf.generated.BranchTypeProto result = io.seata.codec.protobuf.generated.BranchTypeProto.valueOf(branchType_); - return result == null ? io.seata.codec.protobuf.generated.BranchTypeProto.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (abstractTransactionRequest_ != null) { - output.writeMessage(1, getAbstractTransactionRequest()); - } - if (!getResourceIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceId_); - } - if (saveDays_ != 0) { - output.writeInt32(3, saveDays_); - } - if (branchType_ != io.seata.codec.protobuf.generated.BranchTypeProto.AT.getNumber()) { - output.writeEnum(4, branchType_); - } - unknownFields.writeTo(output); - } - - 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 (!getResourceIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceId_); - } - if (saveDays_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, saveDays_); - } - if (branchType_ != io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto)) { - return super.equals(obj); - } - io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto other = (io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto) obj; - - boolean result = true; - result = result && (hasAbstractTransactionRequest() == other.hasAbstractTransactionRequest()); - if (hasAbstractTransactionRequest()) { - result = result && getAbstractTransactionRequest() - .equals(other.getAbstractTransactionRequest()); - } - result = result && getResourceId() - .equals(other.getResourceId()); - result = result && (getSaveDays() - == other.getSaveDays()); - result = result && branchType_ == other.branchType_; - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @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 io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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 io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.seata.codec.protobuf.generated.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); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * PublishRequest is a publish request.
-   * 
- * - * Protobuf type {@code io.seata.protocol.protobuf.UndoLogDeleteRequestProto} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.seata.protocol.protobuf.UndoLogDeleteRequestProto) - io.seata.codec.protobuf.generated.UndoLogDeleteRequestProtoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.seata.codec.protobuf.generated.UndoLogDeleteRequest.internal_static_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.seata.codec.protobuf.generated.UndoLogDeleteRequest.internal_static_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto.class, io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto.Builder.class); - } - - // Construct using io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - resourceId_ = ""; - - saveDays_ = 0; - - branchType_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.seata.codec.protobuf.generated.UndoLogDeleteRequest.internal_static_io_seata_protocol_protobuf_UndoLogDeleteRequestProto_descriptor; - } - - public io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto getDefaultInstanceForType() { - return io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto.getDefaultInstance(); - } - - public io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto build() { - io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto buildPartial() { - io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto result = new io.seata.codec.protobuf.generated.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; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto) { - return mergeFrom((io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto other) { - if (other == io.seata.codec.protobuf.generated.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; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private io.seata.codec.protobuf.generated.AbstractTransactionRequestProto abstractTransactionRequest_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> abstractTransactionRequestBuilder_; - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public boolean hasAbstractTransactionRequest() { - return abstractTransactionRequestBuilder_ != null || abstractTransactionRequest_ != null; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - return abstractTransactionRequest_ == null ? io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } else { - return abstractTransactionRequestBuilder_.getMessage(); - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - abstractTransactionRequest_ = value; - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder setAbstractTransactionRequest( - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder builderForValue) { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = builderForValue.build(); - onChanged(); - } else { - abstractTransactionRequestBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder mergeAbstractTransactionRequest(io.seata.codec.protobuf.generated.AbstractTransactionRequestProto value) { - if (abstractTransactionRequestBuilder_ == null) { - if (abstractTransactionRequest_ != null) { - abstractTransactionRequest_ = - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.newBuilder(abstractTransactionRequest_).mergeFrom(value).buildPartial(); - } else { - abstractTransactionRequest_ = value; - } - onChanged(); - } else { - abstractTransactionRequestBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public Builder clearAbstractTransactionRequest() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequest_ = null; - onChanged(); - } else { - abstractTransactionRequest_ = null; - abstractTransactionRequestBuilder_ = null; - } - - return this; - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder getAbstractTransactionRequestBuilder() { - - onChanged(); - return getAbstractTransactionRequestFieldBuilder().getBuilder(); - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - public io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder() { - if (abstractTransactionRequestBuilder_ != null) { - return abstractTransactionRequestBuilder_.getMessageOrBuilder(); - } else { - return abstractTransactionRequest_ == null ? - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.getDefaultInstance() : abstractTransactionRequest_; - } - } - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder> - getAbstractTransactionRequestFieldBuilder() { - if (abstractTransactionRequestBuilder_ == null) { - abstractTransactionRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto, io.seata.codec.protobuf.generated.AbstractTransactionRequestProto.Builder, io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder>( - getAbstractTransactionRequest(), - getParentForChildren(), - isClean()); - abstractTransactionRequest_ = null; - } - return abstractTransactionRequestBuilder_; - } - - private Object resourceId_ = ""; - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 2; - */ - 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; - */ - 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; - */ - public Builder setResourceId( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceId_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 2; - */ - public Builder clearResourceId() { - - resourceId_ = getDefaultInstance().getResourceId(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Resource id.
-     * 
- * - * string resourceId = 2; - */ - 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; - */ - public int getSaveDays() { - return saveDays_; - } - /** - *
-     **
-     * The SaveDays data.
-     * 
- * - * int32 saveDays = 3; - */ - public Builder setSaveDays(int value) { - - saveDays_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The SaveDays data.
-     * 
- * - * int32 saveDays = 3; - */ - public Builder clearSaveDays() { - - saveDays_ = 0; - onChanged(); - return this; - } - - private int branchType_ = 0; - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public int getBranchTypeValue() { - return branchType_; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public Builder setBranchTypeValue(int value) { - branchType_ = value; - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public io.seata.codec.protobuf.generated.BranchTypeProto getBranchType() { - io.seata.codec.protobuf.generated.BranchTypeProto result = io.seata.codec.protobuf.generated.BranchTypeProto.valueOf(branchType_); - return result == null ? io.seata.codec.protobuf.generated.BranchTypeProto.UNRECOGNIZED : result; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public Builder setBranchType(io.seata.codec.protobuf.generated.BranchTypeProto value) { - if (value == null) { - throw new NullPointerException(); - } - - branchType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     **
-     * The Branch type.
-     * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - public Builder clearBranchType() { - - branchType_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:io.seata.protocol.protobuf.UndoLogDeleteRequestProto) - } - - // @@protoc_insertion_point(class_scope:io.seata.protocol.protobuf.UndoLogDeleteRequestProto) - private static final io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto(); - } - - public static io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - 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; - } - - public io.seata.codec.protobuf.generated.UndoLogDeleteRequestProto getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java b/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java deleted file mode 100644 index 98083cbfef4..00000000000 --- a/codec/seata-codec-protobuf/src/main/java/io/seata/codec/protobuf/generated/UndoLogDeleteRequestProtoOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: undoLogDeleteRequest.proto - -package io.seata.codec.protobuf.generated; - -public interface UndoLogDeleteRequestProtoOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.seata.protocol.protobuf.UndoLogDeleteRequestProto) - com.google.protobuf.MessageOrBuilder { - - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - boolean hasAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest(); - /** - * .io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1; - */ - io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder(); - - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 2; - */ - String getResourceId(); - /** - *
-   **
-   * The Resource id.
-   * 
- * - * string resourceId = 2; - */ - com.google.protobuf.ByteString - getResourceIdBytes(); - - /** - *
-   **
-   * The SaveDays data.
-   * 
- * - * int32 saveDays = 3; - */ - int getSaveDays(); - - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - int getBranchTypeValue(); - /** - *
-   **
-   * The Branch type.
-   * 
- * - * .io.seata.protocol.protobuf.BranchTypeProto branchType = 4; - */ - io.seata.codec.protobuf.generated.BranchTypeProto getBranchType(); -} diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchCommitRequestConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchCommitRequestConvertorTest.java index ec556f0665f..86d8012231d 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchCommitRequestConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchCommitRequestConvertorTest.java @@ -15,8 +15,8 @@ */ package io.seata.codec.protobuf.convertor; -import io.seata.core.model.BranchType; import io.seata.codec.protobuf.generated.BranchCommitRequestProto; +import io.seata.core.model.BranchType; import io.seata.core.protocol.transaction.BranchCommitRequest; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchCommitResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchCommitResponseConvertorTest.java index 89580441653..8356a2bbd4b 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchCommitResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchCommitResponseConvertorTest.java @@ -15,10 +15,10 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.BranchCommitResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.BranchStatus; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.BranchCommitResponseProto; import io.seata.core.protocol.transaction.BranchCommitResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRegisterRequestConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRegisterRequestConvertorTest.java index 915ed14e9ce..02edbc07f62 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRegisterRequestConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRegisterRequestConvertorTest.java @@ -15,8 +15,8 @@ */ package io.seata.codec.protobuf.convertor; -import io.seata.core.model.BranchType; import io.seata.codec.protobuf.generated.BranchRegisterRequestProto; +import io.seata.core.model.BranchType; import io.seata.core.protocol.transaction.BranchRegisterRequest; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRegisterResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRegisterResponseConvertorTest.java index cea9cae6a30..a97d5a435fe 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRegisterResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRegisterResponseConvertorTest.java @@ -15,9 +15,9 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.BranchRegisterResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.BranchRegisterResponseProto; import io.seata.core.protocol.transaction.BranchRegisterResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchReportRequestConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchReportRequestConvertorTest.java index 3a0878df780..e72ec70e66a 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchReportRequestConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchReportRequestConvertorTest.java @@ -15,9 +15,9 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.BranchReportRequestProto; import io.seata.core.model.BranchStatus; import io.seata.core.model.BranchType; -import io.seata.codec.protobuf.generated.BranchReportRequestProto; import io.seata.core.protocol.transaction.BranchReportRequest; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchReportResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchReportResponseConvertorTest.java index 65d7520bfcf..d16e0299962 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchReportResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchReportResponseConvertorTest.java @@ -15,9 +15,9 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.BranchReportResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.BranchReportResponseProto; import io.seata.core.protocol.transaction.BranchReportResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRollbackRequestConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRollbackRequestConvertorTest.java index 373654fa3d3..b05526e6c35 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRollbackRequestConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRollbackRequestConvertorTest.java @@ -15,8 +15,8 @@ */ package io.seata.codec.protobuf.convertor; -import io.seata.core.model.BranchType; import io.seata.codec.protobuf.generated.BranchRollbackRequestProto; +import io.seata.core.model.BranchType; import io.seata.core.protocol.transaction.BranchRollbackRequest; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRollbackResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRollbackResponseConvertorTest.java index 4edf9da0a37..3826fa61d72 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRollbackResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/BranchRollbackResponseConvertorTest.java @@ -15,10 +15,10 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.BranchRollbackResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.BranchStatus; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.BranchRollbackResponseProto; import io.seata.core.protocol.transaction.BranchRollbackResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalBeginResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalBeginResponseConvertorTest.java index 2cf5cea690b..72e31a34a83 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalBeginResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalBeginResponseConvertorTest.java @@ -15,9 +15,9 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.GlobalBeginResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.GlobalBeginResponseProto; import io.seata.core.protocol.transaction.GlobalBeginResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalCommitResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalCommitResponseConvertorTest.java index d2433a4f972..63a4dad026c 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalCommitResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalCommitResponseConvertorTest.java @@ -15,10 +15,10 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.GlobalCommitResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.GlobalStatus; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.GlobalCommitResponseProto; import io.seata.core.protocol.transaction.GlobalCommitResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java index aaa25ab23e5..f3f8371b8a4 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java @@ -15,8 +15,8 @@ */ package io.seata.codec.protobuf.convertor; -import io.seata.core.model.BranchType; import io.seata.codec.protobuf.generated.GlobalLockQueryRequestProto; +import io.seata.core.model.BranchType; import io.seata.core.protocol.transaction.GlobalLockQueryRequest; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java index ea9d9e088f6..5f5807ea758 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalLockQueryResponseConvertorTest.java @@ -15,9 +15,9 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.GlobalLockQueryResponseProto; import io.seata.core.protocol.transaction.GlobalLockQueryResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalRollbackResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalRollbackResponseConvertorTest.java index ebd54909fe6..18607f45a98 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalRollbackResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalRollbackResponseConvertorTest.java @@ -15,10 +15,10 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.GlobalRollbackResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.GlobalStatus; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.GlobalRollbackResponseProto; import io.seata.core.protocol.transaction.GlobalRollbackResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalStatusResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalStatusResponseConvertorTest.java index 091f06dc320..3f67dbabdd3 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalStatusResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/GlobalStatusResponseConvertorTest.java @@ -15,10 +15,10 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.GlobalStatusResponseProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.GlobalStatus; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.GlobalStatusResponseProto; import io.seata.core.protocol.transaction.GlobalStatusResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/HeartbeatMessageConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/HeartbeatMessageConvertorTest.java index f6b2c7626f5..e971d914241 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/HeartbeatMessageConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/HeartbeatMessageConvertorTest.java @@ -15,8 +15,8 @@ */ package io.seata.codec.protobuf.convertor; -import io.seata.core.protocol.HeartbeatMessage; import io.seata.codec.protobuf.generated.HeartbeatMessageProto; +import io.seata.core.protocol.HeartbeatMessage; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/MergeMessageConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/MergeMessageConvertorTest.java index 7a790597bc7..ce59811f945 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/MergeMessageConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/MergeMessageConvertorTest.java @@ -15,14 +15,14 @@ */ package io.seata.codec.protobuf.convertor; -import java.util.ArrayList; - +import io.seata.codec.protobuf.generated.MergedWarpMessageProto; import io.seata.core.protocol.AbstractMessage; import io.seata.core.protocol.MergedWarpMessage; -import io.seata.codec.protobuf.generated.MergedWarpMessageProto; import io.seata.core.protocol.transaction.GlobalBeginRequest; import org.junit.jupiter.api.Test; +import java.util.ArrayList; + import static org.assertj.core.api.Assertions.assertThat; /** diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/MergeResultMessageConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/MergeResultMessageConvertorTest.java index d13e67071b4..b185242f031 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/MergeResultMessageConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/MergeResultMessageConvertorTest.java @@ -15,12 +15,12 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.MergedResultMessageProto; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.GlobalStatus; import io.seata.core.protocol.AbstractResultMessage; import io.seata.core.protocol.MergeResultMessage; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.MergedResultMessageProto; import io.seata.core.protocol.transaction.GlobalCommitResponse; import org.junit.jupiter.api.Test; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterRMRequestConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterRMRequestConvertorTest.java index 7d3e57e4903..2457295a47d 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterRMRequestConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterRMRequestConvertorTest.java @@ -15,8 +15,8 @@ */ package io.seata.codec.protobuf.convertor; -import io.seata.core.protocol.RegisterRMRequest; import io.seata.codec.protobuf.generated.RegisterRMRequestProto; +import io.seata.core.protocol.RegisterRMRequest; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterRMResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterRMResponseConvertorTest.java index 170c42e1733..94bf9b926cd 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterRMResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterRMResponseConvertorTest.java @@ -15,9 +15,9 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.RegisterRMResponseProto; import io.seata.core.protocol.RegisterRMResponse; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.RegisterRMResponseProto; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterTMRequestConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterTMRequestConvertorTest.java index 4e28f8357f6..20814c0baad 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterTMRequestConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterTMRequestConvertorTest.java @@ -15,8 +15,8 @@ */ package io.seata.codec.protobuf.convertor; -import io.seata.core.protocol.RegisterTMRequest; import io.seata.codec.protobuf.generated.RegisterTMRequestProto; +import io.seata.core.protocol.RegisterTMRequest; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterTMResponseConvertorTest.java b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterTMResponseConvertorTest.java index 46ef1368b75..c2d1ad972fe 100644 --- a/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterTMResponseConvertorTest.java +++ b/codec/seata-codec-protobuf/src/test/java/io/seata/codec/protobuf/convertor/RegisterTMResponseConvertorTest.java @@ -15,9 +15,9 @@ */ package io.seata.codec.protobuf.convertor; +import io.seata.codec.protobuf.generated.RegisterTMResponseProto; import io.seata.core.protocol.RegisterTMResponse; import io.seata.core.protocol.ResultCode; -import io.seata.codec.protobuf.generated.RegisterTMResponseProto; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/codec/seata-codec-seata/src/test/resources/file.conf b/codec/seata-codec-seata/src/test/resources/file.conf index 7ea53e40d02..383ceb6b0b3 100644 --- a/codec/seata-codec-seata/src/test/resources/file.conf +++ b/codec/seata-codec-seata/src/test/resources/file.conf @@ -19,40 +19,13 @@ transport { #auto default pin or 8 worker-thread-size = 8 } + shutdown { + # when destroy server, wait seconds + wait = 3 + } serialization = "seata" compressor = "none" } -## transaction log store -store { - ## store mode: file、db - mode = "file" - - ## file store - file { - dir = "sessionStore" - - # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions - max-branch-session-size = 16384 - # globe session size , if exceeded throws exceptions - max-global-session-size = 512 - # file buffer size , if exceeded allocate new buffer - file-write-buffer-cache-size = 16384 - # when recover batch read size - session.reload.read_size = 100 - # async, sync - flush-disk-mode = async - } - - ## database store - db { - driver_class = "" - url = "" - user = "" - password = "" - } - -} - service { #vgroup->rgroup vgroup_mapping.my_test_tx_group = "default" @@ -72,3 +45,20 @@ client { } report.retry.count = 5 } + +transaction { + undo.data.validation = true + undo.log.serialization = "jackson" + undo.log.save.days = 7 + #schedule delete expired undo_log in milliseconds + undo.log.delete.period = 86400000 + undo.log.table = "undo_log" +} + +support { + ## spring + spring { + # auto proxy the DataSource bean + datasource.autoproxy = false + } +} \ No newline at end of file diff --git a/codec/seata-codec-seata/src/test/resources/registry.conf b/codec/seata-codec-seata/src/test/resources/registry.conf index 15677236a89..e14f0d88e9d 100644 --- a/codec/seata-codec-seata/src/test/resources/registry.conf +++ b/codec/seata-codec-seata/src/test/resources/registry.conf @@ -4,7 +4,7 @@ registry { nacos { serverAddr = "localhost" - namespace = "public" + namespace = "" cluster = "default" } eureka { @@ -50,8 +50,7 @@ config { nacos { serverAddr = "localhost" - namespace = "public" - cluster = "default" + namespace = "" } apollo { app.id = "seata-server" diff --git a/common/src/main/java/io/seata/common/loader/EnhancedServiceLoader.java b/common/src/main/java/io/seata/common/loader/EnhancedServiceLoader.java index 20c23ac50a3..4d14027876b 100644 --- a/common/src/main/java/io/seata/common/loader/EnhancedServiceLoader.java +++ b/common/src/main/java/io/seata/common/loader/EnhancedServiceLoader.java @@ -313,10 +313,13 @@ private static void loadFile(Class service, String dir, ClassLoader classLoad } line = line.trim(); if (line.length() > 0) { - extensions.add(Class.forName(line, true, classLoader)); + try { + extensions.add(Class.forName(line, true, classLoader)); + } catch (LinkageError | ClassNotFoundException e) { + LOGGER.warn("load [{}] class fail. {}", line, e.getMessage()); + } } } - } catch (ClassNotFoundException e) { } catch (Throwable e) { LOGGER.warn(e.getMessage()); } finally { diff --git a/common/src/main/java/io/seata/common/util/DurationUtil.java b/common/src/main/java/io/seata/common/util/DurationUtil.java index 0ed4967a5c4..d0019c09f34 100644 --- a/common/src/main/java/io/seata/common/util/DurationUtil.java +++ b/common/src/main/java/io/seata/common/util/DurationUtil.java @@ -26,7 +26,7 @@ public class DurationUtil { public static final String DAY_UNIT = "d"; public static final String HOUR_UNIT = "h"; - public static final String MINIUTE_UNIT = "m"; + public static final String MINUTE_UNIT = "m"; public static final String SECOND_UNIT = "s"; public static final String MILLIS_SECOND_UNIT = "ms"; @@ -44,8 +44,8 @@ public static Duration parse(String str) { } else if (str.contains(HOUR_UNIT)) { Long value = doParse(HOUR_UNIT, str); return value == null ? null : Duration.ofHours(value); - } else if (str.contains(MINIUTE_UNIT)) { - Long value = doParse(MINIUTE_UNIT, str); + } else if (str.contains(MINUTE_UNIT)) { + Long value = doParse(MINUTE_UNIT, str); return value == null ? null : Duration.ofMinutes(value); } else if (str.contains(SECOND_UNIT)) { Long value = doParse(SECOND_UNIT, str); diff --git a/common/src/test/java/io/seata/common/util/BlobUtilsTest.java b/common/src/test/java/io/seata/common/util/BlobUtilsTest.java index f643ad49caa..59d1f14f94f 100644 --- a/common/src/test/java/io/seata/common/util/BlobUtilsTest.java +++ b/common/src/test/java/io/seata/common/util/BlobUtilsTest.java @@ -62,7 +62,7 @@ public void testBlob2string() throws SQLException { @Test void bytes2Blob() throws UnsupportedEncodingException, SQLException { assertNull(BlobUtils.bytes2Blob(null)); - byte[] bs = "xxa哈哈dd".getBytes(Constants.DEFAULT_CHARSET_NAME); + byte[] bs = "xxaaadd".getBytes(Constants.DEFAULT_CHARSET_NAME); assertThat(BlobUtils.bytes2Blob(bs)).isEqualTo( new SerialBlob(bs)); } @@ -70,7 +70,7 @@ void bytes2Blob() throws UnsupportedEncodingException, SQLException { @Test void blob2Bytes() throws UnsupportedEncodingException, SQLException { assertNull(BlobUtils.blob2Bytes(null)); - byte[] bs = "xxa哈哈dd".getBytes(Constants.DEFAULT_CHARSET_NAME); + byte[] bs = "xxaaadd".getBytes(Constants.DEFAULT_CHARSET_NAME); assertThat(BlobUtils.blob2Bytes(new SerialBlob(bs))).isEqualTo( bs); } diff --git a/config/seata-config-consul/src/main/java/io/seata/config/consul/ConsulConfiguration.java b/config/seata-config-consul/src/main/java/io/seata/config/consul/ConsulConfiguration.java index ca18b54903c..fc7f77cb3b9 100644 --- a/config/seata-config-consul/src/main/java/io/seata/config/consul/ConsulConfiguration.java +++ b/config/seata-config-consul/src/main/java/io/seata/config/consul/ConsulConfiguration.java @@ -207,12 +207,12 @@ private static ConsulClient getConsulClient() { * @param configFuture */ private void complete(Response response, ConfigFuture configFuture) { - Object value = response.getValue(); - if (null != response && null != value) { + if (null != response && null != response.getValue()) { + Object value = response.getValue(); if (value instanceof GetValue) { - configFuture.setResult(((GetValue) response.getValue()).getDecodedValue()); + configFuture.setResult(((GetValue) value).getDecodedValue()); } else { - configFuture.setResult(response.getValue()); + configFuture.setResult(value); } } } diff --git a/config/seata-config-core/src/main/java/io/seata/config/AbstractConfiguration.java b/config/seata-config-core/src/main/java/io/seata/config/AbstractConfiguration.java index 6cdbcd8546f..4402cfcc305 100644 --- a/config/seata-config-core/src/main/java/io/seata/config/AbstractConfiguration.java +++ b/config/seata-config-core/src/main/java/io/seata/config/AbstractConfiguration.java @@ -94,7 +94,7 @@ public Duration getDuration(String dataId, Duration defaultValue) { @Override public Duration getDuration(String dataId, Duration defaultValue, long timeoutMills) { - String result = getConfig(dataId, String.valueOf(defaultValue.toMillis() + "ms"), timeoutMills); + String result = getConfig(dataId, defaultValue.toMillis() + "ms", timeoutMills); return DurationUtil.parse(result); } diff --git a/config/seata-config-core/src/main/java/io/seata/config/ConfigFuture.java b/config/seata-config-core/src/main/java/io/seata/config/ConfigFuture.java index c1f4eae6779..fb8ac11b0bd 100644 --- a/config/seata-config-core/src/main/java/io/seata/config/ConfigFuture.java +++ b/config/seata-config-core/src/main/java/io/seata/config/ConfigFuture.java @@ -77,7 +77,6 @@ public boolean isTimeout() { * Get object. * * @return the object - * @throws InterruptedException the interrupted exception */ public Object get() { return get(this.timeoutMills, TimeUnit.MILLISECONDS); @@ -89,7 +88,6 @@ public Object get() { * @param timeout the timeout * @param unit the unit * @return the object - * @throws InterruptedException the interrupted exception */ public Object get(long timeout, TimeUnit unit) { this.timeoutMills = unit.toMillis(timeout); diff --git a/config/seata-config-core/src/main/java/io/seata/config/ConfigurationFactory.java b/config/seata-config-core/src/main/java/io/seata/config/ConfigurationFactory.java index 38ddf64f21c..737c6b3f0ab 100644 --- a/config/seata-config-core/src/main/java/io/seata/config/ConfigurationFactory.java +++ b/config/seata-config-core/src/main/java/io/seata/config/ConfigurationFactory.java @@ -15,11 +15,11 @@ */ package io.seata.config; -import java.util.Objects; - import io.seata.common.exception.NotSupportYetException; import io.seata.common.loader.EnhancedServiceLoader; +import java.util.Objects; + /** * The type Configuration factory. * @@ -29,28 +29,31 @@ public final class ConfigurationFactory { private static final String REGISTRY_CONF_PREFIX = "registry"; private static final String REGISTRY_CONF_SUFFIX = ".conf"; - private static final String ENV_SYSTEM_KEY = "SEATA_CONFIG_ENV"; - private static final String ENV_PROPERTY_KEY = "seataConfigEnv"; - private static final String DEFAULT_ENV_VALUE = "default"; - /** - * The constant FILE_INSTANCE. - */ - private static String envValue; + private static final String ENV_SYSTEM_KEY = "SEATA_ENV"; + private static final String ENV_PROPERTY_KEY = "seataEnv"; + + private static final String SYSTEM_PROPERTY_SEATA_CONFIG_NAME = "seata.config.name"; + + private static final String ENV_SEATA_CONFIG_NAME = "SEATA_CONFIG_NAME"; + + public static final Configuration CURRENT_FILE_INSTANCE; static { - String env = System.getenv(ENV_SYSTEM_KEY); - if (env != null && System.getProperty(ENV_PROPERTY_KEY) == null) { - //Help users get - System.setProperty(ENV_PROPERTY_KEY, env); + String seataConfigName = System.getProperty(SYSTEM_PROPERTY_SEATA_CONFIG_NAME); + if (null == seataConfigName) { + seataConfigName = System.getenv(ENV_SEATA_CONFIG_NAME); + } + if (null == seataConfigName) { + seataConfigName = REGISTRY_CONF_PREFIX; + } + String envValue = System.getProperty(ENV_PROPERTY_KEY); + if (null == envValue) { + envValue = System.getenv(ENV_SYSTEM_KEY); } - envValue = System.getProperty(ENV_PROPERTY_KEY); + CURRENT_FILE_INSTANCE = (null == envValue) ? new FileConfiguration(seataConfigName + REGISTRY_CONF_SUFFIX) + : new FileConfiguration(seataConfigName + "-" + envValue + REGISTRY_CONF_SUFFIX); } - private static final Configuration DEFAULT_FILE_INSTANCE = new FileConfiguration( - REGISTRY_CONF_PREFIX + REGISTRY_CONF_SUFFIX); - public static final Configuration CURRENT_FILE_INSTANCE = (envValue == null || DEFAULT_ENV_VALUE.equals(envValue)) - ? DEFAULT_FILE_INSTANCE : new FileConfiguration(REGISTRY_CONF_PREFIX + "-" + envValue - + REGISTRY_CONF_SUFFIX); private static final String NAME_KEY = "name"; private static final String FILE_TYPE = "file"; diff --git a/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java b/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java index 3eee2b98416..53efa008d14 100644 --- a/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java +++ b/config/seata-config-core/src/main/java/io/seata/config/FileConfiguration.java @@ -15,6 +15,7 @@ */ package io.seata.config; +import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -58,6 +59,8 @@ public class FileConfiguration extends AbstractConfiguration> configListenersMap = new ConcurrentHashMap<>(8); @@ -78,6 +81,10 @@ public FileConfiguration() { public FileConfiguration(String name) { if (null == name) { fileConfig = ConfigFactory.load(); + } + else if (name.startsWith(SYS_FILE_RESOURCE_PREFIX)) { + Config appConfig = ConfigFactory.parseFileAnySyntax(new File(name.substring(SYS_FILE_RESOURCE_PREFIX.length()))); + fileConfig = ConfigFactory.load(appConfig); } else { fileConfig = ConfigFactory.load(name); } diff --git a/config/seata-config-core/src/main/resources/file.conf b/config/seata-config-core/src/main/resources/file.conf index f4fb96bc879..01ed8cc81e8 100644 --- a/config/seata-config-core/src/main/resources/file.conf +++ b/config/seata-config-core/src/main/resources/file.conf @@ -26,37 +26,6 @@ transport { serialization = "seata" compressor = "none" } -## transaction log store -store { - ## store mode: file、db - mode = "file" - - ## file store - file { - dir = "sessionStore" - - # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions - max-branch-session-size = 16384 - # globe session size , if exceeded throws exceptions - max-global-session-size = 512 - # file buffer size , if exceeded allocate new buffer - file-write-buffer-cache-size = 16384 - # when recover batch read size - session.reload.read_size = 100 - # async, sync - flush-disk-mode = async - } - - ## database store - db { - driver_class = "" - url = "" - user = "" - password = "" - } - -} - service { #vgroup->rgroup vgroup_mapping.my_test_tx_group = "default" @@ -75,9 +44,23 @@ client { retry.times = 30 } report.retry.count = 5 + #schedule check table meta + table.meta.check.enable = true } transaction { undo.data.validation = true undo.log.serialization = "jackson" + undo.log.save.days = 7 + #schedule delete expired undo_log in milliseconds + undo.log.delete.period = 86400000 + undo.log.table = "undo_log" } + +support { + ## spring + spring { + # auto proxy the DataSource bean + datasource.autoproxy = false + } +} \ No newline at end of file diff --git a/config/seata-config-core/src/main/resources/registry.conf b/config/seata-config-core/src/main/resources/registry.conf index 5115876d916..2f2f2adb301 100644 --- a/config/seata-config-core/src/main/resources/registry.conf +++ b/config/seata-config-core/src/main/resources/registry.conf @@ -4,7 +4,7 @@ registry { nacos { serverAddr = "localhost" - namespace = "public" + namespace = "" cluster = "default" } eureka { @@ -50,8 +50,7 @@ config { nacos { serverAddr = "localhost" - namespace = "public" - cluster = "default" + namespace = "" } consul { serverAddr = "127.0.0.1:8500" diff --git a/config/seata-config-nacos/src/main/java/io/seata/config/nacos/NacosConfiguration.java b/config/seata-config-nacos/src/main/java/io/seata/config/nacos/NacosConfiguration.java index e4100ec851d..fe0c1314c07 100644 --- a/config/seata-config-nacos/src/main/java/io/seata/config/nacos/NacosConfiguration.java +++ b/config/seata-config-nacos/src/main/java/io/seata/config/nacos/NacosConfiguration.java @@ -43,7 +43,9 @@ public class NacosConfiguration extends AbstractConfiguration { private static final Logger LOGGER = LoggerFactory.getLogger(NacosConfiguration.class); private static final String SEATA_GROUP = "SEATA_GROUP"; private static final String PRO_SERVER_ADDR_KEY = "serverAddr"; - private static final String REGISTRY_TYPE = "nacos"; + private static final String CONFIG_TYPE = "nacos"; + private static final String DEFAULT_NAMESPACE = ""; + private static final String PRO_NAMESPACE_KEY = "namespace"; private static final Configuration FILE_CONFIG = ConfigurationFactory.CURRENT_FILE_INSTANCE; private static volatile ConfigService configService; @@ -86,7 +88,6 @@ public String getConfig(String dataId, String defaultValue, long timeoutMills) { value = configService.getConfig(dataId, SEATA_GROUP, timeoutMills); } catch (NacosException exx) { LOGGER.error(exx.getErrMsg()); - value = defaultValue; } return value == null ? defaultValue : value; } @@ -147,17 +148,33 @@ private static Properties getConfigProperties() { properties.setProperty(PRO_SERVER_ADDR_KEY, address); } } + + if (null != System.getProperty(PRO_NAMESPACE_KEY)) { + properties.setProperty(PRO_NAMESPACE_KEY, System.getProperty(PRO_NAMESPACE_KEY)); + } else { + String namespace = FILE_CONFIG.getConfig(getNacosNameSpaceFileKey()); + if (null == namespace) { + namespace = DEFAULT_NAMESPACE; + } + properties.setProperty(PRO_NAMESPACE_KEY, namespace); + } return properties; } + private static String getNacosNameSpaceFileKey() { + return ConfigurationKeys.FILE_ROOT_CONFIG + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + CONFIG_TYPE + + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + + PRO_NAMESPACE_KEY; + } + private static String getNacosAddrFileKey() { - return ConfigurationKeys.FILE_ROOT_REGISTRY + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + REGISTRY_TYPE + return ConfigurationKeys.FILE_ROOT_CONFIG + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + CONFIG_TYPE + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + PRO_SERVER_ADDR_KEY; } @Override public String getTypeName() { - return REGISTRY_TYPE; + return CONFIG_TYPE; } } diff --git a/config/seata-config-zk/src/main/java/io/seata/config/zk/ZookeeperConfiguration.java b/config/seata-config-zk/src/main/java/io/seata/config/zk/ZookeeperConfiguration.java index cee1db59333..37a1ae78f22 100644 --- a/config/seata-config-zk/src/main/java/io/seata/config/zk/ZookeeperConfiguration.java +++ b/config/seata-config-zk/src/main/java/io/seata/config/zk/ZookeeperConfiguration.java @@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory; import static io.seata.config.ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR; +import static io.seata.config.ConfigurationKeys.FILE_ROOT_CONFIG; /** * @author crazier.huang @@ -44,9 +45,8 @@ public class ZookeeperConfiguration extends AbstractConfiguration { private final static Logger LOGGER = LoggerFactory.getLogger(ZookeeperConfiguration.class); - private static final String REGISTRY_TYPE = "zk"; + private static final String CONFIG_TYPE = "zk"; private static final String ZK_PATH_SPLIT_CHAR = "/"; - private static final String FILE_ROOT_CONFIG = "config"; private static final String ROOT_PATH = ZK_PATH_SPLIT_CHAR + FILE_ROOT_CONFIG; private static final Configuration FILE_CONFIG = ConfigurationFactory.CURRENT_FILE_INSTANCE; private static final String SERVER_ADDR_KEY = "serverAddr"; @@ -55,7 +55,7 @@ public class ZookeeperConfiguration extends AbstractConfiguration(), @@ -79,7 +79,7 @@ public ZookeeperConfiguration() { @Override public String getTypeName() { - return REGISTRY_TYPE; + return CONFIG_TYPE; } @Override @@ -90,13 +90,10 @@ public String getConfig(String dataId, String defaultValue, long timeoutMills) { } FutureTask future = new FutureTask(new Callable() { @Override - public String call() throws Exception { + public String call() { String path = ROOT_PATH + ZK_PATH_SPLIT_CHAR + dataId; String value = zkClient.readData(path); - if (StringUtils.isNullOrEmpty(value)) { - return defaultValue; - } - return value; + return StringUtils.isNullOrEmpty(value) ? defaultValue : value; } }); CONFIG_EXECUTOR.execute(future); @@ -112,7 +109,7 @@ public String call() throws Exception { public boolean putConfig(String dataId, String content, long timeoutMills) { FutureTask future = new FutureTask(new Callable() { @Override - public Boolean call() throws Exception { + public Boolean call() { String path = ROOT_PATH + ZK_PATH_SPLIT_CHAR + dataId; if (!zkClient.exists(path)) { zkClient.create(path, content, CreateMode.PERSISTENT); @@ -140,7 +137,7 @@ public boolean putConfigIfAbsent(String dataId, String content, long timeoutMill public boolean removeConfig(String dataId, long timeoutMills) { FutureTask future = new FutureTask(new Callable() { @Override - public Boolean call() throws Exception { + public Boolean call() { String path = ROOT_PATH + ZK_PATH_SPLIT_CHAR + dataId; return zkClient.delete(path); } diff --git a/core/src/main/java/io/seata/core/codec/CodecType.java b/core/src/main/java/io/seata/core/codec/CodecType.java index 3f98d0c0be4..1f73520f294 100644 --- a/core/src/main/java/io/seata/core/codec/CodecType.java +++ b/core/src/main/java/io/seata/core/codec/CodecType.java @@ -34,7 +34,15 @@ public enum CodecType { *

* Math.pow(2, 1) */ - PROTOBUF((byte)0x2); + PROTOBUF((byte)0x2), + + /** + * The kryo. + *

+ * Math.pow(2, 2) + */ + KRYO((byte)0x4), + ; private final byte code; diff --git a/core/src/main/java/io/seata/core/constants/ConfigurationKeys.java b/core/src/main/java/io/seata/core/constants/ConfigurationKeys.java index 62bf022da84..a2cb3d99c66 100644 --- a/core/src/main/java/io/seata/core/constants/ConfigurationKeys.java +++ b/core/src/main/java/io/seata/core/constants/ConfigurationKeys.java @@ -98,6 +98,16 @@ public class ConfigurationKeys { */ public static final String CLIENT_REPORT_RETRY_COUNT = CLIENT_PREFIX + "report.retry.count"; + /** + * The constant CLIENT_LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT. + */ + public static final String CLIENT_LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT = CLIENT_PREFIX + "lock.retry.policy.branch-rollback-on-conflict"; + + /** + * The constant CLIENT_TABLE_META_CHECK_ENABLE. + */ + public static final String CLIENT_TABLE_META_CHECK_ENABLE = CLIENT_PREFIX + "table.meta.check.enable"; + /** * The constant SERIALIZE_FOR_RPC. @@ -264,4 +274,21 @@ public class ConfigurationKeys { * The constant TRANSACTION_UNDO_LOG_DEFAULT_TABLE. */ public static final String TRANSACTION_UNDO_LOG_DEFAULT_TABLE = "undo_log"; + + /** + * The constant SUPPORT_PREFIX. + */ + public static final String SUPPORT_PREFIX = "support."; + /** + * The constant SPRING_PREFIX. + */ + public static final String SPRING_PREFIX = "spring."; + /** + * The constant DATASOURCE_PREFIX. + */ + public static final String DATASOURCE_PREFIX = "datasource."; + /** + * The constant DATASOURCE_AUTOPROXY. + */ + public static final String DATASOURCE_AUTOPROXY = SUPPORT_PREFIX + SPRING_PREFIX + DATASOURCE_PREFIX + "autoproxy"; } diff --git a/core/src/main/java/io/seata/core/exception/BranchTransactionException.java b/core/src/main/java/io/seata/core/exception/BranchTransactionException.java new file mode 100644 index 00000000000..6e804ce0aa5 --- /dev/null +++ b/core/src/main/java/io/seata/core/exception/BranchTransactionException.java @@ -0,0 +1,92 @@ +/* + * 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 + * + * 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 io.seata.core.exception; + +/** + * The type BranchTransaction exception. + * + * @author will + */ +public class BranchTransactionException extends TransactionException{ + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + */ + public BranchTransactionException(TransactionExceptionCode code) { + super(code); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param cause the cause + */ + public BranchTransactionException(TransactionExceptionCode code, Throwable cause) { + super(code, cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param message the message + */ + public BranchTransactionException(String message) { + super(message); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param message the message + */ + public BranchTransactionException(TransactionExceptionCode code, String message) { + super(code, message); + } + + /** + * Instantiates a new Transaction exception. + * + * @param cause the cause + */ + public BranchTransactionException(Throwable cause) { + super(cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param message the message + * @param cause the cause + */ + public BranchTransactionException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param message the message + * @param cause the cause + */ + public BranchTransactionException(TransactionExceptionCode code, String message, Throwable cause) { + super(code, message, cause); + } +} diff --git a/core/src/main/java/io/seata/core/exception/GlobalTransactionException.java b/core/src/main/java/io/seata/core/exception/GlobalTransactionException.java new file mode 100644 index 00000000000..98c4cf8c4b0 --- /dev/null +++ b/core/src/main/java/io/seata/core/exception/GlobalTransactionException.java @@ -0,0 +1,92 @@ +/* + * 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 + * + * 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 io.seata.core.exception; + +/** + * The type GlobalTransaction exception. + * + * @author will + */ +public class GlobalTransactionException extends TransactionException{ + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + */ + public GlobalTransactionException(TransactionExceptionCode code) { + super(code); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param cause the cause + */ + public GlobalTransactionException(TransactionExceptionCode code, Throwable cause) { + super(code, cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param message the message + */ + public GlobalTransactionException(String message) { + super(message); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param message the message + */ + public GlobalTransactionException(TransactionExceptionCode code, String message) { + super(code, message); + } + + /** + * Instantiates a new Transaction exception. + * + * @param cause the cause + */ + public GlobalTransactionException(Throwable cause) { + super(cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param message the message + * @param cause the cause + */ + public GlobalTransactionException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param message the message + * @param cause the cause + */ + public GlobalTransactionException(TransactionExceptionCode code, String message, Throwable cause) { + super(code, message, cause); + } +} diff --git a/core/src/main/java/io/seata/core/exception/RmTransactionException.java b/core/src/main/java/io/seata/core/exception/RmTransactionException.java new file mode 100644 index 00000000000..1c2485ca326 --- /dev/null +++ b/core/src/main/java/io/seata/core/exception/RmTransactionException.java @@ -0,0 +1,92 @@ +/* + * 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 + * + * 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 io.seata.core.exception; + +/** + * The type RmTransaction exception. + * + * @author will + */ +public class RmTransactionException extends BranchTransactionException{ + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + */ + public RmTransactionException(TransactionExceptionCode code) { + super(code); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param cause the cause + */ + public RmTransactionException(TransactionExceptionCode code, Throwable cause) { + super(code, cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param message the message + */ + public RmTransactionException(String message) { + super(message); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param message the message + */ + public RmTransactionException(TransactionExceptionCode code, String message) { + super(code, message); + } + + /** + * Instantiates a new Transaction exception. + * + * @param cause the cause + */ + public RmTransactionException(Throwable cause) { + super(cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param message the message + * @param cause the cause + */ + public RmTransactionException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param message the message + * @param cause the cause + */ + public RmTransactionException(TransactionExceptionCode code, String message, Throwable cause) { + super(code, message, cause); + } +} diff --git a/core/src/main/java/io/seata/core/exception/TmTransactionException.java b/core/src/main/java/io/seata/core/exception/TmTransactionException.java new file mode 100644 index 00000000000..1b39d97670a --- /dev/null +++ b/core/src/main/java/io/seata/core/exception/TmTransactionException.java @@ -0,0 +1,92 @@ +/* + * 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 + * + * 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 io.seata.core.exception; + +/** + * The type TmTransaction exception. + * + * @author will + */ +public class TmTransactionException extends GlobalTransactionException{ + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + */ + public TmTransactionException(TransactionExceptionCode code) { + super(code); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param cause the cause + */ + public TmTransactionException(TransactionExceptionCode code, Throwable cause) { + super(code, cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param message the message + */ + public TmTransactionException(String message) { + super(message); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param message the message + */ + public TmTransactionException(TransactionExceptionCode code, String message) { + super(code, message); + } + + /** + * Instantiates a new Transaction exception. + * + * @param cause the cause + */ + public TmTransactionException(Throwable cause) { + super(cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param message the message + * @param cause the cause + */ + public TmTransactionException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Instantiates a new Transaction exception. + * + * @param code the code + * @param message the message + * @param cause the cause + */ + public TmTransactionException(TransactionExceptionCode code, String message, Throwable cause) { + super(code, message, cause); + } +} diff --git a/core/src/main/java/io/seata/core/exception/TransactionExceptionCode.java b/core/src/main/java/io/seata/core/exception/TransactionExceptionCode.java index d0902ac5ed6..afdf1437b51 100644 --- a/core/src/main/java/io/seata/core/exception/TransactionExceptionCode.java +++ b/core/src/main/java/io/seata/core/exception/TransactionExceptionCode.java @@ -28,7 +28,6 @@ public enum TransactionExceptionCode { /** * Unknown transaction exception code. */ - // Unknown, /** @@ -39,86 +38,73 @@ public enum TransactionExceptionCode { /** * Lock key conflict transaction exception code. */ - // LockKeyConflict, /** * Io transaction exception code. */ - // IO, /** * Branch rollback failed retriable transaction exception code. */ - // BranchRollbackFailed_Retriable, /** * Branch rollback failed unretriable transaction exception code. */ - // BranchRollbackFailed_Unretriable, /** * Branch register failed transaction exception code. */ - // BranchRegisterFailed, /** * Branch report failed transaction exception code. */ - // BranchReportFailed, /** * Lockable check failed transaction exception code. */ - // LockableCheckFailed, /** * Branch transaction not exist transaction exception code. */ - // BranchTransactionNotExist, /** * Global transaction not exist transaction exception code. */ - // GlobalTransactionNotExist, /** * Global transaction not active transaction exception code. */ - // GlobalTransactionNotActive, /** * Global transaction status invalid transaction exception code. */ - // GlobalTransactionStatusInvalid, /** * Failed to send branch commit request transaction exception code. */ - // FailedToSendBranchCommitRequest, /** * Failed to send branch rollback request transaction exception code. */ - // FailedToSendBranchRollbackRequest, /** * Failed to add branch transaction exception code. */ - // FailedToAddBranch, + /** * Failed to lock global transaction exception code. */ diff --git a/core/src/main/java/io/seata/core/protocol/Version.java b/core/src/main/java/io/seata/core/protocol/Version.java index e0b28109646..eb40820b2a0 100644 --- a/core/src/main/java/io/seata/core/protocol/Version.java +++ b/core/src/main/java/io/seata/core/protocol/Version.java @@ -31,7 +31,7 @@ public class Version { /** * The constant CURRENT. */ - public static final String CURRENT = "0.8.0"; + public static final String CURRENT = "0.8.1"; /** * The constant VERSION_MAP. diff --git a/core/src/main/java/io/seata/core/rpc/ChannelManager.java b/core/src/main/java/io/seata/core/rpc/ChannelManager.java index 92a5519fd12..b62347a689c 100644 --- a/core/src/main/java/io/seata/core/rpc/ChannelManager.java +++ b/core/src/main/java/io/seata/core/rpc/ChannelManager.java @@ -160,17 +160,11 @@ public static void registerRMChannel(RegisterRMRequest resourceManagerRequest, C } if (null == dbkeySet || dbkeySet.isEmpty()) { return; } for (String resourceId : dbkeySet) { - RM_CHANNELS.putIfAbsent(resourceId, - new ConcurrentHashMap>>()); - ConcurrentMap>> applicationIdMap - = RM_CHANNELS.get(resourceId); - applicationIdMap.putIfAbsent(resourceManagerRequest.getApplicationId(), - new ConcurrentHashMap>()); - ConcurrentMap> clientIpMap = applicationIdMap.get( - resourceManagerRequest.getApplicationId()); - String clientIp = getClientIpFromChannel(channel); - clientIpMap.putIfAbsent(clientIp, new ConcurrentHashMap()); - ConcurrentMap portMap = clientIpMap.get(clientIp); + String clientIp; + ConcurrentMap portMap = RM_CHANNELS.computeIfAbsent(resourceId, resourceIdKey -> new ConcurrentHashMap<>()) + .computeIfAbsent(resourceManagerRequest.getApplicationId(), applicationId -> new ConcurrentHashMap<>()) + .computeIfAbsent(clientIp = getClientIpFromChannel(channel), clientIpKey -> new ConcurrentHashMap<>()); + rpcContext.holdInResourceManagerChannels(resourceId, portMap); updateChannelsResource(resourceId, clientIp, resourceManagerRequest.getApplicationId()); } diff --git a/core/src/main/java/io/seata/core/rpc/DefaultServerMessageListenerImpl.java b/core/src/main/java/io/seata/core/rpc/DefaultServerMessageListenerImpl.java index 5aed348bd5e..9abe2515ad8 100644 --- a/core/src/main/java/io/seata/core/rpc/DefaultServerMessageListenerImpl.java +++ b/core/src/main/java/io/seata/core/rpc/DefaultServerMessageListenerImpl.java @@ -147,7 +147,7 @@ public void onCheckMessage(RpcMessage request, ChannelHandlerContext ctx, Server try { sender.sendResponse(request, ctx.channel(), HeartbeatMessage.PONG); } catch (Throwable throwable) { - LOGGER.error("", "send response error", throwable); + LOGGER.error("send response error: {}", throwable.getMessage(), throwable); } if (LOGGER.isDebugEnabled()) { LOGGER.debug("received PING from " + ctx.channel().remoteAddress()); diff --git a/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemoting.java b/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemoting.java index 750f9321fe2..8841adf070c 100644 --- a/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemoting.java +++ b/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemoting.java @@ -427,7 +427,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E try { destroyChannel(ctx.channel()); } catch (Exception e) { - LOGGER.error("", "close channel" + ctx.channel() + " fail.", e); + LOGGER.error("failed to close channel {}: {}", ctx.channel(), e.getMessage(), e); } } diff --git a/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemotingClient.java b/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemotingClient.java index 723ab3c0809..da800f2f2f1 100644 --- a/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemotingClient.java +++ b/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemotingClient.java @@ -203,7 +203,7 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { } sendRequest(ctx.channel(), HeartbeatMessage.PING); } catch (Throwable throwable) { - LOGGER.error("", "send request error", throwable); + LOGGER.error("send request error: {}", throwable.getMessage(), throwable); } } } @@ -330,7 +330,7 @@ public void run() { messageFuture.setResultMessage(null); } } - LOGGER.error("", "client merge call failed", e); + LOGGER.error("client merge call failed: {}", e.getMessage(), e); } } isSending = false; diff --git a/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemotingServer.java b/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemotingServer.java index 9ee039d7964..dc32d73c651 100644 --- a/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemotingServer.java +++ b/core/src/main/java/io/seata/core/rpc/netty/AbstractRpcRemotingServer.java @@ -15,6 +15,11 @@ */ package io.seata.core.rpc.netty; +import java.net.InetSocketAddress; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; + import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; @@ -29,7 +34,6 @@ import io.netty.handler.timeout.IdleStateHandler; import io.seata.common.XID; import io.seata.common.thread.NamedThreadFactory; -import io.seata.common.util.NetUtil; import io.seata.core.rpc.RemotingServer; import io.seata.core.rpc.netty.v1.ProtocolV1Decoder; import io.seata.core.rpc.netty.v1.ProtocolV1Encoder; @@ -37,11 +41,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.net.InetSocketAddress; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; - /** * The type Rpc remoting server. * @@ -56,7 +55,6 @@ public abstract class AbstractRpcRemotingServer extends AbstractRpcRemoting impl private final EventLoopGroup eventLoopGroupBoss; private final NettyServerConfig nettyServerConfig; private int listenPort; - private String host; private final AtomicBoolean initialized = new AtomicBoolean(false); /** @@ -81,27 +79,6 @@ public int getListenPort() { return listenPort; } - /** - * Gets the host - * - * @return - */ - public String getHost() { - return this.host; - } - - /** - * Sets the host - * - * @param host - */ - public void setHost(String host) { - if (!NetUtil.isValidIp(host, true)) { - throw new IllegalArgumentException("host: " + host + " is invalid!"); - } - this.host = host; - } - /** * Instantiates a new Rpc remoting server. * @@ -175,7 +152,7 @@ public void initChannel(SocketChannel ch) { } try { - ChannelFuture future = this.serverBootstrap.bind(host, listenPort).sync(); + ChannelFuture future = this.serverBootstrap.bind(listenPort).sync(); LOGGER.info("Server started ... "); RegistryFactory.getInstance().register(new InetSocketAddress(XID.getIpAddress(), XID.getPort())); initialized.set(true); diff --git a/core/src/main/java/io/seata/core/rpc/netty/NettyPoolKey.java b/core/src/main/java/io/seata/core/rpc/netty/NettyPoolKey.java index 91ac738dfa0..90bddcbda51 100644 --- a/core/src/main/java/io/seata/core/rpc/netty/NettyPoolKey.java +++ b/core/src/main/java/io/seata/core/rpc/netty/NettyPoolKey.java @@ -158,7 +158,7 @@ public int getValue() { } /** - * 状态值 + * value */ private int value; } diff --git a/core/src/main/java/io/seata/core/rpc/netty/RmMessageListener.java b/core/src/main/java/io/seata/core/rpc/netty/RmMessageListener.java index 4092a0ce279..f3b29773917 100644 --- a/core/src/main/java/io/seata/core/rpc/netty/RmMessageListener.java +++ b/core/src/main/java/io/seata/core/rpc/netty/RmMessageListener.java @@ -85,7 +85,7 @@ private void handleBranchRollback(RpcMessage request, String serverAddress, try { sender.sendResponse(request, serverAddress, resultMessage); } catch (Throwable throwable) { - LOGGER.error("", "send response error", throwable); + LOGGER.error("send response error: {}", throwable.getMessage(), throwable); } } diff --git a/core/src/main/java/io/seata/core/rpc/netty/RmRpcClient.java b/core/src/main/java/io/seata/core/rpc/netty/RmRpcClient.java index dc9e9deed14..3b62daa84fc 100644 --- a/core/src/main/java/io/seata/core/rpc/netty/RmRpcClient.java +++ b/core/src/main/java/io/seata/core/rpc/netty/RmRpcClient.java @@ -251,7 +251,7 @@ private void sendRegisterMessage(String serverAddress, Channel channel, String d LOGGER.info("remove channel:" + channel); } } else { - LOGGER.error("", "register failed", e); + LOGGER.error("register failed: {}", e.getMessage(), e); } } catch (TimeoutException e) { LOGGER.error(e.getMessage()); diff --git a/core/src/main/java/io/seata/core/rpc/netty/RpcServer.java b/core/src/main/java/io/seata/core/rpc/netty/RpcServer.java index e9db40e9a6b..b8ce648fd55 100644 --- a/core/src/main/java/io/seata/core/rpc/netty/RpcServer.java +++ b/core/src/main/java/io/seata/core/rpc/netty/RpcServer.java @@ -322,7 +322,7 @@ private void handleDisconnect(ChannelHandlerContext ctx) { public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof RpcMessage) { RpcMessage rpcMessage = (RpcMessage) msg; - debugLog("read:" + rpcMessage.getBody().toString()); + debugLog("read:" + rpcMessage.getBody()); if (rpcMessage.getBody() instanceof RegisterTMRequest) { serverMessageListener.onRegTmMessage(rpcMessage, ctx, this, checkAuthHandler); return; diff --git a/core/src/main/java/io/seata/core/store/db/LockStoreDataBaseDAO.java b/core/src/main/java/io/seata/core/store/db/LockStoreDataBaseDAO.java index e8d61d3e08b..094107ae8f5 100644 --- a/core/src/main/java/io/seata/core/store/db/LockStoreDataBaseDAO.java +++ b/core/src/main/java/io/seata/core/store/db/LockStoreDataBaseDAO.java @@ -15,6 +15,18 @@ */ package io.seata.core.store.db; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import javax.sql.DataSource; + import io.seata.common.exception.StoreException; import io.seata.common.executor.Initialize; import io.seata.common.loader.LoadLevel; @@ -29,17 +41,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.sql.DataSource; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - /** * The type Data base lock store. * @@ -104,10 +105,12 @@ public boolean acquireLock(List lockDOs) { ResultSet rs = null; List unrepeatedLockDOs = null; Set dbExistedRowKeys = new HashSet<>(); + boolean originalAutoCommit = true; try { conn = logStoreDataSource.getConnection(); - conn.setAutoCommit(false); - + if (originalAutoCommit = conn.getAutoCommit()) { + conn.setAutoCommit(false); + } //check lock StringBuilder sb = new StringBuilder(); for (int i = 0; i < lockDOs.size(); i++) { @@ -132,7 +135,8 @@ public boolean acquireLock(List lockDOs) { String dbPk = rs.getString(ServerTableColumnsName.LOCK_TABLE_PK); String dbTableName = rs.getString(ServerTableColumnsName.LOCK_TABLE_TABLE_NAME); Long dbBranchId = rs.getLong(ServerTableColumnsName.LOCK_TABLE_BRANCH_ID); - LOGGER.info("Global lock on [{}:{}] is holding by xid {} branchId {}", dbTableName, dbPk, dbXID, dbBranchId); + LOGGER.info("Global lock on [{}:{}] is holding by xid {} branchId {}", dbTableName, dbPk, dbXID, + dbBranchId); } canLock &= false; break; @@ -145,7 +149,8 @@ public boolean acquireLock(List lockDOs) { return false; } if (CollectionUtils.isNotEmpty(dbExistedRowKeys)) { - unrepeatedLockDOs = lockDOs.stream().filter(lockDO -> !dbExistedRowKeys.contains(lockDO.getRowKey())).collect(Collectors.toList()); + unrepeatedLockDOs = lockDOs.stream().filter(lockDO -> !dbExistedRowKeys.contains(lockDO.getRowKey())) + .collect(Collectors.toList()); } else { unrepeatedLockDOs = lockDOs; } @@ -158,7 +163,8 @@ public boolean acquireLock(List lockDOs) { for (LockDO lockDO : unrepeatedLockDOs) { if (!doAcquireLock(conn, lockDO)) { if (LOGGER.isInfoEnabled()) { - LOGGER.info("Global lock acquire failed, xid {} branchId {} pk {}", lockDO.getXid(), lockDO.getBranchId(), lockDO.getPk()); + LOGGER.info("Global lock acquire failed, xid {} branchId {} pk {}", lockDO.getXid(), + lockDO.getBranchId(), lockDO.getPk()); } conn.rollback(); return false; @@ -183,6 +189,9 @@ public boolean acquireLock(List lockDOs) { } if (conn != null) { try { + if (originalAutoCommit) { + conn.setAutoCommit(true); + } conn.close(); } catch (SQLException e) { } diff --git a/core/src/main/java/io/seata/core/store/db/LogStoreDataBaseDAO.java b/core/src/main/java/io/seata/core/store/db/LogStoreDataBaseDAO.java index 6ca2c81d10c..dbf0653d23c 100644 --- a/core/src/main/java/io/seata/core/store/db/LogStoreDataBaseDAO.java +++ b/core/src/main/java/io/seata/core/store/db/LogStoreDataBaseDAO.java @@ -16,6 +16,7 @@ package io.seata.core.store.db; import java.sql.Connection; +import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; @@ -35,6 +36,8 @@ import io.seata.core.store.BranchTransactionDO; import io.seata.core.store.GlobalTransactionDO; import io.seata.core.store.LogStore; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The type Log store data base dao. @@ -45,6 +48,17 @@ @LoadLevel(name = "db") public class LogStoreDataBaseDAO implements LogStore, Initialize { + private static final Logger LOGGER = LoggerFactory.getLogger(LogStoreDataBaseDAO.class); + + /** + * The transaction name key + */ + private static final String TRANSACTION_NAME_KEY = "TRANSACTION_NAME"; + /** + * The transaction name default size is 128 + */ + private static final int TRANSACTION_NAME_DEFAULT_SIZE = 128; + /** * The constant CONFIG. */ @@ -67,6 +81,8 @@ public class LogStoreDataBaseDAO implements LogStore, Initialize { private String dbType; + private int transactionNameColumnSize = TRANSACTION_NAME_DEFAULT_SIZE; + /** * Instantiates a new Log store data base dao. */ @@ -95,6 +111,8 @@ public void init() { if (logStoreDataSource == null) { throw new StoreException("there must be logStoreDataSource."); } + // init transaction_name size + initTransactionNameSize(); } @Override @@ -247,7 +265,10 @@ public boolean insertGlobalTransactionDO(GlobalTransactionDO globalTransactionDO ps.setInt(3, globalTransactionDO.getStatus()); ps.setString(4, globalTransactionDO.getApplicationId()); ps.setString(5, globalTransactionDO.getTransactionServiceGroup()); - ps.setString(6, globalTransactionDO.getTransactionName()); + String transactionName = globalTransactionDO.getTransactionName(); + transactionName = transactionName.length() > transactionNameColumnSize ? + transactionName.substring(0, transactionNameColumnSize) : transactionName; + ps.setString(6, transactionName); ps.setInt(7, globalTransactionDO.getTimeout()); ps.setLong(8, globalTransactionDO.getBeginTime()); ps.setString(9, globalTransactionDO.getApplicationData()); @@ -497,6 +518,63 @@ private BranchTransactionDO convertBranchTransactionDO(ResultSet rs) throws SQLE return branchTransactionDO; } + /** + * the public modifier only for test + */ + public void initTransactionNameSize() { + ColumnInfo columnInfo = queryTableStructure(globalTable, TRANSACTION_NAME_KEY); + if (columnInfo == null) { + LOGGER.warn("{} table or {} column not found", globalTable, TRANSACTION_NAME_KEY); + return ; + } + this.transactionNameColumnSize = columnInfo.getColumnSize(); + } + + /** + * query column info from table + * @param tableName the table name + * @param colName the column name + * @return the column info + */ + private ColumnInfo queryTableStructure(final String tableName, String colName) { + try(Connection conn = logStoreDataSource.getConnection()) { + DatabaseMetaData dbmd = conn.getMetaData(); + String schema = getSchema(conn); + ResultSet tableRs = dbmd.getTables(null, schema, null, new String[] { "TABLE" }); + while (tableRs.next()) { + String table = tableRs.getString("TABLE_NAME"); + if (StringUtils.equalsIgnoreCase(table, tableName)) { + ResultSet columnRs = conn.getMetaData().getColumns(null, schema, tableName, null); + while (columnRs.next()) { + ColumnInfo info = new ColumnInfo(); + String columnName = columnRs.getString("COLUMN_NAME"); + info.setColumnName(columnName); + String typeName = columnRs.getString("TYPE_NAME"); + info.setTypeName(typeName); + int columnSize = columnRs.getInt("COLUMN_SIZE"); + info.setColumnSize(columnSize); + String remarks = columnRs.getString("REMARKS"); + info.setRemarks(remarks); + if (StringUtils.equalsIgnoreCase(columnName, colName)) { + return info; + } + } + break; + } + } + } catch (SQLException e) { + LOGGER.error("query transaction_name size fail, {}", e.getMessage(), e); + } + return null; + } + + private String getSchema(Connection conn) throws SQLException { + if ("h2".equalsIgnoreCase(dbType)) { + return null; + } + return conn.getMetaData().getUserName(); + } + /** * Sets log store data source. * @@ -532,4 +610,50 @@ public void setBrachTable(String brachTable) { public void setDbType(String dbType) { this.dbType = dbType; } + + public int getTransactionNameColumnSize() { + return transactionNameColumnSize; + } + + /** + * column info + */ + private static class ColumnInfo { + private String columnName; + private String typeName; + private int columnSize; + private String remarks; + + public String getColumnName() { + return columnName; + } + + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + public String getTypeName() { + return typeName; + } + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + public int getColumnSize() { + return columnSize; + } + + public void setColumnSize(int columnSize) { + this.columnSize = columnSize; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + } } diff --git a/core/src/main/java/io/seata/core/store/db/LogStoreSqls.java b/core/src/main/java/io/seata/core/store/db/LogStoreSqls.java index e2be83015bc..e2526b0fd86 100644 --- a/core/src/main/java/io/seata/core/store/db/LogStoreSqls.java +++ b/core/src/main/java/io/seata/core/store/db/LogStoreSqls.java @@ -113,9 +113,17 @@ public class LogStoreSqls { /** * The constant QUERY_GLOBAL_TRANSACTION_BY_STATUS. */ - public static final String QUERY_GLOBAL_TRANSACTION_BY_STATUS = "select " + ALL_GLOBAL_COLUMNS + " from " - + GLOBAL_TABLE_PLACEHOLD + - " where " + ServerTableColumnsName.GLOBAL_TABLE_STATUS + " in (" + PRAMETER_PLACEHOLD + ") order by " + ServerTableColumnsName.GLOBAL_TABLE_GMT_MODIFIED + " limit ?"; + public static final String QUERY_GLOBAL_TRANSACTION_BY_STATUS_MYSQL = + "select " + ALL_GLOBAL_COLUMNS + " from " + GLOBAL_TABLE_PLACEHOLD + + " where " + ServerTableColumnsName.GLOBAL_TABLE_STATUS + " in (" + PRAMETER_PLACEHOLD + ")" + + " order by " + ServerTableColumnsName.GLOBAL_TABLE_GMT_MODIFIED + " limit ?"; + + public static final String QUERY_GLOBAL_TRANSACTION_BY_STATUS_ORACLE = + "select t.* from (" + + " select " + ALL_GLOBAL_COLUMNS + " from " + GLOBAL_TABLE_PLACEHOLD + + " where " + ServerTableColumnsName.GLOBAL_TABLE_STATUS + " in (" + PRAMETER_PLACEHOLD + ")" + + " order by " + ServerTableColumnsName.GLOBAL_TABLE_GMT_MODIFIED + ") t" + + " where ROWNUM <= ?"; /** * The constant QUERY_GLOBAL_TRANSACTION_FOR_RECOVERY_MYSQL. */ @@ -257,8 +265,17 @@ public static String getQueryGlobalTransactionSQLByTransactionId(String globalTa */ public static String getQueryGlobalTransactionSQLByStatus(String globalTable, String dbType, String paramsPlaceHolder) { - return QUERY_GLOBAL_TRANSACTION_BY_STATUS.replace(GLOBAL_TABLE_PLACEHOLD, globalTable).replace( - PRAMETER_PLACEHOLD, paramsPlaceHolder); + if (DBType.MYSQL.name().equalsIgnoreCase(dbType) + || DBType.OCEANBASE.name().equalsIgnoreCase(dbType) + || DBType.H2.name().equalsIgnoreCase(dbType)) { + return QUERY_GLOBAL_TRANSACTION_BY_STATUS_MYSQL.replace(GLOBAL_TABLE_PLACEHOLD, globalTable).replace( + PRAMETER_PLACEHOLD, paramsPlaceHolder); + } else if (DBType.ORACLE.name().equalsIgnoreCase(dbType)) { + return QUERY_GLOBAL_TRANSACTION_BY_STATUS_ORACLE.replace(GLOBAL_TABLE_PLACEHOLD, globalTable).replace( + PRAMETER_PLACEHOLD, paramsPlaceHolder); + } else { + throw new IllegalArgumentException("unknown database type"); + } } /** diff --git a/core/src/test/java/io/seata/core/message/RegisterTMRequestTest.java b/core/src/test/java/io/seata/core/message/RegisterTMRequestTest.java new file mode 100644 index 00000000000..eae57ff4c79 --- /dev/null +++ b/core/src/test/java/io/seata/core/message/RegisterTMRequestTest.java @@ -0,0 +1,43 @@ +/* + * 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 + * + * 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 io.seata.core.message; + +import io.seata.core.protocol.RegisterTMRequest; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +/** + * The type Register tm request test. + * + * @author linqiuping + */ +public class RegisterTMRequestTest { + + /** + * Test to string. + * + * @throws Exception the exception + */ + @Test + public void testToString() throws Exception { + RegisterTMRequest registerTMRequest = new RegisterTMRequest(); + registerTMRequest.setApplicationId("seata"); + registerTMRequest.setTransactionServiceGroup("daliy_2019"); + registerTMRequest.setVersion("2019-snapshot"); + Assertions.assertEquals("RegisterTMRequest{applicationId='seata', transactionServiceGroup='daliy_2019'}", + registerTMRequest.toString()); + } +} diff --git a/core/src/test/java/io/seata/core/message/RegisterTMResponseTest.java b/core/src/test/java/io/seata/core/message/RegisterTMResponseTest.java index 854275290cb..e546d10bab2 100644 --- a/core/src/test/java/io/seata/core/message/RegisterTMResponseTest.java +++ b/core/src/test/java/io/seata/core/message/RegisterTMResponseTest.java @@ -34,13 +34,10 @@ public class RegisterTMResponseTest { @Test public void testToString() throws Exception { RegisterTMResponse registerTMResponse = new RegisterTMResponse(); - registerTMResponse.setVersion("1"); registerTMResponse.setIdentified(true); registerTMResponse.setResultCode(ResultCode.Success); - Assertions.assertEquals("version=1,extraData=null,identified=true,resultCode=Success,msg=null", - registerTMResponse.toString()); - + registerTMResponse.toString()); } } diff --git a/core/src/test/java/io/seata/core/store/db/LogStoreDataBaseDAOTest.java b/core/src/test/java/io/seata/core/store/db/LogStoreDataBaseDAOTest.java index 5859419e369..43a748557db 100644 --- a/core/src/test/java/io/seata/core/store/db/LogStoreDataBaseDAOTest.java +++ b/core/src/test/java/io/seata/core/store/db/LogStoreDataBaseDAOTest.java @@ -69,7 +69,7 @@ private static void prepareTable(BasicDataSource dataSource) { } catch (Exception e) { } // xid, transaction_id, status, application_id, transaction_service_group, transaction_name, timeout, begin_time, application_data, gmt_create, gmt_modified - s.execute("CREATE TABLE global_table ( xid varchar(96) primary key, transaction_id long , STATUS int, application_id varchar(32), transaction_service_group varchar(32) ,transaction_name varchar(32) ,timeout int, begin_time long, application_data varchar(500), gmt_create TIMESTAMP(6) ,gmt_modified TIMESTAMP(6) ) "); + s.execute("CREATE TABLE global_table ( xid varchar(96) primary key, transaction_id long , STATUS int, application_id varchar(32), transaction_service_group varchar(32) ,transaction_name varchar(128) ,timeout int, begin_time long, application_data varchar(500), gmt_create TIMESTAMP(6) ,gmt_modified TIMESTAMP(6) ) "); System.out.println("create table global_table success."); try { diff --git a/discovery/seata-discovery-core/src/test/java/io/seata/discovery/loadbalance/LoadBalanceFactoryTest.java b/discovery/seata-discovery-core/src/test/java/io/seata/discovery/loadbalance/LoadBalanceFactoryTest.java index 0f777a3d081..062ae3f5813 100644 --- a/discovery/seata-discovery-core/src/test/java/io/seata/discovery/loadbalance/LoadBalanceFactoryTest.java +++ b/discovery/seata-discovery-core/src/test/java/io/seata/discovery/loadbalance/LoadBalanceFactoryTest.java @@ -92,7 +92,8 @@ public void testSubscribe(LoadBalance loadBalance) throws Exception { List addressList = registryService.lookup("my_test_tx_group"); InetSocketAddress balanceAddress = loadBalance.select(addressList); Assertions.assertNotNull(balanceAddress); - TimeUnit.SECONDS.sleep(30);//等待testUnRegistry事件触发 + //wait trigger testUnRegistry + TimeUnit.SECONDS.sleep(30); List addressList1 = registryService.lookup("my_test_tx_group"); Assertions.assertEquals(1, addressList1.size()); } diff --git a/discovery/seata-discovery-etcd3/src/main/java/io/seata/discovery/registry/etcd3/EtcdRegistryServiceImpl.java b/discovery/seata-discovery-etcd3/src/main/java/io/seata/discovery/registry/etcd3/EtcdRegistryServiceImpl.java index fd71f252644..e18f8ba5cea 100644 --- a/discovery/seata-discovery-etcd3/src/main/java/io/seata/discovery/registry/etcd3/EtcdRegistryServiceImpl.java +++ b/discovery/seata-discovery-etcd3/src/main/java/io/seata/discovery/registry/etcd3/EtcdRegistryServiceImpl.java @@ -34,6 +34,7 @@ import io.seata.config.Configuration; import io.seata.config.ConfigurationFactory; import io.seata.discovery.registry.RegistryService; +import java.util.Objects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -85,7 +86,7 @@ public class EtcdRegistryServiceImpl implements RegistryService private final static long LIFE_KEEP_CRITICAL = 6; private static volatile EtcdRegistryServiceImpl instance; private static volatile Client client; - private ConcurrentMap> clusterAddressMap; + private ConcurrentMap>> clusterAddressMap; private ConcurrentMap> listenerMap; private ConcurrentMap watcherMap; private static long leaseId = 0; @@ -158,7 +159,7 @@ private void doUnregister(InetSocketAddress address) throws Exception { public void subscribe(String cluster, Watch.Listener listener) throws Exception { listenerMap.putIfAbsent(cluster, new HashSet<>()); listenerMap.get(cluster).add(listener); - EtcdWatcher watcher = watcherMap.computeIfAbsent(cluster, w -> new EtcdWatcher(listener)); + EtcdWatcher watcher = watcherMap.computeIfAbsent(cluster, w -> new EtcdWatcher(cluster, listener)); executorService.submit(watcher); } @@ -212,7 +213,7 @@ public void onCompleted() { }); } - return clusterAddressMap.get(cluster); + return clusterAddressMap.get(cluster).getValue(); } @Override @@ -244,7 +245,7 @@ private void refreshCluster(String cluster) throws Exception { String[] instanceInfo = keyValue.getValue().toString(UTF_8).split(":"); return new InetSocketAddress(instanceInfo[0], Integer.parseInt(instanceInfo[1])); }).collect(Collectors.toList()); - clusterAddressMap.put(cluster, instanceList); + clusterAddressMap.put(cluster, new Pair<>(getResponse.getHeader().getRevision(), instanceList)); } /** @@ -390,16 +391,23 @@ public Boolean call() { private class EtcdWatcher implements Runnable { private final Watch.Listener listener; private Watch.Watcher watcher; + private String cluster; - public EtcdWatcher(Watch.Listener listener) { + public EtcdWatcher(String cluster, Watch.Listener listener) { + this.cluster = cluster; this.listener = listener; } @Override public void run() { Watch watchClient = getClient().getWatchClient(); - WatchOption watchOption = WatchOption.newBuilder().withPrefix(buildRegistryKeyPrefix()).build(); - this.watcher = watchClient.watch(buildRegistryKeyPrefix(), watchOption, this.listener); + WatchOption.Builder watchOptionBuilder = WatchOption.newBuilder().withPrefix(buildRegistryKeyPrefix()); + Pair> addressPair = clusterAddressMap.get(cluster); + if (Objects.nonNull(addressPair)) { + // Maybe addressPair isn't newest now, but it's ok + watchOptionBuilder.withRevision(addressPair.getKey()); + } + this.watcher = watchClient.watch(buildRegistryKeyPrefix(), watchOptionBuilder.build(), this.listener); } /** @@ -409,4 +417,39 @@ public void stop() { this.watcher.close(); } } + + private static class Pair { + + /** + * Key of this Pair. + */ + private K key; + + /** + * Value of this this Pair. + */ + private V value; + + /** + * Creates a new pair + * @param key The key for this pair + * @param value The value to use for this pair + */ + public Pair(K key, V value) { + this.key = key; + this.value = value; + } + + /** + * Gets the key for this pair. + * @return key for this pair + */ + public K getKey() { return key; } + + /** + * Gets the value for this pair. + * @return value for this pair + */ + public V getValue() { return value; } + } } diff --git a/discovery/seata-discovery-nacos/src/main/java/io/seata/discovery/registry/nacos/NacosRegistryServiceImpl.java b/discovery/seata-discovery-nacos/src/main/java/io/seata/discovery/registry/nacos/NacosRegistryServiceImpl.java index e6b57d18b22..575e0fd64b4 100644 --- a/discovery/seata-discovery-nacos/src/main/java/io/seata/discovery/registry/nacos/NacosRegistryServiceImpl.java +++ b/discovery/seata-discovery-nacos/src/main/java/io/seata/discovery/registry/nacos/NacosRegistryServiceImpl.java @@ -41,7 +41,7 @@ * @date 2019 /1/31 */ public class NacosRegistryServiceImpl implements RegistryService { - private static final String DEFAULT_NAMESPACE = "public"; + private static final String DEFAULT_NAMESPACE = ""; private static final String DEFAULT_CLUSTER = "default"; private static final String PRO_SERVER_ADDR_KEY = "serverAddr"; private static final String PRO_NAMESPACE_KEY = "namespace"; diff --git a/discovery/seata-discovery-redis/src/main/java/io/seata/discovery/registry/redis/RedisListener.java b/discovery/seata-discovery-redis/src/main/java/io/seata/discovery/registry/redis/RedisListener.java index cd9e989afee..b31f5609382 100644 --- a/discovery/seata-discovery-redis/src/main/java/io/seata/discovery/registry/redis/RedisListener.java +++ b/discovery/seata-discovery-redis/src/main/java/io/seata/discovery/registry/redis/RedisListener.java @@ -32,7 +32,7 @@ public interface RedisListener { String UN_REGISTER = "unregister"; /** - * 用于订阅redis事件 + * use for redis event * * @param event the event */ diff --git a/metrics/seata-metrics-registry-compact/src/main/java/io/seata/metrics/registry/compact/SummaryValue.java b/metrics/seata-metrics-registry-compact/src/main/java/io/seata/metrics/registry/compact/SummaryValue.java index cc1fa37dd8b..dc65a8e297f 100644 --- a/metrics/seata-metrics-registry-compact/src/main/java/io/seata/metrics/registry/compact/SummaryValue.java +++ b/metrics/seata-metrics-registry-compact/src/main/java/io/seata/metrics/registry/compact/SummaryValue.java @@ -55,7 +55,7 @@ public void increase() { } public void increase(long value) { - if (value <= 0) { + if (value < 0) { return; } this.count.increment(); diff --git a/metrics/seata-metrics-registry-compact/src/main/java/io/seata/metrics/registry/compact/TimerValue.java b/metrics/seata-metrics-registry-compact/src/main/java/io/seata/metrics/registry/compact/TimerValue.java index 96f08206f0d..9b7d6edb469 100644 --- a/metrics/seata-metrics-registry-compact/src/main/java/io/seata/metrics/registry/compact/TimerValue.java +++ b/metrics/seata-metrics-registry-compact/src/main/java/io/seata/metrics/registry/compact/TimerValue.java @@ -56,7 +56,7 @@ public TimerValue() { } public void record(long value, TimeUnit unit) { - if (value <= 0) { + if (value < 0) { return; } long changeValue = unit == TimeUnit.MICROSECONDS ? value : TimeUnit.MICROSECONDS.convert(value, unit); diff --git a/pom.xml b/pom.xml index 50b39c4390d..f340b0994a1 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ - 0.8.0 + 0.8.1 1.8 @@ -102,6 +102,7 @@ 3.8 3.0.0 2.2.1 + 0.5.0 3.0 3.0.0 @@ -279,6 +280,24 @@ + + org.xolstice.maven.plugins + protobuf-maven-plugin + ${protobuf-maven-plugin.version} + + ${project.basedir}/src/main/resources/protobuf/io/seata/protocol/transcation/ + + com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier} + + + + + + compile + + + + org.apache.maven.plugins maven-source-plugin diff --git a/rm-datasource/pom.xml b/rm-datasource/pom.xml index 6bd8c2a57c2..504c7b96ad2 100644 --- a/rm-datasource/pom.xml +++ b/rm-datasource/pom.xml @@ -71,6 +71,15 @@ test + + com.esotericsoftware + kryo + + + de.javakaffee + kryo-serializers + + diff --git a/rm-datasource/src/main/java/io/seata/rm/RMHandlerAT.java b/rm-datasource/src/main/java/io/seata/rm/RMHandlerAT.java index ec667e6be6e..55c742ef2d2 100644 --- a/rm-datasource/src/main/java/io/seata/rm/RMHandlerAT.java +++ b/rm-datasource/src/main/java/io/seata/rm/RMHandlerAT.java @@ -25,7 +25,7 @@ import io.seata.core.protocol.transaction.UndoLogDeleteRequest; import io.seata.rm.datasource.DataSourceManager; import io.seata.rm.datasource.DataSourceProxy; -import io.seata.rm.datasource.undo.UndoLogManager; +import io.seata.rm.datasource.undo.UndoLogManagerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,8 +55,8 @@ public void handle(UndoLogDeleteRequest request) { int deleteRows = 0; do { try { - deleteRows = UndoLogManager.deleteUndoLogByLogCreated(logCreatedSave, dataSourceProxy.getDbType(), - LIMIT_ROWS, conn); + deleteRows = UndoLogManagerFactory.getUndoLogManager(dataSourceProxy.getDbType()) + .deleteUndoLogByLogCreated(logCreatedSave, LIMIT_ROWS, conn); if (deleteRows > 0 && !conn.getAutoCommit()) { conn.commit(); } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/AsyncWorker.java b/rm-datasource/src/main/java/io/seata/rm/datasource/AsyncWorker.java index 5499fc02b01..109cc93d666 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/AsyncWorker.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/AsyncWorker.java @@ -26,8 +26,7 @@ import io.seata.core.model.BranchType; import io.seata.core.model.ResourceManagerInbound; import io.seata.rm.DefaultResourceManager; -import io.seata.rm.datasource.undo.UndoLogManager; -import io.seata.rm.datasource.undo.UndoLogManagerOracle; +import io.seata.rm.datasource.undo.UndoLogManagerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -181,11 +180,7 @@ private void doBranchCommits() { int maxSize = xids.size() > branchIds.size() ? xids.size() : branchIds.size(); if(maxSize == UNDOLOG_DELETE_LIMIT_SIZE){ try { - if(JdbcConstants.ORACLE.equalsIgnoreCase(dataSourceProxy.getDbType())) { - UndoLogManagerOracle.batchDeleteUndoLog(xids, branchIds, conn); - } else { - UndoLogManager.batchDeleteUndoLog(xids, branchIds, conn); - } + UndoLogManagerFactory.getUndoLogManager(dataSourceProxy.getDbType()).batchDeleteUndoLog(xids, branchIds, conn); } catch (Exception ex) { LOGGER.warn("Failed to batch delete undo log [" + branchIds + "/" + xids + "]", ex); } @@ -199,11 +194,7 @@ private void doBranchCommits() { } try { - if(JdbcConstants.ORACLE.equalsIgnoreCase(dataSourceProxy.getDbType())) { - UndoLogManagerOracle.batchDeleteUndoLog(xids, branchIds, conn); - } else { - UndoLogManager.batchDeleteUndoLog(xids, branchIds, conn); - } + UndoLogManagerFactory.getUndoLogManager(dataSourceProxy.getDbType()).batchDeleteUndoLog(xids, branchIds, conn); }catch (Exception ex) { LOGGER.warn("Failed to batch delete undo log [" + branchIds + "/" + xids + "]", ex); } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionContext.java b/rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionContext.java index a32cfce07af..bc454d35bb0 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionContext.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionContext.java @@ -158,7 +158,7 @@ void setBranchId(Long branchId) { /** * Reset. */ - void reset(){ + public void reset() { this.reset(null); } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionProxy.java b/rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionProxy.java index b74fda21e40..703f19e7a95 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionProxy.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionProxy.java @@ -15,10 +15,13 @@ */ package io.seata.rm.datasource; -import com.alibaba.druid.util.JdbcConstants; import java.sql.Connection; import java.sql.SQLException; +import java.util.concurrent.Callable; + +import com.alibaba.druid.util.JdbcConstants; +import io.seata.common.util.StringUtils; import io.seata.config.ConfigurationFactory; import io.seata.core.constants.ConfigurationKeys; import io.seata.core.exception.TransactionException; @@ -27,9 +30,9 @@ import io.seata.core.model.BranchType; import io.seata.rm.DefaultResourceManager; import io.seata.rm.datasource.exec.LockConflictException; +import io.seata.rm.datasource.exec.LockRetryController; import io.seata.rm.datasource.undo.SQLUndoLog; -import io.seata.rm.datasource.undo.UndoLogManager; -import io.seata.rm.datasource.undo.UndoLogManagerOracle; +import io.seata.rm.datasource.undo.UndoLogManagerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,9 +49,11 @@ public class ConnectionProxy extends AbstractConnectionProxy { private static final int DEFAULT_REPORT_RETRY_COUNT = 5; - private static int REPORT_RETRY_COUNT = ConfigurationFactory.getInstance().getInt( + private static final int REPORT_RETRY_COUNT = ConfigurationFactory.getInstance().getInt( ConfigurationKeys.CLIENT_REPORT_RETRY_COUNT, DEFAULT_REPORT_RETRY_COUNT); + private final static LockRetryPolicy LOCK_RETRY_POLICY = new LockRetryPolicy(); + /** * Instantiates a new Connection proxy. * @@ -108,29 +113,39 @@ public void checkLock(String lockKeys) throws SQLException { throw new LockConflictException(); } } catch (TransactionException e) { - recognizeLockKeyConflictException(e); + recognizeLockKeyConflictException(e, lockKeys); } } /** - * Register. + * Lock query. * - * @param lockKeys the lockKeys + * @param lockKeys the lock keys * @throws SQLException the sql exception */ - public void register(String lockKeys) throws SQLException { + public boolean lockQuery(String lockKeys) throws SQLException { // Just check lock without requiring lock by now. + boolean result = false; try { - DefaultResourceManager.get().branchRegister(BranchType.AT, getDataSourceProxy().getResourceId(), null, - context.getXid(), null, lockKeys); + result = DefaultResourceManager.get().lockQuery(BranchType.AT, getDataSourceProxy().getResourceId(), + context.getXid(), lockKeys); } catch (TransactionException e) { - recognizeLockKeyConflictException(e); + recognizeLockKeyConflictException(e, lockKeys); } + return result; } private void recognizeLockKeyConflictException(TransactionException te) throws SQLException { + recognizeLockKeyConflictException(te, null); + } + + private void recognizeLockKeyConflictException(TransactionException te, String lockKeys) throws SQLException { if (te.getCode() == TransactionExceptionCode.LockKeyConflict) { - throw new LockConflictException(); + StringBuilder reasonBuilder = new StringBuilder("get global lock fail, xid:" + context.getXid()); + if (StringUtils.isNotBlank(lockKeys)) { + reasonBuilder.append(", lockKeys:" + lockKeys); + } + throw new LockConflictException(reasonBuilder.toString()); } else { throw new SQLException(te); } @@ -157,6 +172,19 @@ public void appendLockKey(String lockKey) { @Override public void commit() throws SQLException { + try { + LOCK_RETRY_POLICY.execute(() -> { + doCommit(); + return null; + }); + } catch (SQLException e) { + throw e; + } catch (Exception e) { + throw new SQLException(e); + } + } + + private void doCommit() throws SQLException { if (context.inGlobalTransaction()) { processGlobalTransactionCommit(); } else if (context.isGlobalLockRequire()) { @@ -181,23 +209,18 @@ private void processGlobalTransactionCommit() throws SQLException { try { register(); } catch (TransactionException e) { - recognizeLockKeyConflictException(e); + recognizeLockKeyConflictException(e, context.buildLockKeys()); } try { if (context.hasUndoLog()) { - if(JdbcConstants.ORACLE.equalsIgnoreCase(this.getDbType())) { - UndoLogManagerOracle.flushUndoLogs(this); - } else { - UndoLogManager.flushUndoLogs(this); - } + UndoLogManagerFactory.getUndoLogManager(this.getDbType()).flushUndoLogs(this); } targetConnection.commit(); } catch (Throwable ex) { + LOGGER.error("process connectionProxy commit error: {}", ex.getMessage(), ex); report(false); - if (ex instanceof SQLException) { - throw new SQLException(ex); - } + throw new SQLException(ex); } report(true); context.reset(); @@ -224,7 +247,7 @@ public void rollback() throws SQLException { public void setAutoCommit(boolean autoCommit) throws SQLException { if ((autoCommit) && !getAutoCommit()) { // change autocommit from false to true, we should commit() first according to JDBC spec. - commit(); + doCommit(); } targetConnection.setAutoCommit(autoCommit); } @@ -247,4 +270,41 @@ private void report(boolean commitDone) throws SQLException { } } } + + public static class LockRetryPolicy { + protected final static boolean LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT = + ConfigurationFactory.getInstance().getBoolean(ConfigurationKeys.CLIENT_LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT, true); + + public T execute(Callable callable) throws Exception { + if (LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT) { + return callable.call(); + } else { + return doRetryOnLockConflict(callable); + } + } + + protected T doRetryOnLockConflict(Callable callable) throws Exception { + LockRetryController lockRetryController = new LockRetryController(); + while (true) { + try { + return callable.call(); + } catch (LockConflictException lockConflict) { + onException(lockConflict); + lockRetryController.sleep(lockConflict); + } catch (Exception e) { + onException(e); + throw e; + } + } + } + + /** + * Callback on exception in doLockRetryOnConflict. + * + * @param e invocation exception + * @throws Exception error + */ + protected void onException(Exception e) throws Exception { + } + } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/DataCompareUtils.java b/rm-datasource/src/main/java/io/seata/rm/datasource/DataCompareUtils.java index be5e859b8c8..c8fa6f6186f 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/DataCompareUtils.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/DataCompareUtils.java @@ -22,7 +22,7 @@ import io.seata.rm.datasource.sql.struct.Row; import io.seata.rm.datasource.sql.struct.TableMeta; import io.seata.rm.datasource.sql.struct.TableRecords; -import io.seata.rm.datasource.undo.UndoLogManager; +import io.seata.rm.datasource.undo.AbstractUndoLogManager; import io.seata.rm.datasource.undo.parser.FastjsonUndoLogParser; import java.math.BigDecimal; @@ -62,7 +62,7 @@ public static Result isFieldEquals(Field f0, Field f1) { if (f1.getValue() == null) { return Result.buildWithParams(false, "Field not equals, name {}, new value is null", f0.getName()); } else { - String currentSerializer = UndoLogManager.getCurrentSerializer(); + String currentSerializer = AbstractUndoLogManager.getCurrentSerializer(); if (StringUtils.equals(currentSerializer, FastjsonUndoLogParser.NAME)) { convertType(f0, f1); } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceManager.java b/rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceManager.java index be6619e160e..6bdc457b1f0 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceManager.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceManager.java @@ -15,14 +15,13 @@ */ package io.seata.rm.datasource; -import com.alibaba.druid.util.JdbcConstants; - import io.seata.common.exception.FrameworkException; import io.seata.common.exception.NotSupportYetException; import io.seata.common.exception.ShouldNeverHappenException; import io.seata.common.executor.Initialize; import io.seata.common.util.NetUtil; import io.seata.core.context.RootContext; +import io.seata.core.exception.RmTransactionException; import io.seata.core.exception.TransactionException; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.BranchStatus; @@ -38,8 +37,7 @@ import io.seata.discovery.loadbalance.LoadBalanceFactory; import io.seata.discovery.registry.RegistryFactory; import io.seata.rm.AbstractResourceManager; -import io.seata.rm.datasource.undo.UndoLogManager; -import io.seata.rm.datasource.undo.UndoLogManagerOracle; +import io.seata.rm.datasource.undo.UndoLogManagerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.net.InetSocketAddress; @@ -97,9 +95,9 @@ public boolean lockQuery(BranchType branchType, String resourceId, String xid, S } return response.isLockable(); } catch (TimeoutException toe) { - throw new TransactionException(TransactionExceptionCode.IO, "RPC Timeout", toe); + throw new RmTransactionException(TransactionExceptionCode.IO, "RPC Timeout", toe); } catch (RuntimeException rex) { - throw new TransactionException(TransactionExceptionCode.LockableCheckFailed, "Runtime", rex); + throw new RmTransactionException(TransactionExceptionCode.LockableCheckFailed, "Runtime", rex); } } @@ -178,14 +176,7 @@ public BranchStatus branchRollback(BranchType branchType, String xid, long branc throw new ShouldNeverHappenException(); } try { - if(JdbcConstants.ORACLE.equalsIgnoreCase(dataSourceProxy.getDbType())) { - UndoLogManagerOracle.undo(dataSourceProxy, xid, branchId); - } - else if(JdbcConstants.MYSQL.equalsIgnoreCase(dataSourceProxy.getDbType())){ - UndoLogManager.undo(dataSourceProxy, xid, branchId); - } else { - throw new NotSupportYetException("DbType[" + dataSourceProxy.getDbType() + "] is not support yet!"); - } + UndoLogManagerFactory.getUndoLogManager(dataSourceProxy.getDbType()).undo(dataSourceProxy, xid, branchId); } catch (TransactionException te) { if (LOGGER.isInfoEnabled()) { LOGGER.info("branchRollback failed reason [{}]", te.getMessage()); diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceProxy.java b/rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceProxy.java index 5d2b71fd99d..51769e89eae 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceProxy.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceProxy.java @@ -20,12 +20,11 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; - import javax.sql.DataSource; - import com.alibaba.druid.util.JdbcUtils; - import io.seata.common.thread.NamedThreadFactory; +import io.seata.config.ConfigurationFactory; +import io.seata.core.constants.ConfigurationKeys; import io.seata.core.model.BranchType; import io.seata.core.model.Resource; import io.seata.rm.DefaultResourceManager; @@ -49,10 +48,16 @@ public class DataSourceProxy extends AbstractDataSourceProxy implements Resource private String jdbcUrl; private String dbType; + + /** + * Enable the table meta checker + */ + private static boolean ENABLE_TABLE_META_CHECKER_ENABLE = ConfigurationFactory.getInstance().getBoolean(ConfigurationKeys.CLIENT_TABLE_META_CHECK_ENABLE, true); + /** * Table meta checker interval */ - private static final long TABLE_MATA_CHECKER_INTERVAL = 60000L; + private static final long TABLE_META_CHECKER_INTERVAL = 60000L; private final ScheduledExecutorService tableMetaExcutor = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory("tableMetaChecker", 1, true)); @@ -85,12 +90,14 @@ private void init(DataSource dataSource, String resourceGroupId) { throw new IllegalStateException("can not init dataSource", e); } DefaultResourceManager.get().registerResource(this); - tableMetaExcutor.scheduleAtFixedRate(new Runnable() { - @Override - public void run() { - TableMetaCache.refresh(DataSourceProxy.this); - } - }, 0, TABLE_MATA_CHECKER_INTERVAL, TimeUnit.MILLISECONDS); + if(ENABLE_TABLE_META_CHECKER_ENABLE){ + tableMetaExcutor.scheduleAtFixedRate(new Runnable() { + @Override + public void run() { + TableMetaCache.refresh(DataSourceProxy.this); + } + }, 0, TABLE_META_CHECKER_INTERVAL, TimeUnit.MILLISECONDS); + } } /** diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/PreparedStatementProxy.java b/rm-datasource/src/main/java/io/seata/rm/datasource/PreparedStatementProxy.java index 492d59be5f2..461a5ffa26f 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/PreparedStatementProxy.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/PreparedStatementProxy.java @@ -36,14 +36,6 @@ public ArrayList[] getParameters() { return parameters; } - private void init() throws SQLException { - int paramCount = targetStatement.getParameterMetaData().getParameterCount(); - this.parameters = new ArrayList[paramCount]; - for (int i = 0; i < paramCount; i++) { - parameters[i] = new ArrayList<>(); - } - } - /** * Instantiates a new Prepared statement proxy. * @@ -55,7 +47,6 @@ private void init() throws SQLException { public PreparedStatementProxy(AbstractConnectionProxy connectionProxy, PreparedStatement targetStatement, String targetSQL) throws SQLException { super(connectionProxy, targetStatement, targetSQL); - init(); } @Override diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutor.java b/rm-datasource/src/main/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutor.java index ccd5905dde7..3c20d6807ae 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutor.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutor.java @@ -15,24 +15,25 @@ */ package io.seata.rm.datasource.exec; -import java.sql.SQLException; -import java.sql.Statement; - import io.seata.rm.datasource.AbstractConnectionProxy; +import io.seata.rm.datasource.ConnectionProxy; import io.seata.rm.datasource.StatementProxy; import io.seata.rm.datasource.sql.SQLRecognizer; import io.seata.rm.datasource.sql.struct.TableRecords; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.concurrent.Callable; + /** * The type Abstract dml base executor. * - * @author sharajava - * * @param the type parameter * @param the type parameter + * @author sharajava */ public abstract class AbstractDMLBaseExecutor extends BaseTransactionalExecutor { @@ -65,9 +66,9 @@ public T doExecute(Object... args) throws Throwable { * * @param args the args * @return the t - * @throws Throwable the throwable + * @throws Exception the exception */ - protected T executeAutoCommitFalse(Object[] args) throws Throwable { + protected T executeAutoCommitFalse(Object[] args) throws Exception { TableRecords beforeImage = beforeImage(); T result = statementCallback.execute(statementProxy.getTargetStatement(), args); TableRecords afterImage = afterImage(beforeImage); @@ -83,30 +84,25 @@ protected T executeAutoCommitFalse(Object[] args) throws Throwable { * @throws Throwable the throwable */ protected T executeAutoCommitTrue(Object[] args) throws Throwable { - T result = null; AbstractConnectionProxy connectionProxy = statementProxy.getConnectionProxy(); - LockRetryController lockRetryController = new LockRetryController(); try { connectionProxy.setAutoCommit(false); - while (true) { - try { - result = executeAutoCommitFalse(args); - connectionProxy.commit(); - break; - } catch (LockConflictException lockConflict) { - connectionProxy.getTargetConnection().rollback(); - lockRetryController.sleep(lockConflict); - } - } - + return new LockRetryPolicy(connectionProxy.getTargetConnection()).execute(() -> { + T result = executeAutoCommitFalse(args); + connectionProxy.commit(); + return result; + }); } catch (Exception e) { // when exception occur in finally,this exception will lost, so just print it here - LOGGER.error("exception occur", e); + LOGGER.error("execute executeAutoCommitTrue error:{}", e.getMessage(), e); + if (!LockRetryPolicy.isLockRetryPolicyBranchRollbackOnConflict()) { + connectionProxy.getTargetConnection().rollback(); + } throw e; } finally { + ((ConnectionProxy) connectionProxy).getContext().reset(); connectionProxy.setAutoCommit(true); } - return result; } /** @@ -126,4 +122,29 @@ protected T executeAutoCommitTrue(Object[] args) throws Throwable { */ protected abstract TableRecords afterImage(TableRecords beforeImage) throws SQLException; + private static class LockRetryPolicy extends ConnectionProxy.LockRetryPolicy { + private final Connection connection; + + LockRetryPolicy(final Connection connection) { + this.connection = connection; + } + + @Override + public T execute(Callable callable) throws Exception { + if (LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT) { + return doRetryOnLockConflict(callable); + } else { + return callable.call(); + } + } + + @Override + protected void onException(Exception e) throws Exception { + connection.rollback(); + } + + public static boolean isLockRetryPolicyBranchRollbackOnConflict() { + return LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT; + } + } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/exec/InsertExecutor.java b/rm-datasource/src/main/java/io/seata/rm/datasource/exec/InsertExecutor.java index 49011e1f57d..fbba9d602c0 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/exec/InsertExecutor.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/exec/InsertExecutor.java @@ -31,6 +31,8 @@ import io.seata.rm.datasource.sql.SQLRecognizer; import io.seata.rm.datasource.sql.struct.ColumnMeta; import io.seata.rm.datasource.sql.struct.Null; +import io.seata.rm.datasource.sql.struct.SqlMethodExpr; +import io.seata.rm.datasource.sql.struct.SqlSequenceExpr; import io.seata.rm.datasource.sql.struct.TableMeta; import io.seata.rm.datasource.sql.struct.TableRecords; import org.slf4j.Logger; @@ -49,6 +51,8 @@ public class InsertExecutor extends AbstractDMLBaseExecu private static final Logger LOGGER = LoggerFactory.getLogger(InsertExecutor.class); protected static final String ERR_SQL_STATE = "S1009"; + private static final String PLACEHOLDER = "?"; + /** * Instantiates a new Insert executor. * @@ -69,7 +73,8 @@ protected TableRecords beforeImage() throws SQLException { @Override protected TableRecords afterImage(TableRecords beforeImage) throws SQLException { //Pk column exists or PK is just auto generated - List pkValues = containsPK() ? getPkValuesByColumn() : getPkValuesByAuto(); + List pkValues = containsPK() ? getPkValuesByColumn() : + (containsColumns() ? getPkValuesByAuto() : getPkValuesByColumn()); TableRecords afterImage = buildTableRecords(pkValues); @@ -87,56 +92,106 @@ protected boolean containsPK() { return tmeta.containsPK(insertColumns); } + protected boolean containsColumns() { + SQLInsertRecognizer recognizer = (SQLInsertRecognizer) sqlRecognizer; + List insertColumns = recognizer.getInsertColumns(); + return insertColumns != null && !insertColumns.isEmpty(); + } + protected List getPkValuesByColumn() throws SQLException { // insert values including PK SQLInsertRecognizer recognizer = (SQLInsertRecognizer) sqlRecognizer; - List insertColumns = recognizer.getInsertColumns(); - String pk = getTableMeta().getPkName(); + final int pkIndex = getPkIndex(); List pkValues = null; if (statementProxy instanceof PreparedStatementProxy) { PreparedStatementProxy preparedStatementProxy = (PreparedStatementProxy) statementProxy; - ArrayList[] paramters = preparedStatementProxy.getParameters(); - int insertColumnsSize = insertColumns.size(); - int cycleNums = paramters.length / insertColumnsSize; - List pkIndexs = new ArrayList<>(cycleNums); - int firstPkIndex = 0; - for (int paramIdx = 0; paramIdx < insertColumns.size(); paramIdx++) { - if (insertColumns.get(paramIdx).equalsIgnoreCase(pk)) { - firstPkIndex = paramIdx; - break; + + List> insertRows = recognizer.getInsertRows(); + if (insertRows != null && !insertRows.isEmpty()) { + ArrayList[] parameters = preparedStatementProxy.getParameters(); + final int rowSize = insertRows.size(); + + if (rowSize == 1) { + Object pkValue = insertRows.get(0).get(pkIndex); + if (PLACEHOLDER.equals(pkValue)) { + pkValues = parameters[pkIndex]; + } else { + int finalPkIndex = pkIndex; + pkValues = insertRows.stream().map(insertRow -> insertRow.get(finalPkIndex)).collect(Collectors.toList()); + } + } else { + int totalPlaceholderNum = -1; + pkValues = new ArrayList<>(rowSize); + for (int i = 0; i < rowSize; i++) { + List row = insertRows.get(i); + Object pkValue = row.get(pkIndex); + int currentRowPlaceholderNum = -1; + for (Object r : row) { + if (PLACEHOLDER.equals(r)) { + totalPlaceholderNum += 1; + currentRowPlaceholderNum += 1; + } + } + if (PLACEHOLDER.equals(pkValue)) { + int idx = pkIndex; + if (i != 0) { + idx = totalPlaceholderNum - currentRowPlaceholderNum + pkIndex; + } + ArrayList parameter = parameters[idx]; + for (Object obj : parameter) { + pkValues.add(obj); + } + } else { + pkValues.add(pkValue); + } + } } } - for (int i = 0; i < cycleNums; i++) { - pkIndexs.add(insertColumnsSize * i + firstPkIndex); - } - if (pkIndexs.size() == 1) { - //adapter test case - pkValues = preparedStatementProxy.getParamsByIndex(pkIndexs.get(0)); - } else { - pkValues = pkIndexs.stream().map(pkIndex -> paramters[pkIndex].get(0)).collect(Collectors.toList()); - } } else { - for (int paramIdx = 0; paramIdx < insertColumns.size(); paramIdx++) { - if (insertColumns.get(paramIdx).equalsIgnoreCase(pk)) { - List> insertRows = recognizer.getInsertRows(); - pkValues = new ArrayList<>(insertRows.size()); - for (List row : insertRows) { - pkValues.add(row.get(paramIdx)); - } - break; - } + List> insertRows = recognizer.getInsertRows(); + pkValues = new ArrayList<>(insertRows.size()); + for (List row : insertRows) { + pkValues.add(row.get(pkIndex)); } } if (pkValues == null) { throw new ShouldNeverHappenException(); } - //pk auto generated while column exists and value is null - if (pkValues.size() == 1 && pkValues.get(0) instanceof Null) { + boolean b = this.checkPkValues(pkValues); + if (!b) { + throw new NotSupportYetException("not support sql [" + sqlRecognizer.getOriginalSQL() + "]"); + } + if (pkValues.size() == 1 && pkValues.get(0) instanceof SqlSequenceExpr) { + pkValues = getPkValuesBySequence(pkValues.get(0)); + } + // pk auto generated while single insert primary key is expression + else if (pkValues.size() == 1 && pkValues.get(0) instanceof SqlMethodExpr) { + pkValues = getPkValuesByAuto(); + } + // pk auto generated while column exists and value is null + else if (pkValues.size() > 0 && pkValues.get(0) instanceof Null) { pkValues = getPkValuesByAuto(); } return pkValues; } + protected List getPkValuesBySequence(Object expr) throws SQLException { + ResultSet genKeys = null; + if (expr instanceof SqlSequenceExpr) { + SqlSequenceExpr sequenceExpr = (SqlSequenceExpr) expr; + final String sql = "SELECT " + sequenceExpr.getSequence() + ".currval FROM DUAL"; + LOGGER.warn("Fail to get auto-generated keys, use \'{}\' instead. Be cautious, statement could be polluted. Recommend you set the statement to return generated keys.", sql); + genKeys = statementProxy.getConnection().createStatement().executeQuery(sql); + } else { + throw new NotSupportYetException(String.format("not support expr [%s]", expr.getClass().getName())); + } + List pkValues = new ArrayList<>(); + while (genKeys.next()) { + Object v = genKeys.getObject(1); + pkValues.add(v); + } + return pkValues; + } protected List getPkValuesByAuto() throws SQLException { // PK is just auto generated @@ -170,4 +225,66 @@ protected List getPkValuesByAuto() throws SQLException { } return pkValues; } + + /** + * get pk index + * @return -1 not found pk index + */ + protected int getPkIndex() { + SQLInsertRecognizer recognizer = (SQLInsertRecognizer) sqlRecognizer; + String pkName = getTableMeta().getPkName(); + List insertColumns = recognizer.getInsertColumns(); + if (insertColumns != null && !insertColumns.isEmpty()) { + final int insertColumnsSize = insertColumns.size(); + int pkIndex = -1; + for (int paramIdx = 0; paramIdx < insertColumnsSize; paramIdx++) { + if (insertColumns.get(paramIdx).equalsIgnoreCase(pkName)) { + pkIndex = paramIdx; + break; + } + } + return pkIndex; + } + int pkIndex = -1; + Map allColumns = getTableMeta().getAllColumns(); + for (Map.Entry entry : allColumns.entrySet()) { + pkIndex++; + if (entry.getValue().getColumnName().equalsIgnoreCase(pkName)) { + break; + } + } + return pkIndex; + } + + /** + * check pk values + * @param pkValues + * @return true support false not support + */ + private boolean checkPkValues(List pkValues) { + boolean pkParameterHasNull = false; + boolean pkParameterHasNotNull = false; + boolean pkParameterHasExpr = false; + if (pkValues.size() == 1) { + return true; + } + for (Object pkValue : pkValues) { + if (pkValue instanceof Null) { + pkParameterHasNull = true; + continue; + } + pkParameterHasNotNull = true; + if (pkValue instanceof SqlMethodExpr) { + pkParameterHasExpr = true; + } + } + if (pkParameterHasExpr) { + return false; + } + if (pkParameterHasNull && pkParameterHasNotNull) { + return false; + } + return true; + } + } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/exec/LockConflictException.java b/rm-datasource/src/main/java/io/seata/rm/datasource/exec/LockConflictException.java index 40e983528f5..e59fb4003bc 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/exec/LockConflictException.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/exec/LockConflictException.java @@ -29,4 +29,8 @@ public class LockConflictException extends SQLException { */ public LockConflictException() { } + + public LockConflictException(String message) { + super(message); + } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/BaseRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/BaseRecognizer.java index 1c551d6b45f..97dbefbba2b 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/BaseRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/BaseRecognizer.java @@ -62,7 +62,7 @@ public String getOriginalSQL() { return originalSQL; } - public MySqlOutputVisitor createMySqlOutputVisitor(final ParametersHolder parametersHolder, final ArrayList> paramAppenderList, final StringBuffer sb) { + public MySqlOutputVisitor createMySqlOutputVisitor(final ParametersHolder parametersHolder, final ArrayList> paramAppenderList, final StringBuilder sb) { MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb) { @Override @@ -83,7 +83,7 @@ public boolean visit(SQLVariantRefExpr x) { return visitor; } - public OracleOutputVisitor createOracleOutputVisitor(final ParametersHolder parametersHolder, final ArrayList> paramAppenderList, final StringBuffer sb) { + public OracleOutputVisitor createOracleOutputVisitor(final ParametersHolder parametersHolder, final ArrayList> paramAppenderList, final StringBuilder sb) { OracleOutputVisitor visitor = new OracleOutputVisitor(sb) { @Override diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLDeleteRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLDeleteRecognizer.java index 3c8dcce3f34..839ef98991b 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLDeleteRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLDeleteRecognizer.java @@ -63,7 +63,7 @@ public String getTableAlias() { @Override public String getTableName() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb) { @Override @@ -82,7 +82,7 @@ public String getWhereCondition(final ParametersHolder parametersHolder, final A if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = super.createMySqlOutputVisitor(parametersHolder, paramAppenderList, sb); if (where instanceof SQLBinaryOpExpr) { visitor.visit((SQLBinaryOpExpr) where); @@ -102,7 +102,7 @@ public String getWhereCondition() { if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb); visitor.visit((SQLBinaryOpExpr) where); return sb.toString(); diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLInsertRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLInsertRecognizer.java index f80d8331d91..95a159a4c0d 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLInsertRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLInsertRecognizer.java @@ -21,7 +21,10 @@ import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLStatement; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; +import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; +import com.alibaba.druid.sql.ast.expr.SQLNullExpr; import com.alibaba.druid.sql.ast.expr.SQLValuableExpr; +import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr; import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.alibaba.druid.sql.ast.statement.SQLInsertStatement; import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlInsertStatement; @@ -29,6 +32,8 @@ import io.seata.rm.datasource.sql.SQLInsertRecognizer; import io.seata.rm.datasource.sql.SQLParsingException; import io.seata.rm.datasource.sql.SQLType; +import io.seata.rm.datasource.sql.struct.Null; +import io.seata.rm.datasource.sql.struct.SqlMethodExpr; /** * The type My sql insert recognizer. @@ -62,7 +67,7 @@ public String getTableAlias() { @Override public String getTableName() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb) { @Override @@ -102,8 +107,14 @@ public List> getInsertRows() { List row = new ArrayList<>(exprs.size()); rows.add(row); for (SQLExpr expr : valuesClause.getValues()) { - if (expr instanceof SQLValuableExpr) { + if (expr instanceof SQLNullExpr) { + row.add(Null.get()); + } else if (expr instanceof SQLValuableExpr) { row.add(((SQLValuableExpr)expr).getValue()); + } else if (expr instanceof SQLVariantRefExpr) { + row.add(((SQLVariantRefExpr)expr).getName()); + } else if (expr instanceof SQLMethodInvokeExpr) { + row.add(new SqlMethodExpr()); } else { throw new SQLParsingException("Unknown SQLExpr: " + expr.getClass() + " " + expr); } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLSelectForUpdateRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLSelectForUpdateRecognizer.java index 0587b18d824..07468633c4b 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLSelectForUpdateRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLSelectForUpdateRecognizer.java @@ -67,7 +67,7 @@ public String getWhereCondition(final ParametersHolder parametersHolder, final A if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = super.createMySqlOutputVisitor(parametersHolder, paramAppenderList, sb); if (where instanceof SQLBinaryOpExpr) { visitor.visit((SQLBinaryOpExpr) where); @@ -88,7 +88,7 @@ public String getWhereCondition() { if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb); visitor.visit((SQLBinaryOpExpr) where); return sb.toString(); @@ -117,7 +117,7 @@ public String getTableAlias() { public String getTableName() { SQLSelectQueryBlock selectQueryBlock = getSelect(); SQLTableSource tableSource = selectQueryBlock.getFrom(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb) { @Override diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLUpdateRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLUpdateRecognizer.java index daac0b54176..240e2145e27 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLUpdateRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/MySQLUpdateRecognizer.java @@ -105,7 +105,7 @@ public String getWhereCondition(final ParametersHolder parametersHolder, final A if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = super.createMySqlOutputVisitor(parametersHolder, paramAppenderList, sb); if (where instanceof SQLBinaryOpExpr) { visitor.visit((SQLBinaryOpExpr) where); @@ -126,7 +126,7 @@ public String getWhereCondition() { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb); if (where instanceof SQLBetweenExpr) { @@ -147,7 +147,7 @@ public String getTableAlias() { @Override public String getTableName() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); MySqlOutputVisitor visitor = new MySqlOutputVisitor(sb) { @Override diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleDeleteRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleDeleteRecognizer.java index e5f8c89a3ca..d092c64e37c 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleDeleteRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleDeleteRecognizer.java @@ -30,7 +30,7 @@ import java.util.List; /** - * The type oralce delete recognizer. + * The type oracle delete recognizer. * * @author ccg * @date 2019/3/25 @@ -62,7 +62,7 @@ public String getTableAlias() { @Override public String getTableName() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = new OracleOutputVisitor(sb) { @Override @@ -81,7 +81,7 @@ public String getWhereCondition(final ParametersHolder parametersHolder, final A if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = super.createOracleOutputVisitor(parametersHolder, paramAppenderList, sb); visitor.visit((SQLBinaryOpExpr) where); return sb.toString(); @@ -93,7 +93,7 @@ public String getWhereCondition() { if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = new OracleOutputVisitor(sb); visitor.visit((SQLBinaryOpExpr) where); return sb.toString(); diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleInsertRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleInsertRecognizer.java index b6a21abf304..5b77c6e2e48 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleInsertRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleInsertRecognizer.java @@ -18,7 +18,11 @@ import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLStatement; import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr; +import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr; +import com.alibaba.druid.sql.ast.expr.SQLNullExpr; +import com.alibaba.druid.sql.ast.expr.SQLSequenceExpr; import com.alibaba.druid.sql.ast.expr.SQLValuableExpr; +import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr; import com.alibaba.druid.sql.ast.statement.SQLExprTableSource; import com.alibaba.druid.sql.ast.statement.SQLInsertStatement; import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleInsertStatement; @@ -27,12 +31,15 @@ import io.seata.rm.datasource.sql.SQLParsingException; import io.seata.rm.datasource.sql.SQLType; import io.seata.rm.datasource.sql.druid.BaseRecognizer; +import io.seata.rm.datasource.sql.struct.Null; +import io.seata.rm.datasource.sql.struct.SqlMethodExpr; +import io.seata.rm.datasource.sql.struct.SqlSequenceExpr; import java.util.ArrayList; import java.util.List; /** - * The type oralce insert recognizer. + * The type oracle insert recognizer. * @author ccg * @date 2019/3/25 */ @@ -63,7 +70,7 @@ public String getTableAlias() { @Override public String getTableName() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = new OracleOutputVisitor(sb) { @Override @@ -86,7 +93,7 @@ public List getInsertColumns() { List list = new ArrayList<>(columnSQLExprs.size()); for (SQLExpr expr : columnSQLExprs) { if (expr instanceof SQLIdentifierExpr) { - list.add(((SQLIdentifierExpr)expr).getName().toUpperCase()); + list.add(((SQLIdentifierExpr)expr).getName()); } else { throw new SQLParsingException("Unknown SQLExpr: " + expr.getClass() + " " + expr); } @@ -103,8 +110,19 @@ public List> getInsertRows() { List row = new ArrayList<>(exprs.size()); rows.add(row); for (SQLExpr expr : valuesClause.getValues()) { - if (expr instanceof SQLValuableExpr) { + if (expr instanceof SQLNullExpr) { + row.add(Null.get()); + } else if (expr instanceof SQLValuableExpr) { row.add(((SQLValuableExpr)expr).getValue()); + } else if (expr instanceof SQLVariantRefExpr) { + row.add(((SQLVariantRefExpr)expr).getName()); + } else if (expr instanceof SQLMethodInvokeExpr) { + row.add(new SqlMethodExpr()); + } else if (expr instanceof SQLSequenceExpr) { + SQLSequenceExpr sequenceExpr = ((SQLSequenceExpr) expr); + String sequence = sequenceExpr.getSequence().getSimpleName(); + String function = sequenceExpr.getFunction().name; + row.add(new SqlSequenceExpr(sequence, function)); } else { throw new SQLParsingException("Unknown SQLExpr: " + expr.getClass() + " " + expr); } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleSelectForUpdateRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleSelectForUpdateRecognizer.java index 55e3233f16c..56a084080a3 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleSelectForUpdateRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleSelectForUpdateRecognizer.java @@ -34,7 +34,7 @@ import java.util.List; /** - * The type oralceselect for update recognizer. + * The type oracle select for update recognizer. * * @author ccg * @date 2019/3/25 @@ -67,7 +67,7 @@ public String getWhereCondition(final ParametersHolder parametersHolder, final A if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = super.createOracleOutputVisitor(parametersHolder, paramAppenderList, sb); visitor.visit((SQLBinaryOpExpr) where); return sb.toString(); @@ -80,7 +80,7 @@ public String getWhereCondition() { if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = new OracleOutputVisitor(sb); visitor.visit((SQLBinaryOpExpr) where); return sb.toString(); @@ -109,7 +109,7 @@ public String getTableAlias() { public String getTableName() { SQLSelectQueryBlock selectQueryBlock = getSelect(); SQLTableSource tableSource = selectQueryBlock.getFrom(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = new OracleOutputVisitor(sb) { @Override diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleUpdateRecognizer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleUpdateRecognizer.java index 2abb79b71e6..602bc4f6bb4 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleUpdateRecognizer.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/druid/oracle/OracleUpdateRecognizer.java @@ -70,7 +70,7 @@ public List getUpdateColumns() { for (SQLUpdateSetItem updateSetItem : updateSetItems) { SQLExpr expr = updateSetItem.getColumn(); if (expr instanceof SQLIdentifierExpr) { - list.add(((SQLIdentifierExpr) expr).getName().toUpperCase()); + list.add(((SQLIdentifierExpr) expr).getName()); } else if (expr instanceof SQLPropertyExpr) { // This is alias case, like UPDATE xxx_tbl a SET a.name = ? WHERE a.id = ? SQLExpr owner = ((SQLPropertyExpr) expr).getOwner(); @@ -107,7 +107,7 @@ public String getWhereCondition(final ParametersHolder parametersHolder, final A if (where == null) { return ""; } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = super.createOracleOutputVisitor(parametersHolder, paramAppenderList, sb); visitor.visit((SQLBinaryOpExpr) where); return sb.toString(); @@ -120,8 +120,7 @@ public String getWhereCondition() { return ""; } - - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = new OracleOutputVisitor(sb); if (where instanceof SQLBetweenExpr) { @@ -142,7 +141,7 @@ public String getTableAlias() { @Override public String getTableName() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); OracleOutputVisitor visitor = new OracleOutputVisitor(sb) { @Override diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/SqlMethodExpr.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/SqlMethodExpr.java new file mode 100644 index 00000000000..4a56222303d --- /dev/null +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/SqlMethodExpr.java @@ -0,0 +1,25 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.sql.struct; + +/** + * TODO + * sql method invoke expression + * @author jsbxyyx + */ +public class SqlMethodExpr { + +} diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/SqlSequenceExpr.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/SqlSequenceExpr.java new file mode 100644 index 00000000000..c159bdfde91 --- /dev/null +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/SqlSequenceExpr.java @@ -0,0 +1,50 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.sql.struct; + +/** + * TODO + * sql sequence expression + * @author jsbxyyx + */ +public class SqlSequenceExpr { + + private String sequence; + private String function; + + public SqlSequenceExpr() {} + + public SqlSequenceExpr(String sequence, String function) { + this.sequence = sequence; + this.function = function; + } + + public String getSequence() { + return sequence; + } + + public void setSequence(String sequence) { + this.sequence = sequence; + } + + public String getFunction() { + return function; + } + + public void setFunction(String function) { + this.function = function; + } +} diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMeta.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMeta.java index 74c8e238a0f..c6e5983627d 100755 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMeta.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMeta.java @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -33,8 +34,8 @@ public class TableMeta { private String tableName; - private Map allColumns = new HashMap(); - private Map allIndexes = new HashMap(); + private Map allColumns = new LinkedHashMap(); + private Map allIndexes = new LinkedHashMap(); /** * Gets table name. diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCache.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCache.java index 96b43a6ed63..cb6694824fa 100755 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCache.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCache.java @@ -24,17 +24,17 @@ import java.util.Map.Entry; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.TimeUnit; - import javax.sql.DataSource; - -import com.alibaba.druid.util.StringUtils; - +import com.alibaba.druid.util.JdbcConstants; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; import io.seata.common.exception.ShouldNeverHappenException; +import io.seata.common.util.StringUtils; import io.seata.core.context.RootContext; import io.seata.rm.datasource.AbstractConnectionProxy; import io.seata.rm.datasource.DataSourceProxy; +import io.seata.rm.datasource.undo.KeywordChecker; +import io.seata.rm.datasource.undo.KeywordCheckerFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -54,6 +54,8 @@ public class TableMetaCache { private static final Logger LOGGER = LoggerFactory.getLogger(TableMetaCache.class); + private static KeywordChecker keywordChecker = KeywordCheckerFactory.getKeywordChecker(JdbcConstants.MYSQL); + /** * Gets table meta. * @@ -62,14 +64,12 @@ public class TableMetaCache { * @return the table meta */ public static TableMeta getTableMeta(final DataSourceProxy dataSourceProxy, final String tableName) { - if (StringUtils.isEmpty(tableName)) { + if (StringUtils.isNullOrEmpty(tableName)) { throw new IllegalArgumentException("TableMeta cannot be fetched without tableName"); } - String dataSourceKey = dataSourceProxy.getResourceId(); - TableMeta tmeta; - final String key = dataSourceKey + "." + tableName; + final String key = getCacheKey(dataSourceProxy, tableName); tmeta = TABLE_META_CACHE.get(key, mappingFunction -> { try { return fetchSchema(dataSourceProxy.getTargetDataSource(), tableName); @@ -95,22 +95,23 @@ public static TableMeta getTableMeta(final DataSourceProxy dataSourceProxy, fina /** * Clear the table meta cache + * * @param dataSourceProxy */ - public static void refresh(final DataSourceProxy dataSourceProxy){ + public static void refresh(final DataSourceProxy dataSourceProxy) { ConcurrentMap tableMetaMap = TABLE_META_CACHE.asMap(); for (Entry entry : tableMetaMap.entrySet()) { - try { - TableMeta tableMeta = fetchSchema(dataSourceProxy, entry.getValue().getTableName()); - if (tableMeta == null){ - LOGGER.error("get table meta error"); - } - if (!tableMeta.equals(entry.getValue())){ - TABLE_META_CACHE.put(entry.getKey(), tableMeta); - LOGGER.info("table meta change was found, update table meta cache automatically."); + String key = getCacheKey(dataSourceProxy, entry.getValue().getTableName()); + if (entry.getKey().equals(key)) { + try { + TableMeta tableMeta = fetchSchema(dataSourceProxy, entry.getValue().getTableName()); + if (!tableMeta.equals(entry.getValue())) { + TABLE_META_CACHE.put(entry.getKey(), tableMeta); + LOGGER.info("table meta change was found, update table meta cache automatically."); + } + } catch (SQLException e) { + LOGGER.error("get table meta error:{}", e.getMessage(), e); } - } catch (SQLException e) { - LOGGER.error("get table meta error:{}", e.getMessage(), e); } } } @@ -119,16 +120,17 @@ private static TableMeta fetchSchema(DataSource dataSource, String tableName) th return fetchSchemeInDefaultWay(dataSource, tableName); } - private static TableMeta fetchSchemeInDefaultWay(DataSource dataSource, String tableName) - throws SQLException { + private static TableMeta fetchSchemeInDefaultWay(DataSource dataSource, String tableName) throws SQLException { Connection conn = null; Statement stmt = null; ResultSet rs = null; try { conn = dataSource.getConnection(); stmt = conn.createStatement(); - StringBuffer sb = new StringBuffer("SELECT * FROM " + tableName + " LIMIT 1"); - rs = stmt.executeQuery(sb.toString()); + StringBuilder builder = new StringBuilder("SELECT * FROM "); + builder.append(keywordChecker.checkAndReplace(tableName)); + builder.append(" LIMIT 1"); + rs = stmt.executeQuery(builder.toString()); ResultSetMetaData rsmd = rs.getMetaData(); DatabaseMetaData dbmd = conn.getMetaData(); @@ -161,7 +163,7 @@ private static TableMeta resultSetMetaToSchema(java.sql.ResultSet rs2, AbstractC col.setTableName(tableName); col.setColumnName(rs2.getString("COLUMN_NAME")); String datatype = rs2.getString("DATA_TYPE"); - if (com.alibaba.druid.util.StringUtils.equalsIgnoreCase(datatype, "NUMBER")) { + if (StringUtils.equalsIgnoreCase(datatype, "NUMBER")) { col.setDataType(java.sql.Types.BIGINT); } else if (StringUtils.equalsIgnoreCase(datatype, "VARCHAR2")) { col.setDataType(java.sql.Types.VARCHAR); @@ -182,8 +184,8 @@ private static TableMeta resultSetMetaToSchema(java.sql.ResultSet rs2, AbstractC stmt = conn.getTargetConnection().createStatement(); rs1 = stmt.executeQuery( "select a.constraint_name, a.column_name from user_cons_columns a, user_constraints b where a" - + ".constraint_name = b.constraint_name and b.constraint_type = 'P' and a.table_name ='" - + tableName + "'"); + + ".constraint_name = b.constraint_name and b.constraint_type = 'P' and a.table_name ='" + tableName + + "'"); while (rs1.next()) { String indexName = rs1.getString(1); String colName = rs1.getString(2); @@ -221,76 +223,86 @@ private static TableMeta resultSetMetaToSchema(ResultSetMetaData rsmd, DatabaseM TableMeta tm = new TableMeta(); tm.setTableName(tableName); - ResultSet rs1 = dbmd.getColumns(catalogName, schemaName, tableName, "%"); - while (rs1.next()) { - ColumnMeta col = new ColumnMeta(); - col.setTableCat(rs1.getString("TABLE_CAT")); - col.setTableSchemaName(rs1.getString("TABLE_SCHEM")); - col.setTableName(rs1.getString("TABLE_NAME")); - col.setColumnName(rs1.getString("COLUMN_NAME")); - col.setDataType(rs1.getInt("DATA_TYPE")); - col.setDataTypeName(rs1.getString("TYPE_NAME")); - col.setColumnSize(rs1.getInt("COLUMN_SIZE")); - col.setDecimalDigits(rs1.getInt("DECIMAL_DIGITS")); - col.setNumPrecRadix(rs1.getInt("NUM_PREC_RADIX")); - col.setNullAble(rs1.getInt("NULLABLE")); - col.setRemarks(rs1.getString("REMARKS")); - col.setColumnDef(rs1.getString("COLUMN_DEF")); - col.setSqlDataType(rs1.getInt("SQL_DATA_TYPE")); - col.setSqlDatetimeSub(rs1.getInt("SQL_DATETIME_SUB")); - col.setCharOctetLength(rs1.getInt("CHAR_OCTET_LENGTH")); - col.setOrdinalPosition(rs1.getInt("ORDINAL_POSITION")); - col.setIsNullAble(rs1.getString("IS_NULLABLE")); - col.setIsAutoincrement(rs1.getString("IS_AUTOINCREMENT")); + ResultSet rsColumns = dbmd.getColumns(catalogName, schemaName, tableName, "%"); + ResultSet rsIndex = dbmd.getIndexInfo(catalogName, schemaName, tableName, false, true); - tm.getAllColumns().put(col.getColumnName(), col); - } + try { + while (rsColumns.next()) { + ColumnMeta col = new ColumnMeta(); + col.setTableCat(rsColumns.getString("TABLE_CAT")); + col.setTableSchemaName(rsColumns.getString("TABLE_SCHEM")); + col.setTableName(rsColumns.getString("TABLE_NAME")); + col.setColumnName(rsColumns.getString("COLUMN_NAME")); + col.setDataType(rsColumns.getInt("DATA_TYPE")); + col.setDataTypeName(rsColumns.getString("TYPE_NAME")); + col.setColumnSize(rsColumns.getInt("COLUMN_SIZE")); + col.setDecimalDigits(rsColumns.getInt("DECIMAL_DIGITS")); + col.setNumPrecRadix(rsColumns.getInt("NUM_PREC_RADIX")); + col.setNullAble(rsColumns.getInt("NULLABLE")); + col.setRemarks(rsColumns.getString("REMARKS")); + col.setColumnDef(rsColumns.getString("COLUMN_DEF")); + col.setSqlDataType(rsColumns.getInt("SQL_DATA_TYPE")); + col.setSqlDatetimeSub(rsColumns.getInt("SQL_DATETIME_SUB")); + col.setCharOctetLength(rsColumns.getInt("CHAR_OCTET_LENGTH")); + col.setOrdinalPosition(rsColumns.getInt("ORDINAL_POSITION")); + col.setIsNullAble(rsColumns.getString("IS_NULLABLE")); + col.setIsAutoincrement(rsColumns.getString("IS_AUTOINCREMENT")); + + tm.getAllColumns().put(col.getColumnName(), col); + } - ResultSet rs2 = dbmd.getIndexInfo(catalogName, schemaName, tableName, false, true); - String indexName = ""; - while (rs2.next()) { - indexName = rs2.getString("INDEX_NAME"); - String colName = rs2.getString("COLUMN_NAME"); - ColumnMeta col = tm.getAllColumns().get(colName); - - if (tm.getAllIndexes().containsKey(indexName)) { - IndexMeta index = tm.getAllIndexes().get(indexName); - index.getValues().add(col); - } else { - IndexMeta index = new IndexMeta(); - index.setIndexName(indexName); - index.setNonUnique(rs2.getBoolean("NON_UNIQUE")); - index.setIndexQualifier(rs2.getString("INDEX_QUALIFIER")); - index.setIndexName(rs2.getString("INDEX_NAME")); - index.setType(rs2.getShort("TYPE")); - index.setOrdinalPosition(rs2.getShort("ORDINAL_POSITION")); - index.setAscOrDesc(rs2.getString("ASC_OR_DESC")); - index.setCardinality(rs2.getInt("CARDINALITY")); - index.getValues().add(col); - if ("PRIMARY".equalsIgnoreCase(indexName) || indexName.equalsIgnoreCase( - rsmd.getTableName(1) + "_pkey")) { - index.setIndextype(IndexType.PRIMARY); - } else if (!index.isNonUnique()) { - index.setIndextype(IndexType.Unique); + while (rsIndex.next()) { + String indexName = rsIndex.getString("INDEX_NAME"); + String colName = rsIndex.getString("COLUMN_NAME"); + ColumnMeta col = tm.getAllColumns().get(colName); + + if (tm.getAllIndexes().containsKey(indexName)) { + IndexMeta index = tm.getAllIndexes().get(indexName); + index.getValues().add(col); } else { - index.setIndextype(IndexType.Normal); - } - tm.getAllIndexes().put(indexName, index); + IndexMeta index = new IndexMeta(); + index.setIndexName(indexName); + index.setNonUnique(rsIndex.getBoolean("NON_UNIQUE")); + index.setIndexQualifier(rsIndex.getString("INDEX_QUALIFIER")); + index.setIndexName(rsIndex.getString("INDEX_NAME")); + index.setType(rsIndex.getShort("TYPE")); + index.setOrdinalPosition(rsIndex.getShort("ORDINAL_POSITION")); + index.setAscOrDesc(rsIndex.getString("ASC_OR_DESC")); + index.setCardinality(rsIndex.getInt("CARDINALITY")); + index.getValues().add(col); + if ("PRIMARY".equalsIgnoreCase(indexName)) { + index.setIndextype(IndexType.PRIMARY); + } else if (!index.isNonUnique()) { + index.setIndextype(IndexType.Unique); + } else { + index.setIndextype(IndexType.Normal); + } + tm.getAllIndexes().put(indexName, index); - } - } - IndexMeta index = tm.getAllIndexes().get(indexName); - if (index.getIndextype().value() != 0) { - if ("H2 JDBC Driver".equals(dbmd.getDriverName())) { - if (indexName.length() > 11 && "PRIMARY_KEY".equalsIgnoreCase(indexName.substring(0, 11))) { - index.setIndextype(IndexType.PRIMARY); - } - } else if (dbmd.getDriverName() != null && dbmd.getDriverName().toLowerCase().indexOf("postgresql") >= 0) { - if ((tableName + "_pkey").equalsIgnoreCase(indexName)) { - index.setIndextype(IndexType.PRIMARY); } } + if (tm.getAllIndexes().isEmpty()) { + throw new ShouldNeverHappenException("Could not found any index in the table: " + tableName); + } + } finally { + if (rsColumns != null) { + rsColumns.close(); + } + if (rsIndex != null) { + rsIndex.close(); + } } return tm; } + + /** + * generate cache key + * + * @param dataSourceProxy + * @param tableName + * @return + */ + private static String getCacheKey(DataSourceProxy dataSourceProxy, String tableName) { + return dataSourceProxy.getResourceId() + "." + tableName; + } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheOracle.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheOracle.java index 8a9a866a274..8907090d768 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheOracle.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMetaCacheOracle.java @@ -17,23 +17,21 @@ import java.sql.Connection; import java.sql.DatabaseMetaData; -import java.sql.ResultSetMetaData; import java.sql.ResultSet; import java.sql.SQLException; import java.util.concurrent.TimeUnit; -import com.alibaba.druid.util.StringUtils; -import io.seata.common.exception.ShouldNeverHappenException; -import io.seata.core.context.RootContext; -import io.seata.rm.datasource.DataSourceProxy; +import javax.sql.DataSource; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; +import io.seata.common.exception.ShouldNeverHappenException; +import io.seata.common.util.StringUtils; +import io.seata.core.context.RootContext; +import io.seata.rm.datasource.DataSourceProxy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.sql.DataSource; - /** * The type Table meta cache. */ @@ -56,11 +54,11 @@ public class TableMetaCacheOracle { * @return the table meta */ public static TableMeta getTableMeta(final DataSourceProxy dataSourceProxy, final String tableName) { - if (StringUtils.isEmpty(tableName)) { + if (StringUtils.isNullOrEmpty(tableName)) { throw new IllegalArgumentException("TableMeta cannot be fetched without tableName"); } - String dataSourceKey = dataSourceProxy.getResourceId(); + String dataSourceKey = dataSourceProxy.getResourceId(); TableMeta tmeta = null; final String key = dataSourceKey + "." + tableName; @@ -89,18 +87,17 @@ private static TableMeta fetchSchema(DataSource dataSource, String tableName) th return fetchSchemeInDefaultWay(dataSource, tableName); } - private static TableMeta fetchSchemeInDefaultWay(DataSource dataSource, String tableName) - throws SQLException { + private static TableMeta fetchSchemeInDefaultWay(DataSource dataSource, String tableName) throws SQLException { Connection conn = null; java.sql.Statement stmt = null; try { conn = dataSource.getConnection(); stmt = conn.createStatement(); DatabaseMetaData dbmd = conn.getMetaData(); - return resultSetMetaToSchema(null, dbmd, tableName); + return resultSetMetaToSchema(dbmd, tableName); } catch (Exception e) { if (e instanceof SQLException) { - throw ((SQLException)e); + throw e; } throw new SQLException("Failed to fetch schema of " + tableName, e); @@ -108,101 +105,106 @@ private static TableMeta fetchSchemeInDefaultWay(DataSource dataSource, String t if (stmt != null) { stmt.close(); } + if (conn != null) { + conn.close(); + } } } - private static TableMeta resultSetMetaToSchema(ResultSetMetaData rsmd, DatabaseMetaData dbmd, String tableName) - throws SQLException { - tableName = tableName.toUpperCase();//转换大写,oracle表名要大写才能取元数据 + private static TableMeta resultSetMetaToSchema(DatabaseMetaData dbmd, String tableName) throws SQLException { TableMeta tm = new TableMeta(); tm.setTableName(tableName); String[] schemaTable = tableName.split("\\."); - String schemaName = schemaTable.length>1?schemaTable[0]:dbmd.getUserName(); - tableName = schemaTable.length>1?schemaTable[1]:tableName; - - ResultSet rs1 = dbmd.getColumns("", schemaName, tableName, "%"); - while (rs1.next()) { - ColumnMeta col = new ColumnMeta(); - col.setTableCat(rs1.getString("TABLE_CAT")); - col.setTableSchemaName(rs1.getString("TABLE_SCHEM")); - col.setTableName(rs1.getString("TABLE_NAME")); - col.setColumnName(rs1.getString("COLUMN_NAME")); - col.setDataType(rs1.getInt("DATA_TYPE")); - col.setDataTypeName(rs1.getString("TYPE_NAME")); - col.setColumnSize(rs1.getInt("COLUMN_SIZE")); - col.setDecimalDigits(rs1.getInt("DECIMAL_DIGITS")); - col.setNumPrecRadix(rs1.getInt("NUM_PREC_RADIX")); - col.setNullAble(rs1.getInt("NULLABLE")); - col.setRemarks(rs1.getString("REMARKS")); - col.setColumnDef(rs1.getString("COLUMN_DEF")); - col.setSqlDataType(rs1.getInt("SQL_DATA_TYPE")); - col.setSqlDatetimeSub(rs1.getInt("SQL_DATETIME_SUB")); - col.setCharOctetLength(rs1.getInt("CHAR_OCTET_LENGTH")); - col.setOrdinalPosition(rs1.getInt("ORDINAL_POSITION")); - col.setIsNullAble(rs1.getString("IS_NULLABLE")); -// col.setIsAutoincrement(rs1.getString("IS_AUTOINCREMENT")); - - tm.getAllColumns().put(col.getColumnName(), col); + String schemaName = schemaTable.length > 1 ? schemaTable[0] : dbmd.getUserName(); + tableName = schemaTable.length > 1 ? schemaTable[1] : tableName; + if(tableName.indexOf("\"") != -1){ + tableName = tableName.replace("\"", ""); + schemaName = schemaName.replace("\"", ""); + }else{ + tableName = tableName.toUpperCase(); } + ResultSet rsColumns = dbmd.getColumns("", schemaName, tableName, "%"); + ResultSet rsIndex = dbmd.getIndexInfo(null, schemaName, tableName, false, true); + ResultSet rsPrimary = dbmd.getPrimaryKeys(null, schemaName, tableName); - java.sql.ResultSet rs2 = dbmd.getIndexInfo(null, schemaName, tableName, false, true); - - String indexName = ""; - while (rs2.next()) { - indexName = rs2.getString("INDEX_NAME"); - if( StringUtils.isEmpty(indexName) ){ - continue; + try { + while (rsColumns.next()) { + ColumnMeta col = new ColumnMeta(); + col.setTableCat(rsColumns.getString("TABLE_CAT")); + col.setTableSchemaName(rsColumns.getString("TABLE_SCHEM")); + col.setTableName(rsColumns.getString("TABLE_NAME")); + col.setColumnName(rsColumns.getString("COLUMN_NAME")); + col.setDataType(rsColumns.getInt("DATA_TYPE")); + col.setDataTypeName(rsColumns.getString("TYPE_NAME")); + col.setColumnSize(rsColumns.getInt("COLUMN_SIZE")); + col.setDecimalDigits(rsColumns.getInt("DECIMAL_DIGITS")); + col.setNumPrecRadix(rsColumns.getInt("NUM_PREC_RADIX")); + col.setNullAble(rsColumns.getInt("NULLABLE")); + col.setRemarks(rsColumns.getString("REMARKS")); + col.setColumnDef(rsColumns.getString("COLUMN_DEF")); + col.setSqlDataType(rsColumns.getInt("SQL_DATA_TYPE")); + col.setSqlDatetimeSub(rsColumns.getInt("SQL_DATETIME_SUB")); + col.setCharOctetLength(rsColumns.getInt("CHAR_OCTET_LENGTH")); + col.setOrdinalPosition(rsColumns.getInt("ORDINAL_POSITION")); + col.setIsNullAble(rsColumns.getString("IS_NULLABLE")); + + tm.getAllColumns().put(col.getColumnName(), col); } - String colName = rs2.getString("COLUMN_NAME").toUpperCase(); - ColumnMeta col = tm.getAllColumns().get(colName); - - if (tm.getAllIndexes().containsKey(indexName)) { - IndexMeta index = tm.getAllIndexes().get(indexName); - index.getValues().add(col); - } else { - IndexMeta index = new IndexMeta(); - index.setIndexName(indexName); - index.setNonUnique(rs2.getBoolean("NON_UNIQUE")); - index.setIndexQualifier(rs2.getString("INDEX_QUALIFIER")); - index.setIndexName(rs2.getString("INDEX_NAME")); - index.setType(rs2.getShort("TYPE")); - index.setOrdinalPosition(rs2.getShort("ORDINAL_POSITION")); - index.setAscOrDesc(rs2.getString("ASC_OR_DESC")); - index.setCardinality(rs2.getInt("CARDINALITY")); - index.getValues().add(col); - if ("PRIMARY".equalsIgnoreCase(indexName) || ( - tableName+ "_pkey").equalsIgnoreCase(indexName)) { - index.setIndextype(IndexType.PRIMARY); - } else if (index.isNonUnique() == false) { - index.setIndextype(IndexType.Unique); - } else { - index.setIndextype(IndexType.Normal); + + while (rsIndex.next()) { + String indexName = rsIndex.getString("INDEX_NAME"); + if (StringUtils.isNullOrEmpty(indexName)) { + continue; } - tm.getAllIndexes().put(indexName, index); + String colName = rsIndex.getString("COLUMN_NAME"); + ColumnMeta col = tm.getAllColumns().get(colName); + if (tm.getAllIndexes().containsKey(indexName)) { + IndexMeta index = tm.getAllIndexes().get(indexName); + index.getValues().add(col); + } else { + IndexMeta index = new IndexMeta(); + index.setIndexName(indexName); + index.setNonUnique(rsIndex.getBoolean("NON_UNIQUE")); + index.setIndexQualifier(rsIndex.getString("INDEX_QUALIFIER")); + index.setIndexName(rsIndex.getString("INDEX_NAME")); + index.setType(rsIndex.getShort("TYPE")); + index.setOrdinalPosition(rsIndex.getShort("ORDINAL_POSITION")); + index.setAscOrDesc(rsIndex.getString("ASC_OR_DESC")); + index.setCardinality(rsIndex.getInt("CARDINALITY")); + index.getValues().add(col); + if (!index.isNonUnique()) { + index.setIndextype(IndexType.Unique); + } else { + index.setIndextype(IndexType.Normal); + } + tm.getAllIndexes().put(indexName, index); - } - } - ResultSet pk = dbmd.getPrimaryKeys(null, schemaName, tableName); - while (pk.next()) { - String pkIndexName = pk.getObject(6).toString(); - if (tm.getAllIndexes().containsKey(pkIndexName)) { - IndexMeta index = tm.getAllIndexes().get(pkIndexName); - index.setIndextype(IndexType.PRIMARY); - } - } - IndexMeta index = tm.getAllIndexes().get(indexName); - if (index.getIndextype().value() != 0) { - if ("H2 JDBC Driver".equals(dbmd.getDriverName())) { - if (indexName.length() > 11 && "PRIMARY_KEY".equalsIgnoreCase(indexName.substring(0, 11))) { - index.setIndextype(IndexType.PRIMARY); } - } else if (dbmd.getDriverName() != null && dbmd.getDriverName().toLowerCase().indexOf("postgresql") >= 0) { - if ((tableName + "_pkey").equalsIgnoreCase(indexName)) { + } + + while (rsPrimary.next()) { + String pkIndexName = rsPrimary.getString("PK_NAME"); + if (tm.getAllIndexes().containsKey(pkIndexName)) { + IndexMeta index = tm.getAllIndexes().get(pkIndexName); index.setIndextype(IndexType.PRIMARY); } } + if (tm.getAllIndexes().isEmpty()) { + throw new ShouldNeverHappenException("Could not found any index in the table: " + tableName); + } + } finally { + if (rsColumns != null) { + rsColumns.close(); + } + if (rsIndex != null) { + rsIndex.close(); + } + if (rsPrimary != null) { + rsPrimary.close(); + } } + return tm; } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableRecords.java b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableRecords.java index 4684f0ec834..b0ad53c1844 100755 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableRecords.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableRecords.java @@ -15,21 +15,25 @@ */ package io.seata.rm.datasource.sql.struct; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import io.seata.common.exception.ShouldNeverHappenException; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.JDBCType; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import javax.sql.rowset.serial.SerialBlob; +import javax.sql.rowset.serial.SerialClob; + /** * The type Table records. * * @author sharajava */ -@JsonIgnoreProperties({"tableMeta"}) public class TableRecords { private transient TableMeta tableMeta; @@ -184,7 +188,23 @@ public static TableRecords buildRecords(TableMeta tmeta, ResultSet resultSet) th field.setKeyType(KeyType.PrimaryKey); } field.setType(col.getDataType()); - field.setValue(resultSet.getObject(i)); + // mysql will not run in this code + // cause mysql does not use java.sql.Blob, java.sql.sql.Clob to process Blob and Clob column + if (col.getDataType() == JDBCType.BLOB.getVendorTypeNumber()) { + Blob blob = resultSet.getBlob(i); + if (blob != null) { + field.setValue(new SerialBlob(blob)); + } + + } else if (col.getDataType() == JDBCType.CLOB.getVendorTypeNumber()) { + Clob clob = resultSet.getClob(i); + if (clob != null){ + field.setValue(new SerialClob(clob)); + } + } else { + field.setValue(resultSet.getObject(i)); + } + fields.add(field); } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoExecutor.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoExecutor.java index b67b346903c..9e3c26e830c 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoExecutor.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoExecutor.java @@ -28,7 +28,9 @@ import io.seata.rm.datasource.sql.struct.TableRecords; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - +import javax.sql.rowset.serial.SerialBlob; +import javax.sql.rowset.serial.SerialClob; +import java.sql.JDBCType; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -151,7 +153,16 @@ protected void undoPrepare(PreparedStatement undoPST, ArrayList undoValue int undoIndex = 0; for (Field undoValue : undoValues) { undoIndex++; - undoPST.setObject(undoIndex, undoValue.getValue(), undoValue.getType()); + if (undoValue.getType() == JDBCType.BLOB.getVendorTypeNumber()) { + SerialBlob serialBlob = (SerialBlob) undoValue.getValue(); + undoPST.setBlob(undoIndex, serialBlob.getBinaryStream()); + } else if (undoValue.getType() == JDBCType.CLOB.getVendorTypeNumber()) { + SerialClob serialClob = (SerialClob) undoValue.getValue(); + undoPST.setClob(undoIndex, serialClob.getCharacterStream()); + } else { + undoPST.setObject(undoIndex, undoValue.getValue(), undoValue.getType()); + } + } // PK is at last one. // INSERT INTO a (x, y, z, pk) VALUES (?, ?, ?, ?) diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoLogManager.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoLogManager.java new file mode 100644 index 00000000000..c2917722361 --- /dev/null +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/AbstractUndoLogManager.java @@ -0,0 +1,197 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.undo; + +import io.seata.common.util.CollectionUtils; +import io.seata.config.ConfigurationFactory; +import io.seata.core.constants.ClientTableColumnsName; +import io.seata.core.constants.ConfigurationKeys; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +/** + * @author jsbxyyx + * @date 2019/09/07 + */ +public abstract class AbstractUndoLogManager implements UndoLogManager { + + private static final Logger LOGGER = LoggerFactory.getLogger(AbstractUndoLogManager.class); + + protected enum State { + /** + * This state can be properly rolled back by services + */ + Normal(0), + /** + * This state prevents the branch transaction from inserting undo_log after the global transaction is rolled + * back. + */ + GlobalFinished(1); + + private int value; + + State(int value) { + this.value = value; + } + + public int getValue() { + return value; + } + } + + protected static final String UNDO_LOG_TABLE_NAME = ConfigurationFactory.getInstance() + .getConfig(ConfigurationKeys.TRANSACTION_UNDO_LOG_TABLE, ConfigurationKeys.TRANSACTION_UNDO_LOG_DEFAULT_TABLE); + + protected static final String SELECT_UNDO_LOG_SQL = "SELECT * FROM " + UNDO_LOG_TABLE_NAME + + " WHERE " + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + " = ? AND " + ClientTableColumnsName.UNDO_LOG_XID + " = ? FOR UPDATE"; + + protected static final String DELETE_UNDO_LOG_SQL = "DELETE FROM " + UNDO_LOG_TABLE_NAME + + " WHERE " + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + " = ? AND " + ClientTableColumnsName.UNDO_LOG_XID + " = ?"; + + private static final ThreadLocal SERIALIZER_LOCAL = new ThreadLocal<>(); + + public static String getCurrentSerializer() { + return SERIALIZER_LOCAL.get(); + } + + public static void setCurrentSerializer(String serializer) { + SERIALIZER_LOCAL.set(serializer); + } + + public static void removeCurrentSerializer() { + SERIALIZER_LOCAL.remove(); + } + + /** + * get db type + * @return the db type + */ + public abstract String getDbType(); + + /** + * Delete undo log. + * + * @param xid the xid + * @param branchId the branch id + * @param conn the conn + * @throws SQLException the sql exception + */ + @Override + public void deleteUndoLog(String xid, long branchId, Connection conn) throws SQLException { + PreparedStatement deletePST = null; + try { + deletePST = conn.prepareStatement(DELETE_UNDO_LOG_SQL); + deletePST.setLong(1, branchId); + deletePST.setString(2, xid); + deletePST.executeUpdate(); + } catch (Exception e) { + if (!(e instanceof SQLException)) { + e = new SQLException(e); + } + throw (SQLException) e; + } finally { + if (deletePST != null) { + deletePST.close(); + } + } + } + + /** + * batch Delete undo log. + * + * @param xids + * @param branchIds + * @param conn + */ + @Override + public void batchDeleteUndoLog(Set xids, Set branchIds, Connection conn) throws SQLException { + if (CollectionUtils.isEmpty(xids) || CollectionUtils.isEmpty(branchIds)) { + return; + } + int xidSize = xids.size(); + int branchIdSize = branchIds.size(); + String batchDeleteSql = toBatchDeleteUndoLogSql(xidSize, branchIdSize); + PreparedStatement deletePST = null; + try { + deletePST = conn.prepareStatement(batchDeleteSql); + int paramsIndex = 1; + for (Long branchId : branchIds) { + deletePST.setLong(paramsIndex++,branchId); + } + for (String xid: xids){ + deletePST.setString(paramsIndex++, xid); + } + int deleteRows = deletePST.executeUpdate(); + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("batch delete undo log size " + deleteRows); + } + }catch (Exception e){ + if (!(e instanceof SQLException)) { + e = new SQLException(e); + } + throw (SQLException) e; + } finally { + if (deletePST != null) { + deletePST.close(); + } + } + + } + + protected static String toBatchDeleteUndoLogSql(int xidSize, int branchIdSize) { + StringBuilder sqlBuilder = new StringBuilder(64); + sqlBuilder.append("DELETE FROM ") + .append(UNDO_LOG_TABLE_NAME) + .append(" WHERE " + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + " IN "); + appendInParam(branchIdSize, sqlBuilder); + sqlBuilder.append(" AND " + ClientTableColumnsName.UNDO_LOG_XID + " IN "); + appendInParam(xidSize, sqlBuilder); + return sqlBuilder.toString(); + } + + protected static void appendInParam(int size, StringBuilder sqlBuilder) { + sqlBuilder.append(" ("); + for (int i = 0; i < size; i++) { + sqlBuilder.append("?"); + if (i < (size - 1)) { + sqlBuilder.append(","); + } + } + sqlBuilder.append(") "); + } + + protected static boolean canUndo(int state) { + return state == State.Normal.getValue(); + } + + protected static String buildContext(String serializer) { + Map map = new HashMap<>(); + map.put(UndoLogConstants.SERIALIZER_KEY, serializer); + return CollectionUtils.encodeMap(map); + } + + protected static Map parseContext(String data) { + return CollectionUtils.decodeMap(data); + } + +} diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManager.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManager.java index 36951b33131..3379e089450 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManager.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManager.java @@ -15,132 +15,29 @@ */ package io.seata.rm.datasource.undo; -import com.alibaba.druid.util.JdbcConstants; -import io.seata.common.Constants; -import io.seata.common.exception.NotSupportYetException; -import io.seata.common.util.BlobUtils; -import io.seata.common.util.CollectionUtils; -import io.seata.config.ConfigurationFactory; -import io.seata.core.constants.ClientTableColumnsName; -import io.seata.core.constants.ConfigurationKeys; import io.seata.core.exception.TransactionException; -import io.seata.rm.datasource.ConnectionContext; import io.seata.rm.datasource.ConnectionProxy; import io.seata.rm.datasource.DataSourceProxy; -import io.seata.rm.datasource.sql.struct.TableMeta; -import io.seata.rm.datasource.sql.struct.TableMetaCache; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.sql.Blob; import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.SQLIntegrityConstraintViolationException; -import java.util.Collections; import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import java.util.Set; -import static io.seata.core.exception.TransactionExceptionCode.BranchRollbackFailed_Retriable; - /** * The type Undo log manager. * * @author sharajava * @author Geng Zhang */ -public final class UndoLogManager { - - private enum State { - /** - * This state can be properly rolled back by services - */ - Normal(0), - /** - * This state prevents the branch transaction from inserting undo_log after the global transaction is rolled - * back. - */ - GlobalFinished(1); - - private int value; - - State(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - } - - private static final Logger LOGGER = LoggerFactory.getLogger(UndoLogManager.class); - - private static final String UNDO_LOG_TABLE_NAME = ConfigurationFactory.getInstance() - .getConfig(ConfigurationKeys.TRANSACTION_UNDO_LOG_TABLE, ConfigurationKeys.TRANSACTION_UNDO_LOG_DEFAULT_TABLE); - - /** - * branch_id, xid, context, rollback_info, log_status, log_created, log_modified - */ - private static final String INSERT_UNDO_LOG_SQL = "INSERT INTO " + UNDO_LOG_TABLE_NAME + - " (" + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + ", " + ClientTableColumnsName.UNDO_LOG_XID + ", " - + ClientTableColumnsName.UNDO_LOG_CONTEXT + ", " + ClientTableColumnsName.UNDO_LOG_ROLLBACK_INFO + ", " - + ClientTableColumnsName.UNDO_LOG_LOG_STATUS + ", " + ClientTableColumnsName.UNDO_LOG_LOG_CREATED + ", " - + ClientTableColumnsName.UNDO_LOG_LOG_MODIFIED + ")" + - " VALUES (?, ?, ?, ?, ?, now(), now())"; - - private static final String DELETE_UNDO_LOG_SQL = "DELETE FROM " + UNDO_LOG_TABLE_NAME + - " WHERE " + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + " = ? AND " + ClientTableColumnsName.UNDO_LOG_XID + " = ?"; - - private static final String DELETE_UNDO_LOG_BY_CREATE_SQL = "DELETE FROM " + UNDO_LOG_TABLE_NAME + - " WHERE log_created <= ? LIMIT ?"; - - private static final String SELECT_UNDO_LOG_SQL = "SELECT * FROM " + UNDO_LOG_TABLE_NAME + - " WHERE " + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + " = ? AND " + ClientTableColumnsName.UNDO_LOG_XID + " = ? FOR UPDATE"; - - private static final ThreadLocal SERIALIZER_LOCAL = new ThreadLocal<>(); - - private UndoLogManager() { - - } +public interface UndoLogManager { /** * Flush undo logs. - * * @param cp the cp * @throws SQLException the sql exception */ - public static void flushUndoLogs(ConnectionProxy cp) throws SQLException { - assertDbSupport(cp.getDbType()); - - ConnectionContext connectionContext = cp.getContext(); - String xid = connectionContext.getXid(); - long branchID = connectionContext.getBranchId(); - - BranchUndoLog branchUndoLog = new BranchUndoLog(); - branchUndoLog.setXid(xid); - branchUndoLog.setBranchId(branchID); - branchUndoLog.setSqlUndoLogs(connectionContext.getUndoItems()); - - UndoLogParser parser = UndoLogParserFactory.getInstance(); - byte[] undoLogContent = parser.encode(branchUndoLog); - - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("Flushing UNDO LOG: {}", new String(undoLogContent, Constants.DEFAULT_CHARSET)); - } - - insertUndoLogWithNormal(xid, branchID, buildContext(parser.getName()), undoLogContent, - cp.getTargetConnection()); - } - - private static void assertDbSupport(String dbType) { - if (!JdbcConstants.MYSQL.equals(dbType)) { - throw new NotSupportYetException("DbType[" + dbType + "] is not support yet!"); - } - } + void flushUndoLogs(ConnectionProxy cp) throws SQLException; /** * Undo. @@ -150,217 +47,7 @@ private static void assertDbSupport(String dbType) { * @param branchId the branch id * @throws TransactionException the transaction exception */ - public static void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) throws TransactionException { - assertDbSupport(dataSourceProxy.getDbType()); - - Connection conn = null; - ResultSet rs = null; - PreparedStatement selectPST = null; - - for (; ; ) { - try { - conn = dataSourceProxy.getPlainConnection(); - - // The entire undo process should run in a local transaction. - conn.setAutoCommit(false); - - // Find UNDO LOG - selectPST = conn.prepareStatement(SELECT_UNDO_LOG_SQL); - selectPST.setLong(1, branchId); - selectPST.setString(2, xid); - rs = selectPST.executeQuery(); - - boolean exists = false; - while (rs.next()) { - exists = true; - - // It is possible that the server repeatedly sends a rollback request to roll back - // the same branch transaction to multiple processes, - // ensuring that only the undo_log in the normal state is processed. - int state = rs.getInt(ClientTableColumnsName.UNDO_LOG_LOG_STATUS); - if (!canUndo(state)) { - if (LOGGER.isInfoEnabled()) { - LOGGER.info("xid {} branch {}, ignore {} undo_log", - xid, branchId, state); - } - return; - } - - String contextString = rs.getString(ClientTableColumnsName.UNDO_LOG_CONTEXT); - Map context = parseContext(contextString); - Blob b = rs.getBlob(ClientTableColumnsName.UNDO_LOG_ROLLBACK_INFO); - byte[] rollbackInfo = BlobUtils.blob2Bytes(b); - - String serializer = context == null ? null : context.get(UndoLogConstants.SERIALIZER_KEY); - UndoLogParser parser = serializer == null ? UndoLogParserFactory.getInstance() : - UndoLogParserFactory.getInstance(serializer); - BranchUndoLog branchUndoLog = parser.decode(rollbackInfo); - - try { - // put serializer name to local - SERIALIZER_LOCAL.set(parser.getName()); - List sqlUndoLogs = branchUndoLog.getSqlUndoLogs(); - if (sqlUndoLogs.size() > 1) { - Collections.reverse(sqlUndoLogs); - } - for (SQLUndoLog sqlUndoLog : sqlUndoLogs) { - TableMeta tableMeta = TableMetaCache.getTableMeta(dataSourceProxy, sqlUndoLog.getTableName()); - sqlUndoLog.setTableMeta(tableMeta); - AbstractUndoExecutor undoExecutor = UndoExecutorFactory.getUndoExecutor( - dataSourceProxy.getDbType(), - sqlUndoLog); - undoExecutor.executeOn(conn); - } - } finally { - // remove serializer name - SERIALIZER_LOCAL.remove(); - } - } - - // If undo_log exists, it means that the branch transaction has completed the first phase, - // we can directly roll back and clean the undo_log - // Otherwise, it indicates that there is an exception in the branch transaction, - // causing undo_log not to be written to the database. - // For example, the business processing timeout, the global transaction is the initiator rolls back. - // To ensure data consistency, we can insert an undo_log with GlobalFinished state - // to prevent the local transaction of the first phase of other programs from being correctly submitted. - // See https://github.com/seata/seata/issues/489 - - if (exists) { - deleteUndoLog(xid, branchId, conn); - conn.commit(); - if (LOGGER.isInfoEnabled()) { - LOGGER.info("xid {} branch {}, undo_log deleted with {}", - xid, branchId, State.GlobalFinished.name()); - } - } else { - insertUndoLogWithGlobalFinished(xid, branchId, UndoLogParserFactory.getInstance(), conn); - conn.commit(); - if (LOGGER.isInfoEnabled()) { - LOGGER.info("xid {} branch {}, undo_log added with {}", - xid, branchId, State.GlobalFinished.name()); - } - } - - return; - } catch (SQLIntegrityConstraintViolationException e) { - // Possible undo_log has been inserted into the database by other processes, retrying rollback undo_log - if (LOGGER.isInfoEnabled()) { - LOGGER.info("xid {} branch {}, undo_log inserted, retry rollback", - xid, branchId); - } - } catch (Throwable e) { - if (conn != null) { - try { - conn.rollback(); - } catch (SQLException rollbackEx) { - LOGGER.warn("Failed to close JDBC resource while undo ... ", rollbackEx); - } - } - throw new TransactionException(BranchRollbackFailed_Retriable, String.format("%s/%s %s", branchId, xid, e.getMessage()), - e); - - } finally { - try { - if (rs != null) { - rs.close(); - } - if (selectPST != null) { - selectPST.close(); - } - if (conn != null) { - conn.close(); - } - } catch (SQLException closeEx) { - LOGGER.warn("Failed to close JDBC resource while undo ... ", closeEx); - } - } - } - } - - /** - * batch Delete undo log. - * - * @param xids - * @param branchIds - * @param conn - */ - public static void batchDeleteUndoLog(Set xids, Set branchIds, Connection conn) throws SQLException { - int xidSize = xids.size(); - int branchIdSize = branchIds.size(); - String batchDeleteSql = toBatchDeleteUndoLogSql(xidSize, branchIdSize); - PreparedStatement deletePST = null; - try { - deletePST = conn.prepareStatement(batchDeleteSql); - int paramsIndex = 1; - for (Long branchId : branchIds) { - deletePST.setLong(paramsIndex++, branchId); - } - for (String xid : xids) { - deletePST.setString(paramsIndex++, xid); - } - int deleteRows = deletePST.executeUpdate(); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("batch delete undo log size " + deleteRows); - } - } catch (Exception e) { - if (!(e instanceof SQLException)) { - e = new SQLException(e); - } - throw (SQLException) e; - } finally { - if (deletePST != null) { - deletePST.close(); - } - } - - } - - public static int deleteUndoLogByLogCreated(Date logCreated, String dbType, int limitRows, Connection conn) throws SQLException { - assertDbSupport(dbType); - PreparedStatement deletePST = null; - try { - deletePST = conn.prepareStatement(DELETE_UNDO_LOG_BY_CREATE_SQL); - deletePST.setDate(1, new java.sql.Date(logCreated.getTime())); - deletePST.setInt(2, limitRows); - int deleteRows = deletePST.executeUpdate(); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("batch delete undo log size " + deleteRows); - } - return deleteRows; - } catch (Exception e) { - if (!(e instanceof SQLException)) { - e = new SQLException(e); - } - throw (SQLException) e; - } finally { - if (deletePST != null) { - deletePST.close(); - } - } - } - - protected static String toBatchDeleteUndoLogSql(int xidSize, int branchIdSize) { - StringBuilder sqlBuilder = new StringBuilder(64); - sqlBuilder.append("DELETE FROM ") - .append(UNDO_LOG_TABLE_NAME) - .append(" WHERE " + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + " IN "); - appendInParam(branchIdSize, sqlBuilder); - sqlBuilder.append(" AND " + ClientTableColumnsName.UNDO_LOG_XID + " IN "); - appendInParam(xidSize, sqlBuilder); - return sqlBuilder.toString(); - } - - protected static void appendInParam(int size, StringBuilder sqlBuilder) { - sqlBuilder.append(" ("); - for (int i = 0; i < size; i++) { - sqlBuilder.append("?"); - if (i < (size - 1)) { - sqlBuilder.append(","); - } - } - sqlBuilder.append(") "); - } + void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) throws TransactionException; /** * Delete undo log. @@ -370,75 +57,25 @@ protected static void appendInParam(int size, StringBuilder sqlBuilder) { * @param conn the conn * @throws SQLException the sql exception */ - public static void deleteUndoLog(String xid, long branchId, Connection conn) throws SQLException { - PreparedStatement deletePST = null; - try { - deletePST = conn.prepareStatement(DELETE_UNDO_LOG_SQL); - deletePST.setLong(1, branchId); - deletePST.setString(2, xid); - deletePST.executeUpdate(); - } catch (Exception e) { - if (!(e instanceof SQLException)) { - e = new SQLException(e); - } - throw (SQLException) e; - } finally { - if (deletePST != null) { - deletePST.close(); - } - } - } + void deleteUndoLog(String xid, long branchId, Connection conn) throws SQLException; - public static String getCurrentSerializer() { - return SERIALIZER_LOCAL.get(); - } - - private static void insertUndoLogWithNormal(String xid, long branchID, String rollbackCtx, - byte[] undoLogContent, Connection conn) throws SQLException { - insertUndoLog(xid, branchID, rollbackCtx, undoLogContent, State.Normal, conn); - } - - private static void insertUndoLogWithGlobalFinished(String xid, long branchID, UndoLogParser parser, - Connection conn) throws SQLException { - insertUndoLog(xid, branchID, buildContext(parser.getName()), - parser.getDefaultContent(), State.GlobalFinished, conn); - } - - private static void insertUndoLog(String xid, long branchID, String rollbackCtx, - byte[] undoLogContent, State state, Connection conn) throws SQLException { - PreparedStatement pst = null; - try { - pst = conn.prepareStatement(INSERT_UNDO_LOG_SQL); - pst.setLong(1, branchID); - pst.setString(2, xid); - pst.setString(3, rollbackCtx); - pst.setBlob(4, BlobUtils.bytes2Blob(undoLogContent)); - pst.setInt(5, state.getValue()); - pst.executeUpdate(); - } catch (Exception e) { - if (!(e instanceof SQLException)) { - e = new SQLException(e); - } - throw (SQLException) e; - } finally { - if (pst != null) { - pst.close(); - } - } - } - - private static boolean canUndo(int state) { - return state == State.Normal.getValue(); - } - - private static String buildContext(String serializer) { - Map map = new HashMap<>(); - map.put(UndoLogConstants.SERIALIZER_KEY, serializer); - return CollectionUtils.encodeMap(map); - } - - private static Map parseContext(String data) { - return CollectionUtils.decodeMap(data); - } + /** + * batch Delete undo log. + * + * @param xids the xid set collections + * @param branchIds the branch id set collections + * @param conn the connection + * @throws SQLException the sql exception + */ + void batchDeleteUndoLog(Set xids, Set branchIds, Connection conn) throws SQLException; + /** + * delete undolog by created + * @param logCreated the created time + * @param limitRows the limit rows + * @param conn the connection + * @return the update rows + * @throws SQLException the sql exception + */ + int deleteUndoLogByLogCreated(Date logCreated, int limitRows, Connection conn) throws SQLException; } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManagerFactory.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManagerFactory.java new file mode 100644 index 00000000000..851c8792bba --- /dev/null +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManagerFactory.java @@ -0,0 +1,49 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.undo; + +import com.alibaba.druid.util.JdbcConstants; +import io.seata.common.exception.NotSupportYetException; +import io.seata.rm.datasource.undo.mysql.MySQLUndoLogManager; +import io.seata.rm.datasource.undo.oracle.OracleUndoLogManager; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author jsbxyyx + * @date 2019/09/07 + */ +public final class UndoLogManagerFactory { + + private static final Map UNDO_LOG_MANAGER_MAP = new HashMap<>(); + + static { + UNDO_LOG_MANAGER_MAP.put(JdbcConstants.MYSQL, new MySQLUndoLogManager()); + UNDO_LOG_MANAGER_MAP.put(JdbcConstants.ORACLE, new OracleUndoLogManager()); + } + + private UndoLogManagerFactory() {} + + public static UndoLogManager getUndoLogManager(String dbType) { + UndoLogManager undoLogManager = UNDO_LOG_MANAGER_MAP.get(dbType); + if (undoLogManager == null) { + throw new NotSupportYetException("not support dbType[" + dbType + "]"); + } + return undoLogManager; + } + +} diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/MySQLUndoLogManager.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/MySQLUndoLogManager.java new file mode 100644 index 00000000000..51ee1698c24 --- /dev/null +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/MySQLUndoLogManager.java @@ -0,0 +1,320 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.undo.mysql; + +import java.sql.Blob; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.SQLIntegrityConstraintViolationException; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import com.alibaba.druid.util.JdbcConstants; + +import io.seata.common.Constants; +import io.seata.common.exception.NotSupportYetException; +import io.seata.common.util.BlobUtils; +import io.seata.core.constants.ClientTableColumnsName; +import io.seata.core.exception.BranchTransactionException; +import io.seata.core.exception.TransactionException; +import io.seata.rm.datasource.ConnectionContext; +import io.seata.rm.datasource.ConnectionProxy; +import io.seata.rm.datasource.DataSourceProxy; +import io.seata.rm.datasource.sql.struct.TableMeta; +import io.seata.rm.datasource.sql.struct.TableMetaCache; +import io.seata.rm.datasource.undo.AbstractUndoExecutor; +import io.seata.rm.datasource.undo.AbstractUndoLogManager; +import io.seata.rm.datasource.undo.BranchUndoLog; +import io.seata.rm.datasource.undo.SQLUndoLog; +import io.seata.rm.datasource.undo.UndoExecutorFactory; +import io.seata.rm.datasource.undo.UndoLogConstants; +import io.seata.rm.datasource.undo.UndoLogParser; +import io.seata.rm.datasource.undo.UndoLogParserFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static io.seata.core.exception.TransactionExceptionCode.BranchRollbackFailed_Retriable; + +/** + * @author jsbxyyx + * @date 2019/09/07 + */ +public class MySQLUndoLogManager extends AbstractUndoLogManager { + + private static final Logger LOGGER = LoggerFactory.getLogger(MySQLUndoLogManager.class); + + /** + * branch_id, xid, context, rollback_info, log_status, log_created, log_modified + */ + private static final String INSERT_UNDO_LOG_SQL = "INSERT INTO " + UNDO_LOG_TABLE_NAME + + " (" + ClientTableColumnsName.UNDO_LOG_BRANCH_XID + ", " + ClientTableColumnsName.UNDO_LOG_XID + ", " + + ClientTableColumnsName.UNDO_LOG_CONTEXT + ", " + ClientTableColumnsName.UNDO_LOG_ROLLBACK_INFO + ", " + + ClientTableColumnsName.UNDO_LOG_LOG_STATUS + ", " + ClientTableColumnsName.UNDO_LOG_LOG_CREATED + ", " + + ClientTableColumnsName.UNDO_LOG_LOG_MODIFIED + ")" + + " VALUES (?, ?, ?, ?, ?, now(), now())"; + + private static final String DELETE_UNDO_LOG_BY_CREATE_SQL = "DELETE FROM " + UNDO_LOG_TABLE_NAME + + " WHERE log_created <= ? LIMIT ?"; + + @Override + public String getDbType() { + return JdbcConstants.MYSQL; + } + + /** + * Flush undo logs. + * + * @param cp the cp + * @throws SQLException the sql exception + */ + @Override + public void flushUndoLogs(ConnectionProxy cp) throws SQLException { + assertDbSupport(cp.getDbType()); + + ConnectionContext connectionContext = cp.getContext(); + String xid = connectionContext.getXid(); + long branchID = connectionContext.getBranchId(); + + BranchUndoLog branchUndoLog = new BranchUndoLog(); + branchUndoLog.setXid(xid); + branchUndoLog.setBranchId(branchID); + branchUndoLog.setSqlUndoLogs(connectionContext.getUndoItems()); + + UndoLogParser parser = UndoLogParserFactory.getInstance(); + byte[] undoLogContent = parser.encode(branchUndoLog); + + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("Flushing UNDO LOG: {}", new String(undoLogContent, Constants.DEFAULT_CHARSET)); + } + + insertUndoLogWithNormal(xid, branchID, buildContext(parser.getName()), undoLogContent, + cp.getTargetConnection()); + } + + /** + * Undo. + * + * @param dataSourceProxy the data source proxy + * @param xid the xid + * @param branchId the branch id + * @throws TransactionException the transaction exception + */ + @Override + public void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) throws TransactionException { + assertDbSupport(dataSourceProxy.getDbType()); + + Connection conn = null; + ResultSet rs = null; + PreparedStatement selectPST = null; + boolean originalAutoCommit = true; + + for (; ; ) { + try { + conn = dataSourceProxy.getPlainConnection(); + + // The entire undo process should run in a local transaction. + if (originalAutoCommit = conn.getAutoCommit()) { + conn.setAutoCommit(false); + } + + // Find UNDO LOG + selectPST = conn.prepareStatement(SELECT_UNDO_LOG_SQL); + selectPST.setLong(1, branchId); + selectPST.setString(2, xid); + rs = selectPST.executeQuery(); + + boolean exists = false; + while (rs.next()) { + exists = true; + + // It is possible that the server repeatedly sends a rollback request to roll back + // the same branch transaction to multiple processes, + // ensuring that only the undo_log in the normal state is processed. + int state = rs.getInt(ClientTableColumnsName.UNDO_LOG_LOG_STATUS); + if (!canUndo(state)) { + if (LOGGER.isInfoEnabled()) { + LOGGER.info("xid {} branch {}, ignore {} undo_log", + xid, branchId, state); + } + return; + } + + String contextString = rs.getString(ClientTableColumnsName.UNDO_LOG_CONTEXT); + Map context = parseContext(contextString); + Blob b = rs.getBlob(ClientTableColumnsName.UNDO_LOG_ROLLBACK_INFO); + byte[] rollbackInfo = BlobUtils.blob2Bytes(b); + + String serializer = context == null ? null : context.get(UndoLogConstants.SERIALIZER_KEY); + UndoLogParser parser = serializer == null ? UndoLogParserFactory.getInstance() : + UndoLogParserFactory.getInstance(serializer); + BranchUndoLog branchUndoLog = parser.decode(rollbackInfo); + + try { + // put serializer name to local + setCurrentSerializer(parser.getName()); + List sqlUndoLogs = branchUndoLog.getSqlUndoLogs(); + if (sqlUndoLogs.size() > 1) { + Collections.reverse(sqlUndoLogs); + } + for (SQLUndoLog sqlUndoLog : sqlUndoLogs) { + TableMeta tableMeta = TableMetaCache.getTableMeta(dataSourceProxy, sqlUndoLog.getTableName()); + sqlUndoLog.setTableMeta(tableMeta); + AbstractUndoExecutor undoExecutor = UndoExecutorFactory.getUndoExecutor( + dataSourceProxy.getDbType(), + sqlUndoLog); + undoExecutor.executeOn(conn); + } + } finally { + // remove serializer name + removeCurrentSerializer(); + } + } + + // If undo_log exists, it means that the branch transaction has completed the first phase, + // we can directly roll back and clean the undo_log + // Otherwise, it indicates that there is an exception in the branch transaction, + // causing undo_log not to be written to the database. + // For example, the business processing timeout, the global transaction is the initiator rolls back. + // To ensure data consistency, we can insert an undo_log with GlobalFinished state + // to prevent the local transaction of the first phase of other programs from being correctly submitted. + // See https://github.com/seata/seata/issues/489 + + if (exists) { + deleteUndoLog(xid, branchId, conn); + conn.commit(); + if (LOGGER.isInfoEnabled()) { + LOGGER.info("xid {} branch {}, undo_log deleted with {}", + xid, branchId, State.GlobalFinished.name()); + } + } else { + insertUndoLogWithGlobalFinished(xid, branchId, UndoLogParserFactory.getInstance(), conn); + conn.commit(); + if (LOGGER.isInfoEnabled()) { + LOGGER.info("xid {} branch {}, undo_log added with {}", + xid, branchId, State.GlobalFinished.name()); + } + } + + return; + } catch (SQLIntegrityConstraintViolationException e) { + // Possible undo_log has been inserted into the database by other processes, retrying rollback undo_log + if (LOGGER.isInfoEnabled()) { + LOGGER.info("xid {} branch {}, undo_log inserted, retry rollback", + xid, branchId); + } + } catch (Throwable e) { + if (conn != null) { + try { + conn.rollback(); + } catch (SQLException rollbackEx) { + LOGGER.warn("Failed to close JDBC resource while undo ... ", rollbackEx); + } + } + throw new BranchTransactionException(BranchRollbackFailed_Retriable, + String.format("Branch session rollback failed and try again later xid = %s branchId = %s %s", xid, branchId, e.getMessage()), e); + + } finally { + try { + if (rs != null) { + rs.close(); + } + if (selectPST != null) { + selectPST.close(); + } + if (conn != null) { + if (originalAutoCommit) { + conn.setAutoCommit(true); + } + conn.close(); + } + } catch (SQLException closeEx) { + LOGGER.warn("Failed to close JDBC resource while undo ... ", closeEx); + } + } + } + } + + @Override + public int deleteUndoLogByLogCreated(Date logCreated, int limitRows, Connection conn) throws SQLException { + PreparedStatement deletePST = null; + try { + deletePST = conn.prepareStatement(DELETE_UNDO_LOG_BY_CREATE_SQL); + deletePST.setDate(1, new java.sql.Date(logCreated.getTime())); + deletePST.setInt(2, limitRows); + int deleteRows = deletePST.executeUpdate(); + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("batch delete undo log size " + deleteRows); + } + return deleteRows; + } catch (Exception e) { + if (!(e instanceof SQLException)) { + e = new SQLException(e); + } + throw (SQLException) e; + } finally { + if (deletePST != null) { + deletePST.close(); + } + } + } + + + + private static void insertUndoLogWithNormal(String xid, long branchID, String rollbackCtx, + byte[] undoLogContent, Connection conn) throws SQLException { + insertUndoLog(xid, branchID, rollbackCtx, undoLogContent, State.Normal, conn); + } + + private static void insertUndoLogWithGlobalFinished(String xid, long branchID, UndoLogParser parser, + Connection conn) throws SQLException { + insertUndoLog(xid, branchID, buildContext(parser.getName()), + parser.getDefaultContent(), State.GlobalFinished, conn); + } + + private static void insertUndoLog(String xid, long branchID, String rollbackCtx, + byte[] undoLogContent, State state, Connection conn) throws SQLException { + PreparedStatement pst = null; + try { + pst = conn.prepareStatement(INSERT_UNDO_LOG_SQL); + pst.setLong(1, branchID); + pst.setString(2, xid); + pst.setString(3, rollbackCtx); + pst.setBlob(4, BlobUtils.bytes2Blob(undoLogContent)); + pst.setInt(5, state.getValue()); + pst.executeUpdate(); + } catch (Exception e) { + if (!(e instanceof SQLException)) { + e = new SQLException(e); + } + throw (SQLException) e; + } finally { + if (pst != null) { + pst.close(); + } + } + } + + private static void assertDbSupport(String dbType) { + if (!JdbcConstants.MYSQL.equals(dbType)) { + throw new NotSupportYetException("DbType[" + dbType + "] is not support yet!"); + } + } + +} diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/keyword/MySQLKeywordChecker.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/keyword/MySQLKeywordChecker.java index 1bef2e2c57a..f6350066a8f 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/keyword/MySQLKeywordChecker.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/mysql/keyword/MySQLKeywordChecker.java @@ -22,16 +22,17 @@ import java.util.stream.Collectors; /** - * The type My sql keyword checker. + * The type MySQL keyword checker. * * @author xingfudeshi@gmail.com * @date 2019/3/5 MySQL keyword checker */ public class MySQLKeywordChecker implements KeywordChecker { private static volatile KeywordChecker keywordChecker = null; - private static volatile Set keywordSet = null; + private Set keywordSet; private MySQLKeywordChecker() { + keywordSet = Arrays.stream(MySQLKeyword.values()).map(MySQLKeyword::name).collect(Collectors.toSet()); } /** @@ -44,7 +45,6 @@ public static KeywordChecker getInstance() { synchronized (MySQLKeywordChecker.class) { if (keywordChecker == null) { keywordChecker = new MySQLKeywordChecker(); - keywordSet = Arrays.stream(MySQLKeyword.values()).map(MySQLKeyword::name).collect(Collectors.toSet()); } } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoDeleteExecutor.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoDeleteExecutor.java index fa86ee68cc0..075633786ad 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoDeleteExecutor.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoDeleteExecutor.java @@ -54,8 +54,8 @@ protected String buildUndoSQL() { } Row row = beforeImageRows.get(0); - StringBuffer insertColumns = new StringBuffer(); - StringBuffer insertValues = new StringBuffer(); + StringBuilder insertColumns = new StringBuilder(); + StringBuilder insertValues = new StringBuilder(); Field pkField = null; boolean first = true; for (Field field : row.getFields()) { @@ -74,9 +74,7 @@ protected String buildUndoSQL() { } } - if (first) { - first = false; - } else { + if (!first) { insertColumns.append(", "); insertValues.append(", "); } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoInsertExecutor.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoInsertExecutor.java index 4bd41b9c72c..1060bd02dd6 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoInsertExecutor.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoInsertExecutor.java @@ -47,12 +47,12 @@ protected String buildUndoSQL() { throw new ShouldNeverHappenException("Invalid UNDO LOG"); } Row row = afterImageRows.get(0); - StringBuffer mainSQL = new StringBuffer("DELETE FROM " + keywordChecker.checkAndReplace(sqlUndoLog.getTableName())); - StringBuffer where = new StringBuffer(" WHERE "); - boolean first = true; + StringBuilder mainSQL = new StringBuilder("DELETE FROM ").append(keywordChecker.checkAndReplace(sqlUndoLog.getTableName())); + StringBuilder where = new StringBuilder(" WHERE "); + // For a row, there's only one primary key now for (Field field : row.getFields()) { if (field.getKeyType() == KeyType.PrimaryKey) { - where.append(keywordChecker.checkAndReplace(field.getName()) +" = ?"); + where.append(keywordChecker.checkAndReplace(field.getName())).append(" = ?"); } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManagerOracle.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoLogManager.java similarity index 65% rename from rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManagerOracle.java rename to rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoLogManager.java index 90482bf5d18..c145c5d57c6 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/UndoLogManagerOracle.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoLogManager.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.seata.rm.datasource.undo; +package io.seata.rm.datasource.undo.oracle; import java.io.ByteArrayInputStream; import java.sql.Blob; @@ -22,75 +22,53 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.SQLIntegrityConstraintViolationException; -import java.util.HashMap; +import java.util.Date; import java.util.Map; -import java.util.Set; import com.alibaba.druid.util.JdbcConstants; + import io.seata.common.Constants; import io.seata.common.exception.NotSupportYetException; import io.seata.common.util.BlobUtils; -import io.seata.common.util.CollectionUtils; -import io.seata.config.ConfigurationFactory; -import io.seata.core.constants.ConfigurationKeys; +import io.seata.core.exception.BranchTransactionException; import io.seata.core.exception.TransactionException; import io.seata.rm.datasource.ConnectionContext; import io.seata.rm.datasource.ConnectionProxy; import io.seata.rm.datasource.DataSourceProxy; import io.seata.rm.datasource.sql.struct.TableMeta; - import io.seata.rm.datasource.sql.struct.TableMetaCacheOracle; +import io.seata.rm.datasource.undo.AbstractUndoExecutor; +import io.seata.rm.datasource.undo.AbstractUndoLogManager; +import io.seata.rm.datasource.undo.BranchUndoLog; +import io.seata.rm.datasource.undo.SQLUndoLog; +import io.seata.rm.datasource.undo.UndoExecutorFactory; +import io.seata.rm.datasource.undo.UndoLogConstants; +import io.seata.rm.datasource.undo.UndoLogParser; +import io.seata.rm.datasource.undo.UndoLogParserFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static io.seata.core.exception.TransactionExceptionCode.BranchRollbackFailed_Retriable; /** - * The type Undo log manager. - * @author ccg - * @date 2019/3/25 + * @author jsbxyyx + * @date 2019/09/07 */ -public final class UndoLogManagerOracle { - - private enum State { - /** - * This state can be properly rolled back by services - */ - Normal(0), - /** - * This state prevents the branch transaction from inserting undo_log after the global transaction is rolled - * back. - */ - GlobalFinished(1); - - private int value; - - State(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - } - private static final Logger LOGGER = LoggerFactory.getLogger(UndoLogManagerOracle.class); - - private static final String UNDO_LOG_TABLE_NAME = ConfigurationFactory.getInstance() - .getConfig(ConfigurationKeys.TRANSACTION_UNDO_LOG_TABLE, ConfigurationKeys.TRANSACTION_UNDO_LOG_DEFAULT_TABLE); - private static final String INSERT_UNDO_LOG_SQL = "INSERT INTO " + UNDO_LOG_TABLE_NAME + "\n" + - "\t(id,branch_id, xid,context, rollback_info, log_status, log_created, log_modified)\n" + - "VALUES (UNDO_LOG_SEQ.nextval,?, ?,?, ?, ?, sysdate, sysdate)"; +public class OracleUndoLogManager extends AbstractUndoLogManager { - private static final String DELETE_UNDO_LOG_SQL = "DELETE FROM " + UNDO_LOG_TABLE_NAME + "\n" + - "\tWHERE branch_id = ? AND xid = ?"; + private static final Logger LOGGER = LoggerFactory.getLogger(OracleUndoLogManager.class); - private static final String SELECT_UNDO_LOG_SQL = "SELECT * FROM " + UNDO_LOG_TABLE_NAME - + " WHERE branch_id = ? AND xid = ? FOR UPDATE"; - private static final ThreadLocal SERIALIZER_LOCAL = new ThreadLocal<>(); + private static final String INSERT_UNDO_LOG_SQL = "INSERT INTO " + UNDO_LOG_TABLE_NAME + "\n" + + "\t(id,branch_id, xid,context, rollback_info, log_status, log_created, log_modified)\n" + + "VALUES (UNDO_LOG_SEQ.nextval,?, ?,?, ?, ?, sysdate, sysdate)"; - private UndoLogManagerOracle() { + private static final String DELETE_UNDO_LOG_BY_CREATE_SQL = "DELETE FROM " + UNDO_LOG_TABLE_NAME + + " WHERE log_created <= ? and ROWNUM <= ?"; + @Override + public String getDbType() { + return JdbcConstants.ORACLE; } /** @@ -99,7 +77,8 @@ private UndoLogManagerOracle() { * @param cp the cp * @throws SQLException the sql exception */ - public static void flushUndoLogs(ConnectionProxy cp) throws SQLException { + @Override + public void flushUndoLogs(ConnectionProxy cp) throws SQLException { assertDbSupport(cp.getDbType()); ConnectionContext connectionContext = cp.getContext(); @@ -121,12 +100,6 @@ public static void flushUndoLogs(ConnectionProxy cp) throws SQLException { insertUndoLogWithNormal(xid, branchID,buildContext(parser.getName()), undoLogContent, cp.getTargetConnection()); } - private static void assertDbSupport(String dbType) { - if (!JdbcConstants.ORACLE.equalsIgnoreCase(dbType)) { - throw new NotSupportYetException("DbType[" + dbType + "] is not support yet!"); - } - } - /** * Undo. * @@ -135,19 +108,23 @@ private static void assertDbSupport(String dbType) { * @param branchId the branch id * @throws TransactionException the transaction exception */ - public static void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) throws TransactionException { + @Override + public void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) throws TransactionException { assertDbSupport(dataSourceProxy.getDbType()); Connection conn = null; ResultSet rs = null; PreparedStatement selectPST = null; + boolean originalAutoCommit = true; for (; ; ) { try { conn = dataSourceProxy.getPlainConnection(); // The entire undo process should run in a local transaction. - conn.setAutoCommit(false); + if (originalAutoCommit = conn.getAutoCommit()) { + conn.setAutoCommit(false); + } // Find UNDO LOG selectPST = conn.prepareStatement(SELECT_UNDO_LOG_SQL); @@ -164,7 +141,7 @@ public static void undo(DataSourceProxy dataSourceProxy, String xid, long branch if (!canUndo(state)) { if (LOGGER.isInfoEnabled()) { LOGGER.info("xid {} branch {}, ignore {} undo_log", - xid, branchId, state); + xid, branchId, state); } return; } @@ -176,12 +153,12 @@ public static void undo(DataSourceProxy dataSourceProxy, String xid, long branch String serializer = context == null ? null : context.get(UndoLogConstants.SERIALIZER_KEY); UndoLogParser parser = serializer == null ? UndoLogParserFactory.getInstance() : - UndoLogParserFactory.getInstance(serializer); + UndoLogParserFactory.getInstance(serializer); BranchUndoLog branchUndoLog = parser.decode(rollbackInfo); try { // put serializer name to local - SERIALIZER_LOCAL.set(parser.getName()); + setCurrentSerializer(parser.getName()); for (SQLUndoLog sqlUndoLog : branchUndoLog.getSqlUndoLogs()) { TableMeta tableMeta = TableMetaCacheOracle.getTableMeta(dataSourceProxy, sqlUndoLog.getTableName()); @@ -192,7 +169,7 @@ public static void undo(DataSourceProxy dataSourceProxy, String xid, long branch } } finally { // remove serializer name - SERIALIZER_LOCAL.remove(); + removeCurrentSerializer(); } } // If undo_log exists, it means that the branch transaction has completed the first phase, @@ -235,7 +212,8 @@ public static void undo(DataSourceProxy dataSourceProxy, String xid, long branch LOGGER.warn("Failed to close JDBC resource while undo ... ", rollbackEx); } } - throw new TransactionException(BranchRollbackFailed_Retriable, String.format("%s/%s", branchId, xid), e); + throw new BranchTransactionException(BranchRollbackFailed_Retriable, + String.format("Branch session rollback failed and try again later xid = %s branchId = %s %s", xid, branchId, e.getMessage()), e); } finally { try { @@ -246,6 +224,9 @@ public static void undo(DataSourceProxy dataSourceProxy, String xid, long branch selectPST.close(); } if (conn != null) { + if (originalAutoCommit) { + conn.setAutoCommit(true); + } conn.close(); } } catch (SQLException closeEx) { @@ -255,36 +236,19 @@ public static void undo(DataSourceProxy dataSourceProxy, String xid, long branch } } - - /** - * batch Delete undo log. - * - * @param xids - * @param branchIds - * @param conn - */ - public static void batchDeleteUndoLog(Set xids, Set branchIds, Connection conn) throws SQLException { - if (CollectionUtils.isEmpty(xids) || CollectionUtils.isEmpty(branchIds)) { - return; - } - int xidSize = xids.size(); - int branchIdSize = branchIds.size(); - String batchDeleteSql = toBatchDeleteUndoLogSql(xidSize, branchIdSize); + @Override + public int deleteUndoLogByLogCreated(Date logCreated, int limitRows, Connection conn) throws SQLException { PreparedStatement deletePST = null; try { - deletePST = conn.prepareStatement(batchDeleteSql); - int paramsIndex = 1; - for (Long branchId : branchIds) { - deletePST.setLong(paramsIndex++,branchId); - } - for (String xid: xids){ - deletePST.setString(paramsIndex++, xid); - } + deletePST = conn.prepareStatement(DELETE_UNDO_LOG_BY_CREATE_SQL); + deletePST.setDate(1, new java.sql.Date(logCreated.getTime())); + deletePST.setInt(2, limitRows); int deleteRows = deletePST.executeUpdate(); if (LOGGER.isDebugEnabled()) { LOGGER.debug("batch delete undo log size " + deleteRows); } - }catch (Exception e){ + return deleteRows; + } catch (Exception e) { if (!(e instanceof SQLException)) { e = new SQLException(e); } @@ -294,73 +258,21 @@ public static void batchDeleteUndoLog(Set xids, Set branchIds, Con deletePST.close(); } } - } - protected static String toBatchDeleteUndoLogSql(int xidSize, int branchIdSize) { - StringBuilder sqlBuilder = new StringBuilder(); - sqlBuilder.append("DELETE FROM ") - .append(UNDO_LOG_TABLE_NAME) - .append(" WHERE branch_id IN "); - appendInParam(branchIdSize, sqlBuilder); - sqlBuilder.append(" AND xid IN "); - appendInParam(xidSize, sqlBuilder); - return sqlBuilder.toString(); - } - - protected static void appendInParam(int size, StringBuilder sqlBuilder) { - sqlBuilder.append(" ("); - for (int i = 0;i < size;i++) { - sqlBuilder.append("?"); - if (i < (size - 1)) { - sqlBuilder.append(","); - } - } - sqlBuilder.append(") "); - } - - /** - * Delete undo log. - * - * @param xid the xid - * @param branchId the branch id - * @param conn the conn - * @throws SQLException the sql exception - */ - public static void deleteUndoLog(String xid, long branchId, Connection conn) throws SQLException { - PreparedStatement deletePST = null; - try { - deletePST = conn.prepareStatement(DELETE_UNDO_LOG_SQL); - deletePST.setLong(1, branchId); - deletePST.setString(2, xid); - deletePST.executeUpdate(); - }catch (Exception e){ - if (!(e instanceof SQLException)) { - e = new SQLException(e); - } - throw (SQLException) e; - } finally { - if (deletePST != null) { - deletePST.close(); - } - } - } - public static String getCurrentSerializer() { - return SERIALIZER_LOCAL.get(); - } private static void insertUndoLogWithNormal(String xid, long branchID, String rollbackCtx, byte[] undoLogContent, Connection conn) throws SQLException { insertUndoLog(xid, branchID,rollbackCtx, undoLogContent, State.Normal, conn); } private static void insertUndoLogWithGlobalFinished(String xid, long branchID, UndoLogParser parser, - Connection conn) throws SQLException { + Connection conn) throws SQLException { insertUndoLog(xid, branchID, buildContext(parser.getName()), - parser.getDefaultContent(), State.GlobalFinished, conn); + parser.getDefaultContent(), State.GlobalFinished, conn); } private static void insertUndoLog(String xid, long branchID, String rollbackCtx, - byte[] undoLogContent, State state, Connection conn) throws SQLException { + byte[] undoLogContent, State state, Connection conn) throws SQLException { PreparedStatement pst = null; try { pst = conn.prepareStatement(INSERT_UNDO_LOG_SQL); @@ -383,18 +295,10 @@ private static void insertUndoLog(String xid, long branchID, String rollbackCtx, } } - private static boolean canUndo(int state) { - return state == State.Normal.getValue(); - } - - private static String buildContext(String serializer) { - Map map = new HashMap<>(); - map.put(UndoLogConstants.SERIALIZER_KEY, serializer); - return CollectionUtils.encodeMap(map); - } - - private static Map parseContext(String data) { - return CollectionUtils.decodeMap(data); + private static void assertDbSupport(String dbType) { + if (!JdbcConstants.ORACLE.equalsIgnoreCase(dbType)) { + throw new NotSupportYetException("DbType[" + dbType + "] is not support yet!"); + } } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoUpdateExecutor.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoUpdateExecutor.java index 7c6543e1ef1..6733d9bf2eb 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoUpdateExecutor.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/OracleUndoUpdateExecutor.java @@ -44,19 +44,19 @@ protected String buildUndoSQL() { throw new ShouldNeverHappenException("Invalid UNDO LOG"); // TODO } Row row = beforeImageRows.get(0); - StringBuffer mainSQL = new StringBuffer("UPDATE " + keywordChecker.checkAndReplace(sqlUndoLog.getTableName()) + " SET "); - StringBuffer where = new StringBuffer(" WHERE "); + StringBuilder mainSQL = new StringBuilder("UPDATE ").append(keywordChecker.checkAndReplace(sqlUndoLog.getTableName())).append(" SET "); + StringBuilder where = new StringBuilder(" WHERE "); boolean first = true; for (Field field : row.getFields()) { if (field.getKeyType() == KeyType.PrimaryKey) { - where.append(keywordChecker.checkAndReplace(field.getName()) +" = ?"); + where.append(keywordChecker.checkAndReplace(field.getName())).append(" = ?"); } else { if (first) { first = false; } else { mainSQL.append(", "); } - mainSQL.append(keywordChecker.checkAndReplace(field.getName()) +" = ?"); + mainSQL.append(keywordChecker.checkAndReplace(field.getName())).append(" = ?"); } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/keyword/OracleKeywordChecker.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/keyword/OracleKeywordChecker.java index e3ce9f5e950..e431b57206f 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/keyword/OracleKeywordChecker.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/oracle/keyword/OracleKeywordChecker.java @@ -29,9 +29,10 @@ */ public class OracleKeywordChecker implements KeywordChecker { private static volatile KeywordChecker keywordChecker = null; - private static volatile Set keywordSet = null; + private Set keywordSet; private OracleKeywordChecker() { + keywordSet = Arrays.stream(OracleKeyword.values()).map(OracleKeyword::name).collect(Collectors.toSet()); } /** @@ -44,7 +45,6 @@ public static KeywordChecker getInstance() { synchronized (OracleKeywordChecker.class) { if (keywordChecker == null) { keywordChecker = new OracleKeywordChecker(); - keywordSet = Arrays.stream(OracleKeyword.values()).map(OracleKeyword::name).collect(Collectors.toSet()); } } } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/JacksonUndoLogParser.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/JacksonUndoLogParser.java index 0b0babd4532..1c8c1fbf214 100644 --- a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/JacksonUndoLogParser.java +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/JacksonUndoLogParser.java @@ -24,6 +24,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.ObjectMapper; @@ -39,8 +40,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; +import java.sql.SQLException; import java.sql.Timestamp; +import javax.sql.rowset.serial.SerialBlob; +import javax.sql.rowset.serial.SerialClob; +import javax.sql.rowset.serial.SerialException; + /** * The type Json based undo log parser. * @@ -67,12 +73,37 @@ public class JacksonUndoLogParser implements UndoLogParser { */ private static final JsonDeserializer TIMESTAMP_DESERIALIZER = new TimestampDeserializer(); + /** + * customize serializer of java.sql.Blob + */ + private static final JsonSerializer BLOB_SERIALIZER = new BlobSerializer(); + + /** + * customize deserializer of java.sql.Blob + */ + private static final JsonDeserializer BLOB_DESERIALIZER = new BlobDeserializer(); + + /** + * customize serializer of java.sql.Clob + */ + private static final JsonSerializer CLOB_SERIALIZER = new ClobSerializer(); + + /** + * customize deserializer of java.sql.Clob + */ + private static final JsonDeserializer CLOB_DESERIALIZER = new ClobDeserializer(); + static { MODULE.addSerializer(Timestamp.class, TIMESTAMP_SERIALIZER); MODULE.addDeserializer(Timestamp.class, TIMESTAMP_DESERIALIZER); + MODULE.addSerializer(SerialBlob.class, BLOB_SERIALIZER); + MODULE.addDeserializer(SerialBlob.class, BLOB_DESERIALIZER); + MODULE.addSerializer(SerialClob.class, CLOB_SERIALIZER); + MODULE.addDeserializer(SerialClob.class, CLOB_DESERIALIZER); MAPPER.registerModule(MODULE); MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); MAPPER.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); + MAPPER.enable(MapperFeature.PROPAGATE_TRANSIENT_MARKER); } @Override @@ -156,4 +187,82 @@ public Timestamp deserialize(JsonParser p, DeserializationContext ctxt) { } } + /** + * the class of serialize blob type + */ + private static class BlobSerializer extends JsonSerializer { + + @Override + public void serializeWithType(SerialBlob blob, JsonGenerator gen, SerializerProvider serializers, + TypeSerializer typeSer) throws IOException { + WritableTypeId typeIdDef = typeSer.writeTypePrefix(gen, typeSer.typeId(blob, JsonToken.VALUE_EMBEDDED_OBJECT)); + serialize(blob, gen, serializers); + typeSer.writeTypeSuffix(gen, typeIdDef); + } + + @Override + public void serialize(SerialBlob blob, JsonGenerator gen, SerializerProvider serializers) throws IOException { + try { + gen.writeBinary(blob.getBytes(1, (int) blob.length())); + } catch (SerialException e) { + LOGGER.error("serialize java.sql.Blob error : {}", e.getMessage(), e); + } + } + } + + /** + * the class of deserialize blob type + */ + private static class BlobDeserializer extends JsonDeserializer { + + @Override + public SerialBlob deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException { + try { + return new SerialBlob(p.getBinaryValue()); + } catch (SQLException e) { + LOGGER.error("deserialize java.sql.Blob error : {}", e.getMessage(), e); + } + return null; + } + } + + /** + * the class of serialize clob type + */ + private static class ClobSerializer extends JsonSerializer { + + @Override + public void serializeWithType(SerialClob clob, JsonGenerator gen, SerializerProvider serializers, + TypeSerializer typeSer) throws IOException { + WritableTypeId typeIdDef = typeSer.writeTypePrefix(gen, typeSer.typeId(clob, JsonToken.VALUE_EMBEDDED_OBJECT)); + serialize(clob, gen, serializers); + typeSer.writeTypeSuffix(gen, typeIdDef); + } + + @Override + public void serialize(SerialClob clob, JsonGenerator gen, SerializerProvider serializers) throws IOException { + try { + gen.writeString(clob.getCharacterStream(), (int) clob.length()); + } catch (SerialException e) { + LOGGER.error("serialize java.sql.Blob error : {}", e.getMessage(), e); + } + } + } + + private static class ClobDeserializer extends JsonDeserializer { + + @Override + public SerialClob deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException { + try { + return new SerialClob(p.getValueAsString().toCharArray()); + + } catch (SQLException e) { + LOGGER.error("deserialize java.sql.Clob error : {}", e.getMessage(), e); + } + return null; + } + } + } diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoSerializer.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoSerializer.java new file mode 100644 index 00000000000..868d99b0d96 --- /dev/null +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoSerializer.java @@ -0,0 +1,56 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.undo.parser; + +import com.esotericsoftware.kryo.Kryo; +import com.esotericsoftware.kryo.io.Input; +import com.esotericsoftware.kryo.io.Output; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.util.Objects; + +/** + * @author jsbxyyx + */ +public class KryoSerializer { + + private final Kryo kryo; + + public KryoSerializer(Kryo kryo) { + this.kryo = Objects.requireNonNull(kryo); + } + + public Kryo getKryo() { + return kryo; + } + + public byte[] serialize(T t) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + Output output = new Output(baos); + kryo.writeClassAndObject(output, t); + output.close(); + return baos.toByteArray(); + } + + public T deserialize(byte[] bytes) { + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); + Input input = new Input(bais); + input.close(); + return (T) kryo.readClassAndObject(input); + } + +} \ No newline at end of file diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoSerializerFactory.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoSerializerFactory.java new file mode 100644 index 00000000000..10cd38c6b7b --- /dev/null +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoSerializerFactory.java @@ -0,0 +1,193 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.undo.parser; + +import com.esotericsoftware.kryo.Kryo; +import com.esotericsoftware.kryo.Serializer; +import com.esotericsoftware.kryo.io.Input; +import com.esotericsoftware.kryo.io.Output; +import com.esotericsoftware.kryo.pool.KryoFactory; +import com.esotericsoftware.kryo.pool.KryoPool; +import com.esotericsoftware.kryo.serializers.DefaultSerializers; +import de.javakaffee.kryoserializers.ArraysAsListSerializer; +import de.javakaffee.kryoserializers.BitSetSerializer; +import de.javakaffee.kryoserializers.GregorianCalendarSerializer; +import de.javakaffee.kryoserializers.JdkProxySerializer; +import de.javakaffee.kryoserializers.RegexSerializer; +import de.javakaffee.kryoserializers.URISerializer; +import de.javakaffee.kryoserializers.UUIDSerializer; +import io.seata.rm.datasource.undo.BranchUndoLog; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.sql.rowset.serial.SerialBlob; +import javax.sql.rowset.serial.SerialClob; +import java.lang.reflect.InvocationHandler; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.LinkedList; +import java.util.TreeSet; +import java.util.UUID; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; +import java.util.regex.Pattern; + +/** + * @author jsbxyyx + */ +public class KryoSerializerFactory implements KryoFactory { + + private static final Logger LOGGER = LoggerFactory.getLogger(KryoSerializerFactory.class); + + private static final KryoSerializerFactory FACTORY = new KryoSerializerFactory(); + + private KryoPool pool = new KryoPool.Builder(this).softReferences().build(); + + private KryoSerializerFactory() {} + + public static KryoSerializerFactory getInstance() { + return FACTORY; + } + + public KryoSerializer get() { + return new KryoSerializer(pool.borrow()); + } + + public void returnKryo(KryoSerializer kryoSerializer) { + if (kryoSerializer == null) { + throw new IllegalArgumentException("kryoSerializer is null"); + } + pool.release(kryoSerializer.getKryo()); + } + + @Override + public Kryo create() { + Kryo kryo = new Kryo(); + kryo.setRegistrationRequired(false); + + // register serializer + kryo.register(Arrays.asList("").getClass(), new ArraysAsListSerializer()); + kryo.register(GregorianCalendar.class, new GregorianCalendarSerializer()); + kryo.register(InvocationHandler.class, new JdkProxySerializer()); + kryo.register(BigDecimal.class, new DefaultSerializers.BigDecimalSerializer()); + kryo.register(BigInteger.class, new DefaultSerializers.BigIntegerSerializer()); + kryo.register(Pattern.class, new RegexSerializer()); + kryo.register(BitSet.class, new BitSetSerializer()); + kryo.register(URI.class, new URISerializer()); + kryo.register(UUID.class, new UUIDSerializer()); + + // support clob and blob + kryo.register(SerialBlob.class, new BlobSerializer()); + kryo.register(SerialClob.class, new ClobSerializer()); + + // register commonly class + kryo.register(HashMap.class); + kryo.register(ArrayList.class); + kryo.register(LinkedList.class); + kryo.register(HashSet.class); + kryo.register(TreeSet.class); + kryo.register(Hashtable.class); + kryo.register(Date.class); + kryo.register(Calendar.class); + kryo.register(ConcurrentHashMap.class); + kryo.register(SimpleDateFormat.class); + kryo.register(GregorianCalendar.class); + kryo.register(Vector.class); + kryo.register(BitSet.class); + kryo.register(StringBuffer.class); + kryo.register(StringBuilder.class); + kryo.register(Object.class); + kryo.register(Object[].class); + kryo.register(String[].class); + kryo.register(byte[].class); + kryo.register(char[].class); + kryo.register(int[].class); + kryo.register(float[].class); + kryo.register(double[].class); + + // register branchUndoLog + kryo.register(BranchUndoLog.class); + + return kryo; + } + + private static class BlobSerializer extends Serializer { + + @Override + public void write(Kryo kryo, Output output, Blob object) { + try { + byte[] bytes = object.getBytes(1L, (int) object.length()); + output.writeInt(bytes.length, true); + output.write(bytes); + } catch (SQLException e) { + LOGGER.error("kryo write java.sql.Blob error: {}", e.getMessage(), e); + } + } + + @Override + public Blob read(Kryo kryo, Input input, Class type) { + int length = input.readInt(true); + byte[] bytes = input.readBytes(length); + try { + return new SerialBlob(bytes); + } catch (SQLException e) { + LOGGER.error("kryo read java.sql.Blob error: {}", e.getMessage(), e); + } + return null; + } + + } + + private static class ClobSerializer extends Serializer { + + @Override + public void write(Kryo kryo, Output output, Clob object) { + try { + String s = object.getSubString(1, (int) object.length()); + output.writeString(s); + } catch (SQLException e) { + LOGGER.error("kryo write java.sql.Clob error: {}", e.getMessage(), e); + } + } + + @Override + public Clob read(Kryo kryo, Input input, Class type) { + try { + String s = input.readString(); + return new SerialClob(s.toCharArray()); + } catch (SQLException e) { + LOGGER.error("kryo read java.sql.Clob error: {}", e.getMessage(), e); + } + return null; + } + + } + +} \ No newline at end of file diff --git a/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoUndoLogParser.java b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoUndoLogParser.java new file mode 100644 index 00000000000..c794573d8fc --- /dev/null +++ b/rm-datasource/src/main/java/io/seata/rm/datasource/undo/parser/KryoUndoLogParser.java @@ -0,0 +1,66 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.undo.parser; + +import io.seata.common.loader.LoadLevel; +import io.seata.rm.datasource.undo.BranchUndoLog; +import io.seata.rm.datasource.undo.UndoLogParser; + +/** + * kryo serializer + * @author jsbxyyx + */ +@LoadLevel(name = KryoUndoLogParser.NAME) +public class KryoUndoLogParser implements UndoLogParser { + + public static final String NAME = "kryo"; + + @Override + public String getName() { + return NAME; + } + + @Override + public byte[] getDefaultContent() { + KryoSerializer kryoSerializer = KryoSerializerFactory.getInstance().get(); + try { + return kryoSerializer.serialize(new BranchUndoLog()); + } finally { + KryoSerializerFactory.getInstance().returnKryo(kryoSerializer); + } + } + + @Override + public byte[] encode(BranchUndoLog branchUndoLog) { + KryoSerializer kryoSerializer = KryoSerializerFactory.getInstance().get(); + try { + return kryoSerializer.serialize(branchUndoLog); + } finally { + KryoSerializerFactory.getInstance().returnKryo(kryoSerializer); + } + } + + @Override + public BranchUndoLog decode(byte[] bytes) { + KryoSerializer kryoSerializer = KryoSerializerFactory.getInstance().get(); + try { + return kryoSerializer.deserialize(bytes); + } finally { + KryoSerializerFactory.getInstance().returnKryo(kryoSerializer); + } + } + +} diff --git a/rm-datasource/src/main/resources/META-INF/services/io.seata.rm.datasource.undo.UndoLogParser b/rm-datasource/src/main/resources/META-INF/services/io.seata.rm.datasource.undo.UndoLogParser index 01276f70946..7b19989f63b 100644 --- a/rm-datasource/src/main/resources/META-INF/services/io.seata.rm.datasource.undo.UndoLogParser +++ b/rm-datasource/src/main/resources/META-INF/services/io.seata.rm.datasource.undo.UndoLogParser @@ -1,3 +1,4 @@ io.seata.rm.datasource.undo.parser.FastjsonUndoLogParser io.seata.rm.datasource.undo.parser.JacksonUndoLogParser -io.seata.rm.datasource.undo.parser.ProtostuffUndoLogParser \ No newline at end of file +io.seata.rm.datasource.undo.parser.ProtostuffUndoLogParser +io.seata.rm.datasource.undo.parser.KryoUndoLogParser \ No newline at end of file diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/ConnectionProxyTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/ConnectionProxyTest.java new file mode 100644 index 00000000000..4c986422562 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/ConnectionProxyTest.java @@ -0,0 +1,87 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource; + +import io.seata.core.exception.TransactionException; +import io.seata.core.exception.TransactionExceptionCode; +import io.seata.core.model.BranchType; +import io.seata.core.model.ResourceManager; +import io.seata.rm.DefaultResourceManager; +import io.seata.rm.datasource.exec.LockConflictException; +import io.seata.rm.datasource.exec.LockWaitTimeoutException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; + +/** + * ConnectionProxy test + * + * @author ggndnn + */ +public class ConnectionProxyTest { + private DataSourceProxy dataSourceProxy; + + private final static String TEST_RESOURCE_ID = "testResourceId"; + + private final static String TEST_XID = "testXid"; + + private Field branchRollbackFlagField; + + @BeforeEach + public void initBeforeEach() throws Exception { + branchRollbackFlagField = ConnectionProxy.LockRetryPolicy.class.getDeclaredField("LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT"); + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(branchRollbackFlagField, branchRollbackFlagField.getModifiers() & ~Modifier.FINAL); + branchRollbackFlagField.setAccessible(true); + boolean branchRollbackFlag = (boolean) branchRollbackFlagField.get(null); + Assertions.assertTrue(branchRollbackFlag); + + dataSourceProxy = Mockito.mock(DataSourceProxy.class); + Mockito.when(dataSourceProxy.getResourceId()) + .thenReturn(TEST_RESOURCE_ID); + ResourceManager rm = Mockito.mock(ResourceManager.class); + Mockito.when(rm.branchRegister(BranchType.AT, dataSourceProxy.getResourceId(), null, TEST_XID, null, null)) + .thenThrow(new TransactionException(TransactionExceptionCode.LockKeyConflict)); + DefaultResourceManager defaultResourceManager = DefaultResourceManager.get(); + Assertions.assertNotNull(defaultResourceManager); + DefaultResourceManager.mockResourceManager(BranchType.AT, rm); + } + + @Test + public void testLockRetryPolicyRollbackOnConflict() throws Exception { + boolean oldBranchRollbackFlag = (boolean) branchRollbackFlagField.get(null); + branchRollbackFlagField.set(null, true); + ConnectionProxy connectionProxy = new ConnectionProxy(dataSourceProxy, null); + connectionProxy.bind(TEST_XID); + Assertions.assertThrows(LockConflictException.class, connectionProxy::commit); + branchRollbackFlagField.set(null, oldBranchRollbackFlag); + } + + @Test + public void testLockRetryPolicyNotRollbackOnConflict() throws Exception { + boolean oldBranchRollbackFlag = (boolean) branchRollbackFlagField.get(null); + branchRollbackFlagField.set(null, false); + ConnectionProxy connectionProxy = new ConnectionProxy(dataSourceProxy, null); + connectionProxy.bind(TEST_XID); + Assertions.assertThrows(LockWaitTimeoutException.class, connectionProxy::commit); + branchRollbackFlagField.set(null, oldBranchRollbackFlag); + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutorTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutorTest.java new file mode 100644 index 00000000000..8ce5922b777 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/exec/AbstractDMLBaseExecutorTest.java @@ -0,0 +1,101 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.exec; + +import io.seata.rm.datasource.ConnectionContext; +import io.seata.rm.datasource.ConnectionProxy; +import io.seata.rm.datasource.PreparedStatementProxy; +import io.seata.rm.datasource.sql.SQLInsertRecognizer; +import io.seata.rm.datasource.sql.struct.TableMeta; +import io.seata.rm.datasource.sql.struct.TableRecords; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.sql.Connection; + +/** + * AbstractDMLBaseExecutor test + * + * @author ggndnn + */ +public class AbstractDMLBaseExecutorTest { + private ConnectionProxy connectionProxy; + + private AbstractDMLBaseExecutor executor; + + private Field branchRollbackFlagField; + + @BeforeEach + public void initBeforeEach() throws Exception { + branchRollbackFlagField = ConnectionProxy.LockRetryPolicy.class.getDeclaredField("LOCK_RETRY_POLICY_BRANCH_ROLLBACK_ON_CONFLICT"); + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(branchRollbackFlagField, branchRollbackFlagField.getModifiers() & ~Modifier.FINAL); + branchRollbackFlagField.setAccessible(true); + boolean branchRollbackFlag = (boolean) branchRollbackFlagField.get(null); + Assertions.assertTrue(branchRollbackFlag); + + Connection targetConnection = Mockito.mock(Connection.class); + connectionProxy = Mockito.mock(ConnectionProxy.class); + Mockito.doThrow(new LockConflictException()) + .when(connectionProxy).commit(); + Mockito.when(connectionProxy.getAutoCommit()) + .thenReturn(Boolean.TRUE); + Mockito.when(connectionProxy.getTargetConnection()) + .thenReturn(targetConnection); + Mockito.when(connectionProxy.getContext()) + .thenReturn(new ConnectionContext()); + PreparedStatementProxy statementProxy = Mockito.mock(PreparedStatementProxy.class); + Mockito.when(statementProxy.getConnectionProxy()) + .thenReturn(connectionProxy); + StatementCallback statementCallback = Mockito.mock(StatementCallback.class); + SQLInsertRecognizer sqlInsertRecognizer = Mockito.mock(SQLInsertRecognizer.class); + TableMeta tableMeta = Mockito.mock(TableMeta.class); + executor = Mockito.spy(new InsertExecutor(statementProxy, statementCallback, sqlInsertRecognizer)); + Mockito.doReturn(tableMeta) + .when(executor).getTableMeta(); + TableRecords tableRecords = new TableRecords(); + Mockito.doReturn(tableRecords) + .when(executor).beforeImage(); + Mockito.doReturn(tableRecords) + .when(executor).afterImage(tableRecords); + } + + @Test + public void testLockRetryPolicyRollbackOnConflict() throws Exception { + boolean oldBranchRollbackFlag = (boolean) branchRollbackFlagField.get(null); + branchRollbackFlagField.set(null, true); + Assertions.assertThrows(LockWaitTimeoutException.class, executor::execute); + Mockito.verify(connectionProxy.getTargetConnection(), Mockito.atLeastOnce()) + .rollback(); + Mockito.verify(connectionProxy, Mockito.never()).rollback(); + branchRollbackFlagField.set(null, oldBranchRollbackFlag); + } + + @Test + public void testLockRetryPolicyNotRollbackOnConflict() throws Throwable { + boolean oldBranchRollbackFlag = (boolean) branchRollbackFlagField.get(null); + branchRollbackFlagField.set(null, false); + Assertions.assertThrows(LockConflictException.class, executor::execute); + Mockito.verify(connectionProxy.getTargetConnection(), Mockito.times(1)).rollback(); + Mockito.verify(connectionProxy, Mockito.never()).rollback(); + branchRollbackFlagField.set(null, oldBranchRollbackFlag); + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/exec/BatchInsertExecutorTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/exec/BatchInsertExecutorTest.java index c6a15dcd7ab..37ee104a352 100644 --- a/rm-datasource/src/test/java/io/seata/rm/datasource/exec/BatchInsertExecutorTest.java +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/exec/BatchInsertExecutorTest.java @@ -15,8 +15,10 @@ */ package io.seata.rm.datasource.exec; +import io.seata.common.exception.NotSupportYetException; import io.seata.rm.datasource.PreparedStatementProxy; import io.seata.rm.datasource.sql.SQLInsertRecognizer; +import io.seata.rm.datasource.sql.struct.Null; import io.seata.rm.datasource.sql.struct.TableMeta; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -30,11 +32,12 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; /** - * only support getPkValuesByColumn(getPkValuesByColumn、getPkValuesByAuto) + * batch insert executor test * * @author zjinlei * @date 2019/07/16 @@ -44,6 +47,7 @@ public class BatchInsertExecutorTest { private static final String ID_COLUMN = "id"; private static final String USER_ID_COLUMN = "user_id"; private static final String USER_NAME_COLUMN = "user_name"; + private static final String USER_STATUS_COLUMN = "user_status"; private static final List PK_VALUES = Arrays.asList(100000001, 100000002, 100000003, 100000004, 100000005); private PreparedStatementProxy statementProxy; @@ -66,7 +70,7 @@ public void init() { } @Test - public void testGetPkValuesByColumn() throws SQLException { + public void testGetPkValuesByColumnOfJDBC() throws SQLException { mockInsertColumns(); mockParameters(); doReturn(tableMeta).when(insertExecutor).getTableMeta(); @@ -77,17 +81,207 @@ public void testGetPkValuesByColumn() throws SQLException { Assertions.assertIterableEquals(pkValuesByColumn, pkValues); } + @Test + public void testGetPkValuesByColumnAndAllRefOfJDBC() throws SQLException { + mockInsertColumns(); + mockParametersWithAllRefOfJDBC(); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + List pkValues = new ArrayList<>(); + pkValues.addAll(PK_VALUES); + List pkValuesByColumn = insertExecutor.getPkValuesByColumn(); + Assertions.assertIterableEquals(pkValuesByColumn, pkValues); + } + + @Test + public void testGetPkValuesByColumnAndPkRefOfJDBC() throws SQLException { + mockInsertColumns(); + mockParametersWithPkRefOfJDBC(); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + List pkValues = new ArrayList<>(); + pkValues.addAll(PK_VALUES); + List pkValuesByColumn = insertExecutor.getPkValuesByColumn(); + Assertions.assertIterableEquals(pkValuesByColumn, pkValues); + } + + @Test + public void testGetPkValuesByColumnAndPkUnRefOfJDBC() throws SQLException { + mockInsertColumns(); + int pkId = PK_VALUES.get(0); + mockParametersWithPkUnRefOfJDBC(pkId); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + List pkValues = new ArrayList<>(); + pkValues.add(pkId); + List pkValuesByColumn = insertExecutor.getPkValuesByColumn(); + Assertions.assertIterableEquals(pkValuesByColumn, pkValues); + } + + //----------------mysql batch values (),(),()------------------------ + + @Test + public void testGetPkValuesByColumnAndAllRefOfMysql() throws SQLException { + mockInsertColumns(); + mockParametersAllRefOfMysql(); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + List pkValues = new ArrayList<>(); + pkValues.addAll(PK_VALUES); + List pkValuesByColumn = insertExecutor.getPkValuesByColumn(); + Assertions.assertIterableEquals(pkValuesByColumn, pkValues); + } + + @Test + public void testGetPkValuesByColumnAndPkRefOfMysql() throws SQLException { + mockInsertColumns(); + mockParametersWithPkRefOfMysql(); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + List pkValues = new ArrayList<>(); + pkValues.addAll(PK_VALUES); + List pkValuesByColumn = insertExecutor.getPkValuesByColumn(); + Assertions.assertIterableEquals(pkValuesByColumn, pkValues); + } + + @Test + public void testGetPkValuesByColumnAndPkUnRefOfMysql() throws SQLException { + mockInsertColumns(); + mockParametersWithPkUnRefOfMysql(); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + List pkValues = new ArrayList<>(); + pkValues.addAll(PK_VALUES); + List pkValuesByColumn = insertExecutor.getPkValuesByColumn(); + Assertions.assertIterableEquals(pkValuesByColumn, pkValues); + } + + @Test + public void testGetPkValues_NotSupportYetException() { + Assertions.assertThrows(NotSupportYetException.class, () -> { + mockInsertColumns(); + mockParameters_with_number_and_insertRows_with_placeholde_null(); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + insertExecutor.getPkValuesByColumn(); + }); + } + + @Test + public void testGetPkValues_not_NotSupportYetException() throws SQLException { + mockInsertColumns(); + mockParameters_with_null_and_insertRows_with_placeholder_null(); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + doReturn(new ArrayList<>()).when(insertExecutor).getPkValuesByAuto(); + insertExecutor.getPkValuesByColumn(); + verify(insertExecutor).getPkValuesByAuto(); + } + + private void mockParameters_with_null_and_insertRows_with_placeholder_null() { + ArrayList[] paramters = new ArrayList[5]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add("userId1"); + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add(Null.get()); + ArrayList arrayList2 = new ArrayList<>(); + arrayList2.add("userName1"); + ArrayList arrayList3 = new ArrayList<>(); + arrayList3.add("userId2"); + ArrayList arrayList4 = new ArrayList<>(); + arrayList4.add("userName2"); + paramters[0] = arrayList0; + paramters[1] = arrayList1; + paramters[2] = arrayList2; + paramters[3] = arrayList3; + paramters[4] = arrayList4; + when(statementProxy.getParameters()).thenReturn(paramters); + + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", "?", "?", "userStatus1")); + insertRows.add(Arrays.asList("?", Null.get(), "?", "userStatus2")); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); + } + + private void mockParameters_with_number_and_insertRows_with_placeholde_null() { + ArrayList[] paramters = new ArrayList[5]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add("userId1"); + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add(PK_VALUES.get(0)); + ArrayList arrayList2 = new ArrayList<>(); + arrayList2.add("userName1"); + ArrayList arrayList3 = new ArrayList<>(); + arrayList3.add("userId2"); + ArrayList arrayList4 = new ArrayList<>(); + arrayList4.add("userName2"); + paramters[0] = arrayList0; + paramters[1] = arrayList1; + paramters[2] = arrayList2; + paramters[3] = arrayList3; + paramters[4] = arrayList4; + when(statementProxy.getParameters()).thenReturn(paramters); + + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", "?", "?", "userStatus1")); + insertRows.add(Arrays.asList("?", Null.get(), "?", "userStatus2")); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); + } + private List mockInsertColumns() { List columns = new ArrayList<>(); columns.add(USER_ID_COLUMN); columns.add(ID_COLUMN); columns.add(USER_NAME_COLUMN); + columns.add(USER_STATUS_COLUMN); when(sqlInsertRecognizer.getInsertColumns()).thenReturn(columns); return columns; } private void mockParameters() { - ArrayList[] paramters = new ArrayList[15]; + int PK_INDEX = 1; + ArrayList[] paramters = new ArrayList[4]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add("userId1"); + arrayList0.add("userId2"); + arrayList0.add("userId3"); + arrayList0.add("userId4"); + arrayList0.add("userId5"); + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add(PK_VALUES.get(0)); + arrayList1.add(PK_VALUES.get(1)); + arrayList1.add(PK_VALUES.get(2)); + arrayList1.add(PK_VALUES.get(3)); + arrayList1.add(PK_VALUES.get(4)); + ArrayList arrayList2 = new ArrayList<>(); + arrayList2.add("userName1"); + arrayList2.add("userName2"); + arrayList2.add("userName3"); + arrayList2.add("userName4"); + arrayList2.add("userName5"); + ArrayList arrayList3 = new ArrayList<>(); + arrayList3.add("userStatus1"); + arrayList3.add("userStatus2"); + arrayList3.add("userStatus3"); + arrayList3.add("userStatus4"); + arrayList3.add("userStatus5"); + + paramters[0] = arrayList0; + paramters[1] = arrayList1; + paramters[2] = arrayList2; + paramters[3] = arrayList3; + + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", "?", "?", "?")); + + when(statementProxy.getParameters()).thenReturn(paramters); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); + when(statementProxy.getParamsByIndex(PK_INDEX)).thenReturn(paramters[PK_INDEX]); + } + + private void mockParametersAllRefOfMysql() { + + ArrayList[] paramters = new ArrayList[20]; ArrayList arrayList1 = new ArrayList<>(); arrayList1.add("userId1"); ArrayList arrayList2 = new ArrayList<>(); @@ -95,29 +289,45 @@ private void mockParameters() { ArrayList arrayList3 = new ArrayList<>(); arrayList3.add("userName1"); ArrayList arrayList4 = new ArrayList<>(); - arrayList4.add("userId2"); + arrayList4.add("userStatus1"); + ArrayList arrayList5 = new ArrayList<>(); - arrayList5.add(100000002); + arrayList5.add("userId2"); ArrayList arrayList6 = new ArrayList<>(); - arrayList6.add("userName2"); + arrayList6.add(100000002); ArrayList arrayList7 = new ArrayList<>(); - arrayList7.add("userId3"); + arrayList7.add("userName2"); ArrayList arrayList8 = new ArrayList<>(); - arrayList8.add(100000003); + arrayList8.add("userStatus2"); + ArrayList arrayList9 = new ArrayList<>(); - arrayList9.add("userName3"); + arrayList9.add("userId3"); ArrayList arrayList10 = new ArrayList<>(); - arrayList10.add("userId4"); + arrayList10.add(100000003); ArrayList arrayList11 = new ArrayList<>(); - arrayList11.add(100000004); + arrayList11.add("userName3"); ArrayList arrayList12 = new ArrayList<>(); - arrayList12.add("userName4"); + arrayList12.add("userStatus3"); + ArrayList arrayList13 = new ArrayList<>(); - arrayList13.add("userId5"); + arrayList13.add("userId4"); ArrayList arrayList14 = new ArrayList<>(); - arrayList14.add(100000005); + arrayList14.add(100000004); ArrayList arrayList15 = new ArrayList<>(); - arrayList15.add("userName5"); + arrayList15.add("userName4"); + ArrayList arrayList16 = new ArrayList<>(); + arrayList16.add("userStatus4"); + + ArrayList arrayList17 = new ArrayList<>(); + arrayList17.add("userId5"); + ArrayList arrayList18 = new ArrayList<>(); + arrayList18.add(100000005); + ArrayList arrayList19 = new ArrayList<>(); + arrayList19.add("userName5"); + ArrayList arrayList20 = new ArrayList<>(); + arrayList20.add("userStatus5"); + + paramters[0] = arrayList1; paramters[1] = arrayList2; paramters[2] = arrayList3; @@ -133,6 +343,188 @@ private void mockParameters() { paramters[12] = arrayList13; paramters[13] = arrayList14; paramters[14] = arrayList15; + paramters[15] = arrayList16; + paramters[16] = arrayList17; + paramters[17] = arrayList18; + paramters[18] = arrayList19; + paramters[19] = arrayList20; + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", "?", "?", "?")); + insertRows.add(Arrays.asList("?", "?", "?", "?")); + insertRows.add(Arrays.asList("?", "?", "?", "?")); + insertRows.add(Arrays.asList("?", "?", "?", "?")); + insertRows.add(Arrays.asList("?", "?", "?", "?")); + when(statementProxy.getParameters()).thenReturn(paramters); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); + when(statementProxy.getParameters()).thenReturn(paramters); + } + + private void mockParametersWithPkRefOfMysql() { + + ArrayList[] paramters = new ArrayList[10]; + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add("userId1"); + ArrayList arrayList2 = new ArrayList<>(); + arrayList2.add(100000001); + ArrayList arrayList3 = new ArrayList<>(); + arrayList3.add("userId2"); + ArrayList arrayList4 = new ArrayList<>(); + arrayList4.add(100000002); + ArrayList arrayList5 = new ArrayList<>(); + arrayList5.add("userId3"); + ArrayList arrayList6 = new ArrayList<>(); + arrayList6.add(100000003); + ArrayList arrayList7 = new ArrayList<>(); + arrayList7.add("userId4"); + ArrayList arrayList8 = new ArrayList<>(); + arrayList8.add(100000004); + ArrayList arrayList9 = new ArrayList<>(); + arrayList9.add("userId5"); + ArrayList arrayList10 = new ArrayList<>(); + arrayList10.add(100000005); + paramters[0] = arrayList1; + paramters[1] = arrayList2; + paramters[2] = arrayList3; + paramters[3] = arrayList4; + paramters[4] = arrayList5; + paramters[5] = arrayList6; + paramters[6] = arrayList7; + paramters[7] = arrayList8; + paramters[8] = arrayList9; + paramters[9] = arrayList10; + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", "?", "1", "11")); + insertRows.add(Arrays.asList("?", "?", "2", "22")); + insertRows.add(Arrays.asList("?", "?", "3", "33")); + insertRows.add(Arrays.asList("?", "?", "4", "44")); + insertRows.add(Arrays.asList("?", "?", "5", "55")); + when(statementProxy.getParameters()).thenReturn(paramters); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); when(statementProxy.getParameters()).thenReturn(paramters); } + + private void mockParametersWithPkUnRefOfMysql() { + + ArrayList[] paramters = new ArrayList[10]; + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add("userId1"); + ArrayList arrayList2 = new ArrayList<>(); + arrayList2.add(100000001); + ArrayList arrayList3 = new ArrayList<>(); + arrayList3.add("userId2"); + ArrayList arrayList4 = new ArrayList<>(); + arrayList4.add(100000002); + ArrayList arrayList5 = new ArrayList<>(); + arrayList5.add("userId3"); + ArrayList arrayList6 = new ArrayList<>(); + arrayList6.add(100000003); + ArrayList arrayList7 = new ArrayList<>(); + arrayList7.add("userId4"); + ArrayList arrayList8 = new ArrayList<>(); + arrayList8.add(100000004); + ArrayList arrayList9 = new ArrayList<>(); + arrayList9.add("userId5"); + ArrayList arrayList10 = new ArrayList<>(); + arrayList10.add(100000005); + paramters[0] = arrayList1; + paramters[1] = arrayList2; + paramters[2] = arrayList3; + paramters[3] = arrayList4; + paramters[4] = arrayList5; + paramters[5] = arrayList6; + paramters[6] = arrayList7; + paramters[7] = arrayList8; + paramters[8] = arrayList9; + paramters[9] = arrayList10; + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", 100000001, "?", "1")); + insertRows.add(Arrays.asList("?", 100000002, "?", "2")); + insertRows.add(Arrays.asList("?", 100000003, "?", "3")); + insertRows.add(Arrays.asList("?", 100000004, "?", "4")); + insertRows.add(Arrays.asList("?", 100000005, "?", "5")); + when(statementProxy.getParameters()).thenReturn(paramters); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); + } + + + private void mockParametersWithAllRefOfJDBC() { + int PK_INDEX = 1; + ArrayList[] paramters = new ArrayList[4]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add("userId1"); + arrayList0.add("userId2"); + arrayList0.add("userId3"); + arrayList0.add("userId4"); + arrayList0.add("userId5"); + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add(PK_VALUES.get(0)); + arrayList1.add(PK_VALUES.get(1)); + arrayList1.add(PK_VALUES.get(2)); + arrayList1.add(PK_VALUES.get(3)); + arrayList1.add(PK_VALUES.get(4)); + ArrayList arrayList2 = new ArrayList<>(); + arrayList2.add("userName1"); + arrayList2.add("userName2"); + arrayList2.add("userName3"); + arrayList2.add("userName4"); + arrayList2.add("userName5"); + ArrayList arrayList3 = new ArrayList<>(); + arrayList3.add("userStatus1"); + arrayList3.add("userStatus2"); + arrayList3.add("userStatus3"); + arrayList3.add("userStatus4"); + arrayList3.add("userStatus5"); + paramters[0] = arrayList0; + paramters[1] = arrayList1; + paramters[2] = arrayList2; + paramters[3] = arrayList3; + + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", "?", "?", "?")); + when(statementProxy.getParameters()).thenReturn(paramters); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); + when(statementProxy.getParamsByIndex(PK_INDEX)).thenReturn(paramters[PK_INDEX]); + } + + private void mockParametersWithPkRefOfJDBC() { + int PK_INDEX = 1; + ArrayList[] paramters = new ArrayList[2]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add("userId1"); + arrayList0.add("userId2"); + arrayList0.add("userId3"); + arrayList0.add("userId4"); + arrayList0.add("userId5"); + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add(PK_VALUES.get(0)); + arrayList1.add(PK_VALUES.get(1)); + arrayList1.add(PK_VALUES.get(2)); + arrayList1.add(PK_VALUES.get(3)); + arrayList1.add(PK_VALUES.get(4)); + paramters[0] = arrayList0; + paramters[1] = arrayList1; + + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", "?", "userName1", "userStatus1")); + when(statementProxy.getParameters()).thenReturn(paramters); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); + when(statementProxy.getParamsByIndex(PK_INDEX)).thenReturn(paramters[PK_INDEX]); + } + + + private void mockParametersWithPkUnRefOfJDBC(int pkId) { + ArrayList[] paramters = new ArrayList[2]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add("userId1"); + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add("userName1"); + paramters[0] = arrayList0; + paramters[1] = arrayList1; + + List> insertRows = new ArrayList<>(); + insertRows.add(Arrays.asList("?", pkId, "?", "userStatus")); + when(statementProxy.getParameters()).thenReturn(paramters); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(insertRows); + } + } diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/exec/InsertExecutorTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/exec/InsertExecutorTest.java index c08ba61c68b..a7a3452c0ae 100644 --- a/rm-datasource/src/test/java/io/seata/rm/datasource/exec/InsertExecutorTest.java +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/exec/InsertExecutorTest.java @@ -33,6 +33,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -52,6 +53,7 @@ public class InsertExecutorTest { private static final String ID_COLUMN = "id"; private static final String USER_ID_COLUMN = "user_id"; private static final String USER_NAME_COLUMN = "user_name"; + private static final String USER_STATUS_COLUMN = "user_status"; private static final Integer PK_VALUE = 100; private PreparedStatementProxy statementProxy; @@ -105,6 +107,7 @@ public void testAfterImage_ByColumn() throws SQLException { @Test public void testAfterImage_ByAuto() throws SQLException { doReturn(false).when(insertExecutor).containsPK(); + doReturn(true).when(insertExecutor).containsColumns(); List pkValues = new ArrayList<>(); pkValues.add(PK_VALUE); doReturn(pkValues).when(insertExecutor).getPkValuesByAuto(); @@ -118,6 +121,7 @@ public void testAfterImage_ByAuto() throws SQLException { public void testAfterImage_Exception() { Assertions.assertThrows(SQLException.class, () -> { doReturn(false).when(insertExecutor).containsPK(); + doReturn(true).when(insertExecutor).containsColumns(); List pkValues = new ArrayList<>(); pkValues.add(PK_VALUE); doReturn(pkValues).when(insertExecutor).getPkValuesByAuto(); @@ -129,6 +133,7 @@ public void testAfterImage_Exception() { @Test public void testContainsPK() { List insertColumns = mockInsertColumns(); + mockInsertRows(); mockParameters(); doReturn(tableMeta).when(insertExecutor).getTableMeta(); when(tableMeta.containsPK(insertColumns)).thenReturn(true); @@ -140,12 +145,12 @@ public void testContainsPK() { @Test public void testGetPkValuesByColumn() throws SQLException { mockInsertColumns(); - mockParameters(); + mockInsertRows(); + mockParametersOfOnePk(); doReturn(tableMeta).when(insertExecutor).getTableMeta(); when(tableMeta.getPkName()).thenReturn(ID_COLUMN); List pkValues = new ArrayList<>(); pkValues.add(PK_VALUE); - when(statementProxy.getParamsByIndex(0)).thenReturn(pkValues); List pkValuesByColumn = insertExecutor.getPkValuesByColumn(); Assertions.assertEquals(pkValuesByColumn, pkValues); } @@ -157,7 +162,6 @@ public void testGetPkValuesByColumn_Exception() { mockParameters(); doReturn(tableMeta).when(insertExecutor).getTableMeta(); when(tableMeta.getPkName()).thenReturn(ID_COLUMN); - when(statementProxy.getParamsByIndex(0)).thenReturn(null); insertExecutor.getPkValuesByColumn(); }); } @@ -165,12 +169,10 @@ public void testGetPkValuesByColumn_Exception() { @Test public void testGetPkValuesByColumn_PkValue_Null() throws SQLException { mockInsertColumns(); - mockParameters(); + mockInsertRows(); + mockParametersPkWithNull(); doReturn(tableMeta).when(insertExecutor).getTableMeta(); when(tableMeta.getPkName()).thenReturn(ID_COLUMN); - List pkValuesNull = new ArrayList<>(); - pkValuesNull.add(Null.get()); - when(statementProxy.getParamsByIndex(0)).thenReturn(pkValuesNull); List pkValuesAuto = new ArrayList<>(); pkValuesAuto.add(PK_VALUE); //mock getPkValuesByAuto @@ -303,21 +305,56 @@ private List mockInsertColumns() { columns.add(ID_COLUMN); columns.add(USER_ID_COLUMN); columns.add(USER_NAME_COLUMN); + columns.add(USER_STATUS_COLUMN); when(sqlInsertRecognizer.getInsertColumns()).thenReturn(columns); return columns; } private void mockParameters() { - ArrayList[] paramters = new ArrayList[3]; + ArrayList[] paramters = new ArrayList[4]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add(PK_VALUE); ArrayList arrayList1 = new ArrayList<>(); - arrayList1.add(PK_VALUE); + arrayList1.add("userId1"); + ArrayList arrayList2 = new ArrayList<>(); + arrayList2.add("userName1"); + ArrayList arrayList3 = new ArrayList<>(); + arrayList3.add("userStatus1"); + paramters[0] = arrayList0; + paramters[1] = arrayList1; + paramters[2] = arrayList2; + paramters[3] = arrayList3; + when(statementProxy.getParameters()).thenReturn(paramters); + } + + private void mockParametersPkWithNull() { + ArrayList[] paramters = new ArrayList[4]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add(Null.get()); + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add("userId1"); ArrayList arrayList2 = new ArrayList<>(); - arrayList2.add("userId1"); + arrayList2.add("userName1"); ArrayList arrayList3 = new ArrayList<>(); - arrayList3.add("userName1"); + arrayList3.add("userStatus1"); + paramters[0] = arrayList0; + paramters[1] = arrayList1; + paramters[2] = arrayList2; + paramters[3] = arrayList3; + when(statementProxy.getParameters()).thenReturn(paramters); + } + + private void mockParametersOfOnePk() { + ArrayList[] paramters = new ArrayList[1]; + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add(PK_VALUE); paramters[0] = arrayList1; - paramters[1] = arrayList2; - paramters[2] = arrayList3; when(statementProxy.getParameters()).thenReturn(paramters); } + + private void mockInsertRows() { + List> rows = new ArrayList<>(); + rows.add(Arrays.asList("?", "?", "?", "?")); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(rows); + } } diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/exec/OracleInsertExecutorTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/exec/OracleInsertExecutorTest.java new file mode 100644 index 00000000000..0fb42523ad2 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/exec/OracleInsertExecutorTest.java @@ -0,0 +1,115 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.exec; + +import io.seata.rm.datasource.PreparedStatementProxy; +import io.seata.rm.datasource.sql.SQLInsertRecognizer; +import io.seata.rm.datasource.sql.struct.SqlSequenceExpr; +import io.seata.rm.datasource.sql.struct.TableMeta; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +/** + * @author jsbxyyx + */ +public class OracleInsertExecutorTest { + + private static final String ID_COLUMN = "id"; + private static final String USER_ID_COLUMN = "user_id"; + private static final String USER_NAME_COLUMN = "user_name"; + private static final String USER_STATUS_COLUMN = "user_status"; + private static final Integer PK_VALUE = 100; + + private PreparedStatementProxy statementProxy; + + private SQLInsertRecognizer sqlInsertRecognizer; + + private StatementCallback statementCallback; + + private TableMeta tableMeta; + + private InsertExecutor insertExecutor; + + @BeforeEach + public void init() { + statementProxy = mock(PreparedStatementProxy.class); + statementCallback = mock(StatementCallback.class); + sqlInsertRecognizer = mock(SQLInsertRecognizer.class); + tableMeta = mock(TableMeta.class); + insertExecutor = Mockito.spy(new InsertExecutor(statementProxy, statementCallback, sqlInsertRecognizer)); + } + + @Test + public void testPkValue_sequence() throws SQLException { + mockInsertColumns(); + SqlSequenceExpr expr = mockParametersPkWithSeq(); + doReturn(tableMeta).when(insertExecutor).getTableMeta(); + when(tableMeta.getPkName()).thenReturn(ID_COLUMN); + List pkValuesAuto = new ArrayList<>(); + pkValuesAuto.add(PK_VALUE); + + doReturn(pkValuesAuto).when(insertExecutor).getPkValuesBySequence(expr); + List pkValuesByColumn = insertExecutor.getPkValuesByColumn(); + verify(insertExecutor).getPkValuesBySequence(expr); + Assertions.assertEquals(pkValuesByColumn, pkValuesAuto); + } + + private List mockInsertColumns() { + List columns = new ArrayList<>(); + columns.add(ID_COLUMN); + columns.add(USER_ID_COLUMN); + columns.add(USER_NAME_COLUMN); + columns.add(USER_STATUS_COLUMN); + when(sqlInsertRecognizer.getInsertColumns()).thenReturn(columns); + return columns; + } + + private SqlSequenceExpr mockParametersPkWithSeq() { + SqlSequenceExpr expr = new SqlSequenceExpr("seq", "nextval"); + ArrayList[] paramters = new ArrayList[4]; + ArrayList arrayList0 = new ArrayList<>(); + arrayList0.add(expr); + ArrayList arrayList1 = new ArrayList<>(); + arrayList1.add("userId1"); + ArrayList arrayList2 = new ArrayList<>(); + arrayList2.add("userName1"); + ArrayList arrayList3 = new ArrayList<>(); + arrayList3.add("userStatus1"); + paramters[0] = arrayList0; + paramters[1] = arrayList1; + paramters[2] = arrayList2; + paramters[3] = arrayList3; + when(statementProxy.getParameters()).thenReturn(paramters); + + List> rows = new ArrayList<>(); + rows.add(Arrays.asList("?", "?", "?", "?")); + when(sqlInsertRecognizer.getInsertRows()).thenReturn(rows); + + return expr; + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockConnection.java b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockConnection.java new file mode 100644 index 00000000000..006b6265e2e --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockConnection.java @@ -0,0 +1,51 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.mock; + +import java.sql.DatabaseMetaData; +import java.sql.SQLException; +import java.util.Properties; + +/** + * Mock connection + * @author will + * @date 2019/8/14 + */ +public class MockConnection extends com.alibaba.druid.mock.MockConnection { + + private MockDriver mockDriver; + + /** + * Instantiate a new MockConnection + * @param driver + * @param url + * @param connectProperties + */ + public MockConnection(MockDriver driver, String url, Properties connectProperties) { + super(driver, url, connectProperties); + this.mockDriver = driver; + } + + @Override + public DatabaseMetaData getMetaData() throws SQLException { + return new MockDatabaseMetaData(this); + } + + @Override + public MockDriver getDriver() { + return mockDriver; + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockDatabaseMetaData.java b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockDatabaseMetaData.java new file mode 100644 index 00000000000..b2dc9294147 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockDatabaseMetaData.java @@ -0,0 +1,985 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.mock; + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.RowIdLifetime; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.List; + +import com.alibaba.druid.mock.MockStatementBase; + +/** + * @author will + * @date 2019/8/14 + */ +public class MockDatabaseMetaData implements DatabaseMetaData { + + protected MockConnection connection; + + private static List columnMetaColumnLabels = Arrays.asList( + "TABLE_CAT", + "TABLE_SCHEM", + "TABLE_NAME", + "COLUMN_NAME", + "DATA_TYPE", + "TYPE_NAME", + "COLUMN_SIZE", + "DECIMAL_DIGITS", + "NUM_PREC_RADIX", + "NULLABLE", + "REMARKS", + "COLUMN_DEF", + "SQL_DATA_TYPE", + "SQL_DATETIME_SUB", + "CHAR_OCTET_LENGTH", + "ORDINAL_POSITION", + "IS_NULLABLE", + "IS_AUTOINCREMENT" + ); + + private static List indexMetaColumnLabels = Arrays.asList( + "INDEX_NAME", + "COLUMN_NAME", + "NON_UNIQUE", + "INDEX_QUALIFIER", + "TYPE", + "ORDINAL_POSITION", + "ASC_OR_DESC", + "CARDINALITY" + ); + + private Object[][] columnsMetasReturnValue; + + private Object[][] indexMetasReturnValue; + + /** + * Instantiate a new MockDatabaseMetaData + */ + public MockDatabaseMetaData(MockConnection connection) { + this.connection = connection; + this.columnsMetasReturnValue = connection.getDriver().getMockColumnsMetasReturnValue(); + this.indexMetasReturnValue = connection.getDriver().getMockIndexMetasReturnValue(); + } + + @Override + public boolean allProceduresAreCallable() throws SQLException { + return false; + } + + @Override + public boolean allTablesAreSelectable() throws SQLException { + return false; + } + + @Override + public String getURL() throws SQLException { + return this.connection.getUrl(); + } + + @Override + public String getUserName() throws SQLException { + return null; + } + + @Override + public boolean isReadOnly() throws SQLException { + return false; + } + + @Override + public boolean nullsAreSortedHigh() throws SQLException { + return false; + } + + @Override + public boolean nullsAreSortedLow() throws SQLException { + return false; + } + + @Override + public boolean nullsAreSortedAtStart() throws SQLException { + return false; + } + + @Override + public boolean nullsAreSortedAtEnd() throws SQLException { + return false; + } + + @Override + public String getDatabaseProductName() throws SQLException { + return null; + } + + @Override + public String getDatabaseProductVersion() throws SQLException { + return null; + } + + @Override + public String getDriverName() throws SQLException { + return null; + } + + @Override + public String getDriverVersion() throws SQLException { + return null; + } + + @Override + public int getDriverMajorVersion() { + return 0; + } + + @Override + public int getDriverMinorVersion() { + return 0; + } + + @Override + public boolean usesLocalFiles() throws SQLException { + return false; + } + + @Override + public boolean usesLocalFilePerTable() throws SQLException { + return false; + } + + @Override + public boolean supportsMixedCaseIdentifiers() throws SQLException { + return false; + } + + @Override + public boolean storesUpperCaseIdentifiers() throws SQLException { + return false; + } + + @Override + public boolean storesLowerCaseIdentifiers() throws SQLException { + return false; + } + + @Override + public boolean storesMixedCaseIdentifiers() throws SQLException { + return false; + } + + @Override + public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException { + return false; + } + + @Override + public boolean storesUpperCaseQuotedIdentifiers() throws SQLException { + return false; + } + + @Override + public boolean storesLowerCaseQuotedIdentifiers() throws SQLException { + return false; + } + + @Override + public boolean storesMixedCaseQuotedIdentifiers() throws SQLException { + return false; + } + + @Override + public String getIdentifierQuoteString() throws SQLException { + return null; + } + + @Override + public String getSQLKeywords() throws SQLException { + return null; + } + + @Override + public String getNumericFunctions() throws SQLException { + return null; + } + + @Override + public String getStringFunctions() throws SQLException { + return null; + } + + @Override + public String getSystemFunctions() throws SQLException { + return null; + } + + @Override + public String getTimeDateFunctions() throws SQLException { + return null; + } + + @Override + public String getSearchStringEscape() throws SQLException { + return null; + } + + @Override + public String getExtraNameCharacters() throws SQLException { + return null; + } + + @Override + public boolean supportsAlterTableWithAddColumn() throws SQLException { + return false; + } + + @Override + public boolean supportsAlterTableWithDropColumn() throws SQLException { + return false; + } + + @Override + public boolean supportsColumnAliasing() throws SQLException { + return false; + } + + @Override + public boolean nullPlusNonNullIsNull() throws SQLException { + return false; + } + + @Override + public boolean supportsConvert() throws SQLException { + return false; + } + + @Override + public boolean supportsConvert(int fromType, int toType) throws SQLException { + return false; + } + + @Override + public boolean supportsTableCorrelationNames() throws SQLException { + return false; + } + + @Override + public boolean supportsDifferentTableCorrelationNames() throws SQLException { + return false; + } + + @Override + public boolean supportsExpressionsInOrderBy() throws SQLException { + return false; + } + + @Override + public boolean supportsOrderByUnrelated() throws SQLException { + return false; + } + + @Override + public boolean supportsGroupBy() throws SQLException { + return false; + } + + @Override + public boolean supportsGroupByUnrelated() throws SQLException { + return false; + } + + @Override + public boolean supportsGroupByBeyondSelect() throws SQLException { + return false; + } + + @Override + public boolean supportsLikeEscapeClause() throws SQLException { + return false; + } + + @Override + public boolean supportsMultipleResultSets() throws SQLException { + return false; + } + + @Override + public boolean supportsMultipleTransactions() throws SQLException { + return false; + } + + @Override + public boolean supportsNonNullableColumns() throws SQLException { + return false; + } + + @Override + public boolean supportsMinimumSQLGrammar() throws SQLException { + return false; + } + + @Override + public boolean supportsCoreSQLGrammar() throws SQLException { + return false; + } + + @Override + public boolean supportsExtendedSQLGrammar() throws SQLException { + return false; + } + + @Override + public boolean supportsANSI92EntryLevelSQL() throws SQLException { + return false; + } + + @Override + public boolean supportsANSI92IntermediateSQL() throws SQLException { + return false; + } + + @Override + public boolean supportsANSI92FullSQL() throws SQLException { + return false; + } + + @Override + public boolean supportsIntegrityEnhancementFacility() throws SQLException { + return false; + } + + @Override + public boolean supportsOuterJoins() throws SQLException { + return false; + } + + @Override + public boolean supportsFullOuterJoins() throws SQLException { + return false; + } + + @Override + public boolean supportsLimitedOuterJoins() throws SQLException { + return false; + } + + @Override + public String getSchemaTerm() throws SQLException { + return null; + } + + @Override + public String getProcedureTerm() throws SQLException { + return null; + } + + @Override + public String getCatalogTerm() throws SQLException { + return null; + } + + @Override + public boolean isCatalogAtStart() throws SQLException { + return false; + } + + @Override + public String getCatalogSeparator() throws SQLException { + return null; + } + + @Override + public boolean supportsSchemasInDataManipulation() throws SQLException { + return false; + } + + @Override + public boolean supportsSchemasInProcedureCalls() throws SQLException { + return false; + } + + @Override + public boolean supportsSchemasInTableDefinitions() throws SQLException { + return false; + } + + @Override + public boolean supportsSchemasInIndexDefinitions() throws SQLException { + return false; + } + + @Override + public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException { + return false; + } + + @Override + public boolean supportsCatalogsInDataManipulation() throws SQLException { + return false; + } + + @Override + public boolean supportsCatalogsInProcedureCalls() throws SQLException { + return false; + } + + @Override + public boolean supportsCatalogsInTableDefinitions() throws SQLException { + return false; + } + + @Override + public boolean supportsCatalogsInIndexDefinitions() throws SQLException { + return false; + } + + @Override + public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException { + return false; + } + + @Override + public boolean supportsPositionedDelete() throws SQLException { + return false; + } + + @Override + public boolean supportsPositionedUpdate() throws SQLException { + return false; + } + + @Override + public boolean supportsSelectForUpdate() throws SQLException { + return false; + } + + @Override + public boolean supportsStoredProcedures() throws SQLException { + return false; + } + + @Override + public boolean supportsSubqueriesInComparisons() throws SQLException { + return false; + } + + @Override + public boolean supportsSubqueriesInExists() throws SQLException { + return false; + } + + @Override + public boolean supportsSubqueriesInIns() throws SQLException { + return false; + } + + @Override + public boolean supportsSubqueriesInQuantifieds() throws SQLException { + return false; + } + + @Override + public boolean supportsCorrelatedSubqueries() throws SQLException { + return false; + } + + @Override + public boolean supportsUnion() throws SQLException { + return false; + } + + @Override + public boolean supportsUnionAll() throws SQLException { + return false; + } + + @Override + public boolean supportsOpenCursorsAcrossCommit() throws SQLException { + return false; + } + + @Override + public boolean supportsOpenCursorsAcrossRollback() throws SQLException { + return false; + } + + @Override + public boolean supportsOpenStatementsAcrossCommit() throws SQLException { + return false; + } + + @Override + public boolean supportsOpenStatementsAcrossRollback() throws SQLException { + return false; + } + + @Override + public int getMaxBinaryLiteralLength() throws SQLException { + return 0; + } + + @Override + public int getMaxCharLiteralLength() throws SQLException { + return 0; + } + + @Override + public int getMaxColumnNameLength() throws SQLException { + return 0; + } + + @Override + public int getMaxColumnsInGroupBy() throws SQLException { + return 0; + } + + @Override + public int getMaxColumnsInIndex() throws SQLException { + return 0; + } + + @Override + public int getMaxColumnsInOrderBy() throws SQLException { + return 0; + } + + @Override + public int getMaxColumnsInSelect() throws SQLException { + return 0; + } + + @Override + public int getMaxColumnsInTable() throws SQLException { + return 0; + } + + @Override + public int getMaxConnections() throws SQLException { + return 0; + } + + @Override + public int getMaxCursorNameLength() throws SQLException { + return 0; + } + + @Override + public int getMaxIndexLength() throws SQLException { + return 0; + } + + @Override + public int getMaxSchemaNameLength() throws SQLException { + return 0; + } + + @Override + public int getMaxProcedureNameLength() throws SQLException { + return 0; + } + + @Override + public int getMaxCatalogNameLength() throws SQLException { + return 0; + } + + @Override + public int getMaxRowSize() throws SQLException { + return 0; + } + + @Override + public boolean doesMaxRowSizeIncludeBlobs() throws SQLException { + return false; + } + + @Override + public int getMaxStatementLength() throws SQLException { + return 0; + } + + @Override + public int getMaxStatements() throws SQLException { + return 0; + } + + @Override + public int getMaxTableNameLength() throws SQLException { + return 0; + } + + @Override + public int getMaxTablesInSelect() throws SQLException { + return 0; + } + + @Override + public int getMaxUserNameLength() throws SQLException { + return 0; + } + + @Override + public int getDefaultTransactionIsolation() throws SQLException { + return 0; + } + + @Override + public boolean supportsTransactions() throws SQLException { + return false; + } + + @Override + public boolean supportsTransactionIsolationLevel(int level) throws SQLException { + return false; + } + + @Override + public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException { + return false; + } + + @Override + public boolean supportsDataManipulationTransactionsOnly() throws SQLException { + return false; + } + + @Override + public boolean dataDefinitionCausesTransactionCommit() throws SQLException { + return false; + } + + @Override + public boolean dataDefinitionIgnoredInTransactions() throws SQLException { + return false; + } + + @Override + public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) + throws SQLException { + return null; + } + + @Override + public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, + String columnNamePattern) throws SQLException { + return null; + } + + @Override + public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) + throws SQLException { + return null; + } + + @Override + public ResultSet getSchemas() throws SQLException { + return null; + } + + @Override + public ResultSet getCatalogs() throws SQLException { + return null; + } + + @Override + public ResultSet getTableTypes() throws SQLException { + return null; + } + + @Override + public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) + throws SQLException { + return new MockResultSet((MockStatementBase)this.connection.createStatement(), columnMetaColumnLabels) + .mockResultSet(columnsMetasReturnValue); + } + + @Override + public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) + throws SQLException { + return null; + } + + @Override + public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) + throws SQLException { + return null; + } + + @Override + public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) + throws SQLException { + return null; + } + + @Override + public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException { + return null; + } + + @Override + public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { + return null; + } + + @Override + public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException { + return null; + } + + @Override + public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { + return null; + } + + @Override + public ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, + String foreignCatalog, String foreignSchema, String foreignTable) + throws SQLException { + return null; + } + + @Override + public ResultSet getTypeInfo() throws SQLException { + return null; + } + + @Override + public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) + throws SQLException { + return new MockResultSet((MockStatementBase)this.connection.createStatement(), indexMetaColumnLabels) + .mockResultSet(indexMetasReturnValue); + } + + @Override + public boolean supportsResultSetType(int type) throws SQLException { + return false; + } + + @Override + public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException { + return false; + } + + @Override + public boolean ownUpdatesAreVisible(int type) throws SQLException { + return false; + } + + @Override + public boolean ownDeletesAreVisible(int type) throws SQLException { + return false; + } + + @Override + public boolean ownInsertsAreVisible(int type) throws SQLException { + return false; + } + + @Override + public boolean othersUpdatesAreVisible(int type) throws SQLException { + return false; + } + + @Override + public boolean othersDeletesAreVisible(int type) throws SQLException { + return false; + } + + @Override + public boolean othersInsertsAreVisible(int type) throws SQLException { + return false; + } + + @Override + public boolean updatesAreDetected(int type) throws SQLException { + return false; + } + + @Override + public boolean deletesAreDetected(int type) throws SQLException { + return false; + } + + @Override + public boolean insertsAreDetected(int type) throws SQLException { + return false; + } + + @Override + public boolean supportsBatchUpdates() throws SQLException { + return false; + } + + @Override + public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) + throws SQLException { + return null; + } + + @Override + public Connection getConnection() throws SQLException { + return null; + } + + @Override + public boolean supportsSavepoints() throws SQLException { + return false; + } + + @Override + public boolean supportsNamedParameters() throws SQLException { + return false; + } + + @Override + public boolean supportsMultipleOpenResults() throws SQLException { + return false; + } + + @Override + public boolean supportsGetGeneratedKeys() throws SQLException { + return false; + } + + @Override + public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException { + return null; + } + + @Override + public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException { + return null; + } + + @Override + public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, + String attributeNamePattern) throws SQLException { + return null; + } + + @Override + public boolean supportsResultSetHoldability(int holdability) throws SQLException { + return false; + } + + @Override + public int getResultSetHoldability() throws SQLException { + return 0; + } + + @Override + public int getDatabaseMajorVersion() throws SQLException { + return 0; + } + + @Override + public int getDatabaseMinorVersion() throws SQLException { + return 0; + } + + @Override + public int getJDBCMajorVersion() throws SQLException { + return 0; + } + + @Override + public int getJDBCMinorVersion() throws SQLException { + return 0; + } + + @Override + public int getSQLStateType() throws SQLException { + return 0; + } + + @Override + public boolean locatorsUpdateCopy() throws SQLException { + return false; + } + + @Override + public boolean supportsStatementPooling() throws SQLException { + return false; + } + + @Override + public RowIdLifetime getRowIdLifetime() throws SQLException { + return null; + } + + @Override + public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { + return null; + } + + @Override + public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException { + return false; + } + + @Override + public boolean autoCommitFailureClosesAllResultSets() throws SQLException { + return false; + } + + @Override + public ResultSet getClientInfoProperties() throws SQLException { + return null; + } + + @Override + public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) + throws SQLException { + return null; + } + + @Override + public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, + String columnNamePattern) throws SQLException { + return null; + } + + @Override + public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, + String columnNamePattern) throws SQLException { + return null; + } + + @Override + public boolean generatedKeyAlwaysReturned() throws SQLException { + return false; + } + + @Override + public T unwrap(Class iface) throws SQLException { + return null; + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + return false; + } + + public void setColumnsMetasReturnValue(Object[][] columnsMetasReturnValue) { + this.columnsMetasReturnValue = columnsMetasReturnValue; + } + + public void setIndexMetasReturnValue(Object[][] indexMetasReturnValue) { + this.indexMetasReturnValue = indexMetasReturnValue; + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockDriver.java b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockDriver.java new file mode 100644 index 00000000000..528fdd2f5f4 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockDriver.java @@ -0,0 +1,143 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.mock; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; +import com.alibaba.druid.mock.MockStatementBase; +import com.alibaba.druid.mock.handler.MockExecuteHandler; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Mock driver + * @author will + * @date 2019/8/14 + */ +public class MockDriver extends com.alibaba.druid.mock.MockDriver { + + private static final Logger LOGGER = LoggerFactory.getLogger(MockDriver.class); + + /** + * the mock value of return value + */ + private Object[][] mockReturnValue = null; + + /** + * the mock value of columns meta return value + */ + private Object[][] mockColumnsMetasReturnValue = null; + + /** + * the mock value of index meta return value + */ + private Object[][] mockIndexMetasReturnValue = null; + + /** + * the mock execute handler + */ + private MockExecuteHandler mockExecuteHandler = null; + + public MockDriver(Object[][] mockColumnsMetasReturnValue, Object[][] mockIndexMetasReturnValue) { + this(new Object[][]{}, mockColumnsMetasReturnValue, mockIndexMetasReturnValue); + } + + /** + * Instantiate a new MockDriver + */ + public MockDriver(Object[][] mockReturnValue, Object[][] mockColumnsMetasReturnValue, Object[][] mockIndexMetasReturnValue) { + this.mockReturnValue = mockReturnValue; + this.mockColumnsMetasReturnValue = mockColumnsMetasReturnValue; + this.mockIndexMetasReturnValue = mockIndexMetasReturnValue; + this.setMockExecuteHandler(new MockExecuteHandlerImpl(mockReturnValue)); + } + + /** + * Instantiate a new MockConnection + * @param driver + * @param url + * @param connectProperties + * @return + */ + @Override + public MockConnection createMockConnection(com.alibaba.druid.mock.MockDriver driver, String url, + Properties connectProperties) { + return new MockConnection(this, url, connectProperties); + } + + @Override + public ResultSet executeQuery(MockStatementBase stmt, String sql) throws SQLException { + return this.mockExecuteHandler.executeQuery(stmt, sql); + } + + /** + * mock the return value + * @return + */ + public Object[][] getMockReturnValue() { + return mockReturnValue; + } + + /** + * get the return value + * @param mockReturnValue + */ + public void setMockReturnValue(Object[][] mockReturnValue) { + this.mockReturnValue = mockReturnValue; + } + + /** + * mock the return value of columns meta + * @param mockColumnsMetasReturnValue + */ + public void setMockColumnsMetasReturnValue(Object[][] mockColumnsMetasReturnValue) { + this.mockColumnsMetasReturnValue = mockColumnsMetasReturnValue; + } + + /** + * get the return value of columns meta + * @return + */ + public Object[][] getMockColumnsMetasReturnValue() { + return mockColumnsMetasReturnValue; + } + + /** + * mock the return value of index meta + * @param mockIndexMetasReturnValue + */ + public void setMockIndexMetasReturnValue(Object[][] mockIndexMetasReturnValue) { + this.mockIndexMetasReturnValue = mockIndexMetasReturnValue; + } + + /** + * get the return value of index meta + * @return + */ + public Object[][] getMockIndexMetasReturnValue() { + return mockIndexMetasReturnValue; + } + + /** + * set the mock execute handler + * @param mockExecuteHandler + */ + public void setMockExecuteHandler(MockExecuteHandler mockExecuteHandler){ + this.mockExecuteHandler = mockExecuteHandler; + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockExecuteHandlerImpl.java b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockExecuteHandlerImpl.java new file mode 100644 index 00000000000..032118da154 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockExecuteHandlerImpl.java @@ -0,0 +1,53 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.mock; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; +import com.alibaba.druid.mock.MockStatementBase; +import com.alibaba.druid.mock.handler.MockExecuteHandler; +import io.seata.rm.datasource.sql.struct.ColumnMeta; + +/** + * @author will + * @date 2019/8/16 + */ +public class MockExecuteHandlerImpl implements MockExecuteHandler { + + /** + * the mock value of return value + */ + private Object[][] mockReturnValue = null; + + /** + * Instantiate MockExecuteHandlerImpl + * @param mockReturnValue + */ + public MockExecuteHandlerImpl(Object[][] mockReturnValue) { + this.mockReturnValue = mockReturnValue; + } + + @Override + public ResultSet executeQuery(MockStatementBase statement, String sql) throws SQLException { + MockResultSet resultSet = new MockResultSet(statement); + + //mock the return value + resultSet.mockResultSet(mockReturnValue); + + return resultSet; + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockResultSet.java b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockResultSet.java new file mode 100644 index 00000000000..65a606c60b0 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockResultSet.java @@ -0,0 +1,126 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.mock; + +import com.alibaba.druid.mock.MockStatementBase; +import com.alibaba.druid.util.jdbc.ResultSetBase; +import io.seata.rm.datasource.sql.struct.ColumnMeta; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; + +/** + * @author will + * @date 2019/8/14 + */ +public class MockResultSet extends ResultSetBase { + + private List columnLabels; + + private int rowIndex = -1; + + private List rows; + + private static final Logger LOGGER = LoggerFactory.getLogger(MockResultSet.class); + + public MockResultSet(Statement statement) { + this(statement, null); + } + + /** + * Instantiates a new Mock result set. + * + * @param statement the statement + * @param columnLabels the column labels + */ + public MockResultSet(Statement statement, List columnLabels) { + super(statement); + this.columnLabels = columnLabels; + this.rows = new ArrayList(); + super.metaData = new MockResultSetMetaData(); + } + + /** + * mock result set + * @param metas + * @return + */ + public MockResultSet mockResultSet(Object[][] metas){ + if(metas.length < 1){ + return this; + } + + for (Object[] columnMeta : metas) { + this.getRows().add(columnMeta); + } + + return this; + } + + public MockResultSetMetaData getMockMetaData() { + return (MockResultSetMetaData) metaData; + } + + @Override + public boolean next() throws SQLException { + if (closed) { + throw new SQLException(); + } + + if (rowIndex < rows.size() - 1) { + rowIndex++; + return true; + } + return false; + } + + @Override + public int findColumn(String columnLabel) throws SQLException { + return columnLabels.indexOf(columnLabel) + 1; + } + + public Object getObjectInternal(int columnIndex) { + Object[] row = rows.get(rowIndex); + Object obj = row[columnIndex - 1]; + return obj; + } + + @Override + public boolean previous() throws SQLException { + if (closed) { + throw new SQLException(); + } + + if (rowIndex >= 0) { + rowIndex--; + return true; + } + return false; + } + + @Override + public void updateObject(int columnIndex, Object x) throws SQLException { + Object[] row = rows.get(rowIndex); + row[columnIndex - 1] = x; + } + + public List getRows() { + return rows; + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockResultSetMetaData.java b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockResultSetMetaData.java new file mode 100644 index 00000000000..140f2f7e923 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/mock/MockResultSetMetaData.java @@ -0,0 +1,158 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.mock; +import io.seata.rm.datasource.sql.struct.ColumnMeta; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +/** + * @author will + * @date 2019/8/28 + */ +public class MockResultSetMetaData implements ResultSetMetaData { + + private final List columns = new ArrayList(); + + public List getColumns() { + return columns; + } + + @Override + public int getColumnCount() throws SQLException { + return columns.size(); + } + + @Override + public boolean isAutoIncrement(int column) throws SQLException { + return getColumn(column).isAutoincrement(); + } + + @Override + public boolean isCaseSensitive(int column) throws SQLException { + return false; + } + + @Override + public boolean isSearchable(int column) throws SQLException { + return false; + } + + @Override + public boolean isCurrency(int column) throws SQLException { + return false; + } + + @Override + public int isNullable(int column) throws SQLException { + return 0; + } + + @Override + public boolean isSigned(int column) throws SQLException { + return false; + } + + @Override + public int getColumnDisplaySize(int column) throws SQLException { + return 0; + } + + @Override + public String getColumnLabel(int column) throws SQLException { + return null; + } + + @Override + public String getColumnName(int column) throws SQLException { + return getColumn(column).getColumnName(); + } + + @Override + public String getSchemaName(int column) throws SQLException { + return null; + } + + @Override + public int getPrecision(int column) throws SQLException { + return 0; + } + + @Override + public int getScale(int column) throws SQLException { + return 0; + } + + @Override + public String getTableName(int column) throws SQLException { + return null; + } + + @Override + public String getCatalogName(int column) throws SQLException { + return null; + } + + @Override + public int getColumnType(int column) throws SQLException { + return 0; + } + + @Override + public String getColumnTypeName(int column) throws SQLException { + return null; + } + + @Override + public boolean isReadOnly(int column) throws SQLException { + return false; + } + + @Override + public boolean isWritable(int column) throws SQLException { + return false; + } + + @Override + public boolean isDefinitelyWritable(int column) throws SQLException { + return false; + } + + @Override + public String getColumnClassName(int column) throws SQLException { + return null; + } + + @Override + public T unwrap(Class iface) throws SQLException { + return null; + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + return false; + } + + /** + * get column + * @param column + * @return + */ + public ColumnMeta getColumn(int column){ + return columns.get(column - 1); + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/sql/struct/TableMetaTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/sql/struct/TableMetaTest.java index 97f1ca66b83..ad4fcd7624e 100644 --- a/rm-datasource/src/test/java/io/seata/rm/datasource/sql/struct/TableMetaTest.java +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/sql/struct/TableMetaTest.java @@ -17,27 +17,14 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.ResultSet; -import java.sql.RowIdLifetime; -import java.sql.SQLException; -import java.sql.Statement; import java.sql.Types; -import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; -import java.util.List; -import java.util.Properties; - -import com.alibaba.druid.mock.MockStatementBase; -import com.alibaba.druid.mock.handler.MockExecuteHandler; import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.util.jdbc.ResultSetMetaDataBase; import io.seata.rm.datasource.DataSourceProxy; - +import io.seata.rm.datasource.mock.MockDriver; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.function.Executable; import javax.sql.DataSource; @@ -71,23 +58,7 @@ public class TableMetaTest { @Test public void getTableMetaTest_0() { - MockDriver mockDriver = new MockDriver(); - mockDriver.setExecuteHandler(new MockExecuteHandler() { - @Override - public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLException { - - com.alibaba.druid.mock.MockResultSet resultSet = new com.alibaba.druid.mock.MockResultSet(statement); - - // just fetch meta from select * from `table` limit 1 - List columns = resultSet.getMockMetaData().getColumns(); - columns.add(new ResultSetMetaDataBase.ColumnMetaData()); - columns.add(new ResultSetMetaDataBase.ColumnMetaData()); - columns.add(new ResultSetMetaDataBase.ColumnMetaData()); - columns.add(new ResultSetMetaDataBase.ColumnMetaData()); - - return resultSet; - } - }); + MockDriver mockDriver = new MockDriver(columnMetas, indexMetas); DruidDataSource dataSource = new DruidDataSource(); dataSource.setUrl("jdbc:mock:xxx"); dataSource.setDriver(mockDriver); @@ -122,21 +93,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE @Test public void refreshTest_0() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { - MockDriver mockDriver = new MockDriver(); - mockDriver.setExecuteHandler(new MockExecuteHandler() { - @Override - public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLException { - - com.alibaba.druid.mock.MockResultSet resultSet = new com.alibaba.druid.mock.MockResultSet(statement); - - List columns = resultSet.getMockMetaData().getColumns(); - columns.add(new ResultSetMetaDataBase.ColumnMetaData()); - columns.add(new ResultSetMetaDataBase.ColumnMetaData()); - columns.add(new ResultSetMetaDataBase.ColumnMetaData()); - columns.add(new ResultSetMetaDataBase.ColumnMetaData()); - return resultSet; - } - }); + MockDriver mockDriver = new MockDriver(columnMetas, indexMetas); DruidDataSource druidDataSource = new DruidDataSource(); druidDataSource.setUrl("jdbc:mock:xxx"); @@ -157,6 +114,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"PRIMARY", "id", false, "", 3, 1, "A", 35}, new Object[] {"name1", "name1", false, "", 3, 1, "A", 35} }; + mockDriver.setMockIndexMetasReturnValue(indexMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertEquals(cacheTableMeta, realTableMeta); @@ -168,6 +126,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"name1", "name1", false, "", 3, 1, "A", 34}, new Object[] {"id_card", "id_card", false, "", 3, 1, "A", 34} }; + mockDriver.setMockIndexMetasReturnValue(indexMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -182,6 +141,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"name1", "name1", false, "", 3, 1, "A", 34}, new Object[] {"id_card", "id_card", false, "", 3, 1, "D", 34} }; + mockDriver.setMockIndexMetasReturnValue(indexMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -196,6 +156,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"name1", "name1", false, "", 3, 1, "A", 34}, new Object[] {"id_card", "id_card", false, "", 3, 2, "D", 34} }; + mockDriver.setMockIndexMetasReturnValue(indexMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -210,6 +171,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"name1", "name1", false, "", 3, 1, "A", 34}, new Object[] {"id_card", "id_card", false, "", 1, 1, "D", 34} }; + mockDriver.setMockIndexMetasReturnValue(indexMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -224,6 +186,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"name1", "name1", false, "", 3, 1, "A", 34}, new Object[] {"id_card", "id_card", false, "t", 1, 1, "D", 34} }; + mockDriver.setMockIndexMetasReturnValue(indexMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -238,6 +201,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"name1", "name1", false, "", 3, 1, "A", 34}, new Object[] {"id_card_number", "id_card_number", false, "t", 1, 1, "D", 34} }; + mockDriver.setMockIndexMetasReturnValue(indexMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -245,6 +209,25 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); Assertions.assertEquals(cacheTableMeta, realTableMeta); + //clear the index + indexMetas = new Object[][]{}; + mockDriver.setMockIndexMetasReturnValue(indexMetas); + Assertions.assertThrows(Exception.class, new Executable() { + @Override + public void execute() throws Throwable { + method.invoke(null, dataSourceProxy, "t1"); + } + }); + + //reset index meta + indexMetas = + new Object[][] { + new Object[] {"PRIMARY", "id", false, "", 3, 1, "A", 34}, + new Object[] {"name1", "name1", false, "", 3, 1, "A", 34}, + new Object[] {"id_card_number", "id_card_number", false, "t", 1, 1, "D", 34} + }; + mockDriver.setMockIndexMetasReturnValue(indexMetas); + //add a new column columnMetas = new Object[][] { @@ -254,6 +237,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 4, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.DECIMAL, "DECIMAL", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -270,6 +254,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 4, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.DECIMAL, "DECIMAL", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -286,6 +271,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 4, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.DECIMAL, "DECIMAL", 64, 0, 10, 1, "", "", 0, 0, 64, 5, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -302,6 +288,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.DECIMAL, "DECIMAL", 64, 0, 10, 1, "", "", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -318,6 +305,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.DECIMAL, "DECIMAL", 20, 0, 10, 1, "", "", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -338,6 +326,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.DECIMAL, "DECIMAL", 20, 0, 10, 1, "", "001", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -354,6 +343,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.DECIMAL, "DECIMAL", 20, 0, 10, 1, "ID Card", "001", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -370,6 +360,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.DECIMAL, "DECIMAL", 20, 0, 2, 1, "ID Card", "001", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -386,6 +377,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"", "", "t1", "id_card", Types.VARCHAR, "VARCHAR", 20, 0, 2, 1, "ID Card", "001", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -402,6 +394,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"", "", "t1", "id_card_number", Types.VARCHAR, "VARCHAR", 20, 0, 2, 1, "ID Card", "001", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -418,6 +411,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"", "user", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"", "user", "t1", "id_card_number", Types.VARCHAR, "VARCHAR", 20, 0, 2, 1, "ID Card", "001", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -434,6 +428,7 @@ public ResultSet executeQuery(MockStatementBase statement, String s) throws SQLE new Object[] {"t", "user", "t1", "name3", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 5, "YES", "NO"}, new Object[] {"t", "user", "t1", "id_card_number", Types.VARCHAR, "VARCHAR", 20, 0, 2, 1, "ID Card", "001", 0, 0, 64, 4, "NO", "YES"} }; + mockDriver.setMockColumnsMetasReturnValue(columnMetas); cacheTableMeta = TableMetaCache.getTableMeta(dataSourceProxy, "t1"); realTableMeta = (TableMeta) method.invoke(null, dataSourceProxy, "t1"); Assertions.assertNotEquals(cacheTableMeta, realTableMeta); @@ -469,1011 +464,4 @@ private void assertIndexMetaEquals(Object[] expected, IndexMeta actual) { Assertions.assertEquals(expected[6], actual.getAscOrDesc()); Assertions.assertEquals(expected[7], actual.getCardinality()); } - - private class MockDriver extends com.alibaba.druid.mock.MockDriver { - - @Override - public MockConnection createMockConnection(com.alibaba.druid.mock.MockDriver driver, String url, - Properties connectProperties) { - return new MockConnection(this, url, connectProperties); - } - } - - private class MockResultSet extends com.alibaba.druid.mock.MockResultSet { - - private List columnLabels; - - /** - * Instantiates a new Mock result set. - * - * @param statement the statement - * @param columnLabels the column labels - */ - public MockResultSet(Statement statement, List columnLabels) { - super(statement); - this.columnLabels = new ArrayList<>(columnLabels); - } - - @Override - public int findColumn(String columnLabel) throws SQLException { - return columnLabels.indexOf(columnLabel) + 1; - } - } - - private class MockConnection extends com.alibaba.druid.mock.MockConnection { - - /** - * Instantiates a new Mock connection. - * - * @param driver the driver - * @param url the url - * @param connectProperties the connect properties - */ - public MockConnection(com.alibaba.druid.mock.MockDriver driver, String url, Properties connectProperties) { - super(driver, url, connectProperties); - } - - @Override - public DatabaseMetaData getMetaData() throws SQLException { - - return new DatabaseMetaData() { - - @Override - public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, - String columnNamePattern) throws SQLException { - List columnLabels = Arrays.asList( - "TABLE_CAT", - "TABLE_SCHEM", - "TABLE_NAME", - "COLUMN_NAME", - "DATA_TYPE", - "TYPE_NAME", - "COLUMN_SIZE", - "DECIMAL_DIGITS", - "NUM_PREC_RADIX", - "NULLABLE", - "REMARKS", - "COLUMN_DEF", - "SQL_DATA_TYPE", - "SQL_DATETIME_SUB", - "CHAR_OCTET_LENGTH", - "ORDINAL_POSITION", - "IS_NULLABLE", - "IS_AUTOINCREMENT" - ); - - MockResultSet resultSet = new MockResultSet(createStatement(), columnLabels); - - List columns = resultSet.getMockMetaData().getColumns(); - for (String columnLabel : columnLabels) { - ResultSetMetaDataBase.ColumnMetaData column = new ResultSetMetaDataBase.ColumnMetaData(); - column.setColumnName(columnLabel); - columns.add(column); - } - - for (Object[] columnMeta : columnMetas) { - resultSet.getRows().add(columnMeta); - } - - return resultSet; - } - - @Override - public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, - boolean approximate) throws SQLException { - - List columnLabels = Arrays.asList( - "INDEX_NAME", - "COLUMN_NAME", - "NON_UNIQUE", - "INDEX_QUALIFIER", - "TYPE", - "ORDINAL_POSITION", - "ASC_OR_DESC", - "CARDINALITY" - ); - - MockResultSet resultSet = new MockResultSet(createStatement(), columnLabels); - - List columns = resultSet.getMockMetaData().getColumns(); - for (String columnLabel : columnLabels) { - ResultSetMetaDataBase.ColumnMetaData column = new ResultSetMetaDataBase.ColumnMetaData(); - column.setColumnName(columnLabel); - columns.add(column); - } - - for (Object[] indexMeta : indexMetas) { - resultSet.getRows().add(indexMeta); - } - - return resultSet; - } - - @Override - public boolean allProceduresAreCallable() throws SQLException { - return false; - } - - @Override - public boolean allTablesAreSelectable() throws SQLException { - return false; - } - - @Override - public String getURL() throws SQLException { - return getUrl(); - } - - @Override - public String getUserName() throws SQLException { - return null; - } - - @Override - public boolean isReadOnly() throws SQLException { - return false; - } - - @Override - public boolean nullsAreSortedHigh() throws SQLException { - return false; - } - - @Override - public boolean nullsAreSortedLow() throws SQLException { - return false; - } - - @Override - public boolean nullsAreSortedAtStart() throws SQLException { - return false; - } - - @Override - public boolean nullsAreSortedAtEnd() throws SQLException { - return false; - } - - @Override - public String getDatabaseProductName() throws SQLException { - return null; - } - - @Override - public String getDatabaseProductVersion() throws SQLException { - return null; - } - - @Override - public String getDriverName() throws SQLException { - return null; - } - - @Override - public String getDriverVersion() throws SQLException { - return null; - } - - @Override - public int getDriverMajorVersion() { - return 0; - } - - @Override - public int getDriverMinorVersion() { - return 0; - } - - @Override - public boolean usesLocalFiles() throws SQLException { - return false; - } - - @Override - public boolean usesLocalFilePerTable() throws SQLException { - return false; - } - - @Override - public boolean supportsMixedCaseIdentifiers() throws SQLException { - return false; - } - - @Override - public boolean storesUpperCaseIdentifiers() throws SQLException { - return false; - } - - @Override - public boolean storesLowerCaseIdentifiers() throws SQLException { - return false; - } - - @Override - public boolean storesMixedCaseIdentifiers() throws SQLException { - return false; - } - - @Override - public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException { - return false; - } - - @Override - public boolean storesUpperCaseQuotedIdentifiers() throws SQLException { - return false; - } - - @Override - public boolean storesLowerCaseQuotedIdentifiers() throws SQLException { - return false; - } - - @Override - public boolean storesMixedCaseQuotedIdentifiers() throws SQLException { - return false; - } - - @Override - public String getIdentifierQuoteString() throws SQLException { - return null; - } - - @Override - public String getSQLKeywords() throws SQLException { - return null; - } - - @Override - public String getNumericFunctions() throws SQLException { - return null; - } - - @Override - public String getStringFunctions() throws SQLException { - return null; - } - - @Override - public String getSystemFunctions() throws SQLException { - return null; - } - - @Override - public String getTimeDateFunctions() throws SQLException { - return null; - } - - @Override - public String getSearchStringEscape() throws SQLException { - return null; - } - - @Override - public String getExtraNameCharacters() throws SQLException { - return null; - } - - @Override - public boolean supportsAlterTableWithAddColumn() throws SQLException { - return false; - } - - @Override - public boolean supportsAlterTableWithDropColumn() throws SQLException { - return false; - } - - @Override - public boolean supportsColumnAliasing() throws SQLException { - return false; - } - - @Override - public boolean nullPlusNonNullIsNull() throws SQLException { - return false; - } - - @Override - public boolean supportsConvert() throws SQLException { - return false; - } - - @Override - public boolean supportsConvert(int fromType, int toType) throws SQLException { - return false; - } - - @Override - public boolean supportsTableCorrelationNames() throws SQLException { - return false; - } - - @Override - public boolean supportsDifferentTableCorrelationNames() throws SQLException { - return false; - } - - @Override - public boolean supportsExpressionsInOrderBy() throws SQLException { - return false; - } - - @Override - public boolean supportsOrderByUnrelated() throws SQLException { - return false; - } - - @Override - public boolean supportsGroupBy() throws SQLException { - return false; - } - - @Override - public boolean supportsGroupByUnrelated() throws SQLException { - return false; - } - - @Override - public boolean supportsGroupByBeyondSelect() throws SQLException { - return false; - } - - @Override - public boolean supportsLikeEscapeClause() throws SQLException { - return false; - } - - @Override - public boolean supportsMultipleResultSets() throws SQLException { - return false; - } - - @Override - public boolean supportsMultipleTransactions() throws SQLException { - return false; - } - - @Override - public boolean supportsNonNullableColumns() throws SQLException { - return false; - } - - @Override - public boolean supportsMinimumSQLGrammar() throws SQLException { - return false; - } - - @Override - public boolean supportsCoreSQLGrammar() throws SQLException { - return false; - } - - @Override - public boolean supportsExtendedSQLGrammar() throws SQLException { - return false; - } - - @Override - public boolean supportsANSI92EntryLevelSQL() throws SQLException { - return false; - } - - @Override - public boolean supportsANSI92IntermediateSQL() throws SQLException { - return false; - } - - @Override - public boolean supportsANSI92FullSQL() throws SQLException { - return false; - } - - @Override - public boolean supportsIntegrityEnhancementFacility() throws SQLException { - return false; - } - - @Override - public boolean supportsOuterJoins() throws SQLException { - return false; - } - - @Override - public boolean supportsFullOuterJoins() throws SQLException { - return false; - } - - @Override - public boolean supportsLimitedOuterJoins() throws SQLException { - return false; - } - - @Override - public String getSchemaTerm() throws SQLException { - return null; - } - - @Override - public String getProcedureTerm() throws SQLException { - return null; - } - - @Override - public String getCatalogTerm() throws SQLException { - return null; - } - - @Override - public boolean isCatalogAtStart() throws SQLException { - return false; - } - - @Override - public String getCatalogSeparator() throws SQLException { - return null; - } - - @Override - public boolean supportsSchemasInDataManipulation() throws SQLException { - return false; - } - - @Override - public boolean supportsSchemasInProcedureCalls() throws SQLException { - return false; - } - - @Override - public boolean supportsSchemasInTableDefinitions() throws SQLException { - return false; - } - - @Override - public boolean supportsSchemasInIndexDefinitions() throws SQLException { - return false; - } - - @Override - public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException { - return false; - } - - @Override - public boolean supportsCatalogsInDataManipulation() throws SQLException { - return false; - } - - @Override - public boolean supportsCatalogsInProcedureCalls() throws SQLException { - return false; - } - - @Override - public boolean supportsCatalogsInTableDefinitions() throws SQLException { - return false; - } - - @Override - public boolean supportsCatalogsInIndexDefinitions() throws SQLException { - return false; - } - - @Override - public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException { - return false; - } - - @Override - public boolean supportsPositionedDelete() throws SQLException { - return false; - } - - @Override - public boolean supportsPositionedUpdate() throws SQLException { - return false; - } - - @Override - public boolean supportsSelectForUpdate() throws SQLException { - return false; - } - - @Override - public boolean supportsStoredProcedures() throws SQLException { - return false; - } - - @Override - public boolean supportsSubqueriesInComparisons() throws SQLException { - return false; - } - - @Override - public boolean supportsSubqueriesInExists() throws SQLException { - return false; - } - - @Override - public boolean supportsSubqueriesInIns() throws SQLException { - return false; - } - - @Override - public boolean supportsSubqueriesInQuantifieds() throws SQLException { - return false; - } - - @Override - public boolean supportsCorrelatedSubqueries() throws SQLException { - return false; - } - - @Override - public boolean supportsUnion() throws SQLException { - return false; - } - - @Override - public boolean supportsUnionAll() throws SQLException { - return false; - } - - @Override - public boolean supportsOpenCursorsAcrossCommit() throws SQLException { - return false; - } - - @Override - public boolean supportsOpenCursorsAcrossRollback() throws SQLException { - return false; - } - - @Override - public boolean supportsOpenStatementsAcrossCommit() throws SQLException { - return false; - } - - @Override - public boolean supportsOpenStatementsAcrossRollback() throws SQLException { - return false; - } - - @Override - public int getMaxBinaryLiteralLength() throws SQLException { - return 0; - } - - @Override - public int getMaxCharLiteralLength() throws SQLException { - return 0; - } - - @Override - public int getMaxColumnNameLength() throws SQLException { - return 0; - } - - @Override - public int getMaxColumnsInGroupBy() throws SQLException { - return 0; - } - - @Override - public int getMaxColumnsInIndex() throws SQLException { - return 0; - } - - @Override - public int getMaxColumnsInOrderBy() throws SQLException { - return 0; - } - - @Override - public int getMaxColumnsInSelect() throws SQLException { - return 0; - } - - @Override - public int getMaxColumnsInTable() throws SQLException { - return 0; - } - - @Override - public int getMaxConnections() throws SQLException { - return 0; - } - - @Override - public int getMaxCursorNameLength() throws SQLException { - return 0; - } - - @Override - public int getMaxIndexLength() throws SQLException { - return 0; - } - - @Override - public int getMaxSchemaNameLength() throws SQLException { - return 0; - } - - @Override - public int getMaxProcedureNameLength() throws SQLException { - return 0; - } - - @Override - public int getMaxCatalogNameLength() throws SQLException { - return 0; - } - - @Override - public int getMaxRowSize() throws SQLException { - return 0; - } - - @Override - public boolean doesMaxRowSizeIncludeBlobs() throws SQLException { - return false; - } - - @Override - public int getMaxStatementLength() throws SQLException { - return 0; - } - - @Override - public int getMaxStatements() throws SQLException { - return 0; - } - - @Override - public int getMaxTableNameLength() throws SQLException { - return 0; - } - - @Override - public int getMaxTablesInSelect() throws SQLException { - return 0; - } - - @Override - public int getMaxUserNameLength() throws SQLException { - return 0; - } - - @Override - public int getDefaultTransactionIsolation() throws SQLException { - return 0; - } - - @Override - public boolean supportsTransactions() throws SQLException { - return false; - } - - @Override - public boolean supportsTransactionIsolationLevel(int level) throws SQLException { - return false; - } - - @Override - public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException { - return false; - } - - @Override - public boolean supportsDataManipulationTransactionsOnly() throws SQLException { - return false; - } - - @Override - public boolean dataDefinitionCausesTransactionCommit() throws SQLException { - return false; - } - - @Override - public boolean dataDefinitionIgnoredInTransactions() throws SQLException { - return false; - } - - @Override - public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) - throws SQLException { - return null; - } - - @Override - public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, - String columnNamePattern) throws SQLException { - return null; - } - - @Override - public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, - String[] types) throws SQLException { - return null; - } - - @Override - public ResultSet getSchemas() throws SQLException { - return null; - } - - @Override - public ResultSet getCatalogs() throws SQLException { - return null; - } - - @Override - public ResultSet getTableTypes() throws SQLException { - return null; - } - - @Override - public ResultSet getColumnPrivileges(String catalog, String schema, String table, - String columnNamePattern) throws SQLException { - return null; - } - - @Override - public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) - throws SQLException { - return null; - } - - @Override - public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, - boolean nullable) throws SQLException { - return null; - } - - @Override - public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException { - return null; - } - - @Override - public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { - return null; - } - - @Override - public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException { - return null; - } - - @Override - public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { - return null; - } - - @Override - public ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, - String foreignCatalog, String foreignSchema, String foreignTable) - throws SQLException { - return null; - } - - @Override - public ResultSet getTypeInfo() throws SQLException { - return null; - } - - @Override - public boolean supportsResultSetType(int type) throws SQLException { - return false; - } - - @Override - public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException { - return false; - } - - @Override - public boolean ownUpdatesAreVisible(int type) throws SQLException { - return false; - } - - @Override - public boolean ownDeletesAreVisible(int type) throws SQLException { - return false; - } - - @Override - public boolean ownInsertsAreVisible(int type) throws SQLException { - return false; - } - - @Override - public boolean othersUpdatesAreVisible(int type) throws SQLException { - return false; - } - - @Override - public boolean othersDeletesAreVisible(int type) throws SQLException { - return false; - } - - @Override - public boolean othersInsertsAreVisible(int type) throws SQLException { - return false; - } - - @Override - public boolean updatesAreDetected(int type) throws SQLException { - return false; - } - - @Override - public boolean deletesAreDetected(int type) throws SQLException { - return false; - } - - @Override - public boolean insertsAreDetected(int type) throws SQLException { - return false; - } - - @Override - public boolean supportsBatchUpdates() throws SQLException { - return false; - } - - @Override - public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) - throws SQLException { - return null; - } - - @Override - public Connection getConnection() throws SQLException { - return null; - } - - @Override - public boolean supportsSavepoints() throws SQLException { - return false; - } - - @Override - public boolean supportsNamedParameters() throws SQLException { - return false; - } - - @Override - public boolean supportsMultipleOpenResults() throws SQLException { - return false; - } - - @Override - public boolean supportsGetGeneratedKeys() throws SQLException { - return false; - } - - @Override - public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) - throws SQLException { - return null; - } - - @Override - public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) - throws SQLException { - return null; - } - - @Override - public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, - String attributeNamePattern) throws SQLException { - return null; - } - - @Override - public boolean supportsResultSetHoldability(int holdability) throws SQLException { - return false; - } - - @Override - public int getResultSetHoldability() throws SQLException { - return 0; - } - - @Override - public int getDatabaseMajorVersion() throws SQLException { - return 0; - } - - @Override - public int getDatabaseMinorVersion() throws SQLException { - return 0; - } - - @Override - public int getJDBCMajorVersion() throws SQLException { - return 0; - } - - @Override - public int getJDBCMinorVersion() throws SQLException { - return 0; - } - - @Override - public int getSQLStateType() throws SQLException { - return 0; - } - - @Override - public boolean locatorsUpdateCopy() throws SQLException { - return false; - } - - @Override - public boolean supportsStatementPooling() throws SQLException { - return false; - } - - @Override - public RowIdLifetime getRowIdLifetime() throws SQLException { - return null; - } - - @Override - public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { - return null; - } - - @Override - public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException { - return false; - } - - @Override - public boolean autoCommitFailureClosesAllResultSets() throws SQLException { - return false; - } - - @Override - public ResultSet getClientInfoProperties() throws SQLException { - return null; - } - - @Override - public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) - throws SQLException { - return null; - } - - @Override - public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, - String columnNamePattern) throws SQLException { - return null; - } - - @Override - public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, - String columnNamePattern) throws SQLException { - return null; - } - - @Override - public boolean generatedKeyAlwaysReturned() throws SQLException { - return false; - } - - @Override - public T unwrap(Class iface) throws SQLException { - return null; - } - - @Override - public boolean isWrapperFor(Class iface) throws SQLException { - return false; - } - }; - } - } } diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/sql/struct/TableRecordsTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/sql/struct/TableRecordsTest.java new file mode 100644 index 00000000000..53e56bb28a4 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/sql/struct/TableRecordsTest.java @@ -0,0 +1,70 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.sql.struct; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; + +import com.alibaba.druid.mock.MockStatement; +import com.alibaba.druid.mock.MockStatementBase; +import com.alibaba.druid.pool.DruidDataSource; + +import io.seata.rm.datasource.DataSourceProxy; +import io.seata.rm.datasource.mock.MockDriver; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +/** + * the table records test + * @author will + */ +public class TableRecordsTest { + + private static Object[][] columnMetas = + new Object[][] { + new Object[] {"", "", "table_records_test", "id", Types.INTEGER, "INTEGER", 64, 0, 10, 1, "", "", 0, 0, 64, 1, "NO", "YES"}, + new Object[] {"", "", "table_records_test", "name", Types.VARCHAR, "VARCHAR", 64, 0, 10, 0, "", "", 0, 0, 64, 2, "YES", "NO"}, + }; + + private static Object[][] indexMetas = + new Object[][] { + new Object[] {"PRIMARY", "id", false, "", 3, 1, "A", 34}, + }; + + @BeforeEach + public void initBeforeEach() { + } + + @Test + public void testBuildRecords() throws SQLException { + MockDriver mockDriver = new MockDriver(columnMetas, indexMetas); + DruidDataSource dataSource = new DruidDataSource(); + dataSource.setUrl("jdbc:mock:xxx"); + dataSource.setDriver(mockDriver); + MockStatementBase mockStatement = new MockStatement(dataSource.getConnection().getConnection()); + DataSourceProxy proxy = new DataSourceProxy(dataSource); + + TableMeta tableMeta = TableMetaCache.getTableMeta(proxy, "table_records_test"); + + ResultSet resultSet = mockDriver.executeQuery(mockStatement, "select * from table_records_test"); + + TableRecords tableRecords = TableRecords.buildRecords(tableMeta, resultSet); + + Assertions.assertNotNull(tableRecords); + } +} diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/undo/UndoLogManagerTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/undo/UndoLogManagerTest.java index e8fe5504dc9..12f5029b4e4 100644 --- a/rm-datasource/src/test/java/io/seata/rm/datasource/undo/UndoLogManagerTest.java +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/undo/UndoLogManagerTest.java @@ -15,6 +15,7 @@ */ package io.seata.rm.datasource.undo; +import com.alibaba.druid.util.JdbcConstants; import org.junit.jupiter.api.Test; import java.sql.Connection; @@ -58,7 +59,7 @@ public void testBatchDeleteUndoLog() throws Exception { Connection connection = mock(Connection.class); PreparedStatement preparedStatement = mock(PreparedStatement.class); when(connection.prepareStatement(anyString())).thenReturn(preparedStatement); - UndoLogManager.batchDeleteUndoLog(xids, branchIds, connection); + UndoLogManagerFactory.getUndoLogManager(JdbcConstants.MYSQL).batchDeleteUndoLog(xids, branchIds, connection); //verify for (int i = 1;i <= APPEND_IN_SIZE;i++){ @@ -76,7 +77,7 @@ public void testToBatchDeleteUndoLogSql() { THE_APPEND_IN_SIZE_PARAM_STRING + " AND xid IN " + THE_DOUBLE_APPEND_IN_SIZE_PARAM_STRING; - String batchDeleteUndoLogSql = UndoLogManager.toBatchDeleteUndoLogSql(APPEND_IN_SIZE * 2, APPEND_IN_SIZE); + String batchDeleteUndoLogSql = AbstractUndoLogManager.toBatchDeleteUndoLogSql(APPEND_IN_SIZE * 2, APPEND_IN_SIZE); System.out.println(batchDeleteUndoLogSql); assertThat(batchDeleteUndoLogSql).isEqualTo(expectedSqlString); } @@ -84,7 +85,7 @@ public void testToBatchDeleteUndoLogSql() { @Test public void testAppendInParam() { StringBuilder sqlBuilder = new StringBuilder(); - UndoLogManager.appendInParam(APPEND_IN_SIZE, sqlBuilder); + AbstractUndoLogManager.appendInParam(APPEND_IN_SIZE, sqlBuilder); assertThat(sqlBuilder.toString()).isEqualTo(THE_APPEND_IN_SIZE_PARAM_STRING); } diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/undo/parser/JacksonUndoLogParserTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/undo/parser/JacksonUndoLogParserTest.java index 2ce6ff5debd..62429eae496 100644 --- a/rm-datasource/src/test/java/io/seata/rm/datasource/undo/parser/JacksonUndoLogParserTest.java +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/undo/parser/JacksonUndoLogParserTest.java @@ -18,7 +18,12 @@ import java.io.IOException; import java.math.BigDecimal; import java.sql.JDBCType; +import java.sql.SQLException; import java.sql.Timestamp; + +import javax.sql.rowset.serial.SerialBlob; +import javax.sql.rowset.serial.SerialClob; + import com.fasterxml.jackson.databind.ObjectMapper; import io.seata.rm.datasource.DataCompareUtils; import io.seata.rm.datasource.sql.struct.Field; @@ -35,7 +40,7 @@ public class JacksonUndoLogParserTest extends BaseUndoLogParserTest { JacksonUndoLogParser parser = new JacksonUndoLogParser(); @Test - public void encode() throws NoSuchFieldException, IllegalAccessException, IOException { + public void encode() throws NoSuchFieldException, IllegalAccessException, IOException, SQLException { //get the jackson mapper java.lang.reflect.Field reflectField = parser.getClass().getDeclaredField("MAPPER"); reflectField.setAccessible(true); @@ -65,6 +70,17 @@ public void encode() throws NoSuchFieldException, IllegalAccessException, IOExce sameField = mapper.readValue(bytes, Field.class); Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult()); + //blob type + field = new Field("blob_type", JDBCType.BLOB.getVendorTypeNumber(), new SerialBlob("hello".getBytes())); + bytes = mapper.writeValueAsBytes(field); + sameField = mapper.readValue(bytes, Field.class); + Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult()); + + //clob type + field = new Field("clob_type", JDBCType.CLOB.getVendorTypeNumber(), new SerialClob("hello".toCharArray())); + bytes = mapper.writeValueAsBytes(field); + sameField = mapper.readValue(bytes, Field.class); + Assertions.assertTrue(DataCompareUtils.isFieldEquals(field, sameField).getResult()); } @Override diff --git a/rm-datasource/src/test/java/io/seata/rm/datasource/undo/parser/KryoUndoLogParserTest.java b/rm-datasource/src/test/java/io/seata/rm/datasource/undo/parser/KryoUndoLogParserTest.java new file mode 100644 index 00000000000..a7e0e53c121 --- /dev/null +++ b/rm-datasource/src/test/java/io/seata/rm/datasource/undo/parser/KryoUndoLogParserTest.java @@ -0,0 +1,33 @@ +/* + * 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 + * + * 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 io.seata.rm.datasource.undo.parser; + +import io.seata.rm.datasource.undo.BaseUndoLogParserTest; +import io.seata.rm.datasource.undo.UndoLogParser; + +/** + * @author jsbxyyx + */ +public class KryoUndoLogParserTest extends BaseUndoLogParserTest { + + KryoUndoLogParser parser = new KryoUndoLogParser(); + + @Override + public UndoLogParser getParser() { + return parser; + } + +} diff --git a/rm/src/main/java/io/seata/rm/AbstractResourceManager.java b/rm/src/main/java/io/seata/rm/AbstractResourceManager.java index 6ff5f048ad7..644c4bbfa8d 100644 --- a/rm/src/main/java/io/seata/rm/AbstractResourceManager.java +++ b/rm/src/main/java/io/seata/rm/AbstractResourceManager.java @@ -18,6 +18,7 @@ import java.util.concurrent.TimeoutException; import io.seata.common.exception.NotSupportYetException; +import io.seata.core.exception.RmTransactionException; import io.seata.core.exception.TransactionException; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.BranchStatus; @@ -65,13 +66,13 @@ public Long branchRegister(BranchType branchType, String resourceId, String clie BranchRegisterResponse response = (BranchRegisterResponse) RmRpcClient.getInstance().sendMsgWithResponse(request); if (response.getResultCode() == ResultCode.Failed) { - throw new TransactionException(response.getTransactionExceptionCode(), "Response[" + response.getMsg() + "]"); + throw new RmTransactionException(response.getTransactionExceptionCode(), String.format("Response[ %s ]", response.getMsg())); } return response.getBranchId(); } catch (TimeoutException toe) { - throw new TransactionException(TransactionExceptionCode.IO, "RPC Timeout", toe); + throw new RmTransactionException(TransactionExceptionCode.IO, "RPC Timeout", toe); } catch (RuntimeException rex) { - throw new TransactionException(TransactionExceptionCode.BranchRegisterFailed, "Runtime", rex); + throw new RmTransactionException(TransactionExceptionCode.BranchRegisterFailed, "Runtime", rex); } } @@ -95,12 +96,12 @@ public void branchReport(BranchType branchType, String xid, long branchId, Branc BranchReportResponse response = (BranchReportResponse) RmRpcClient.getInstance().sendMsgWithResponse(request); if (response.getResultCode() == ResultCode.Failed) { - throw new TransactionException(response.getTransactionExceptionCode(), "Response[" + response.getMsg() + "]"); + throw new RmTransactionException(response.getTransactionExceptionCode(), String.format("Response[ %s ]", response.getMsg())); } } catch (TimeoutException toe) { - throw new TransactionException(TransactionExceptionCode.IO, "RPC Timeout", toe); + throw new RmTransactionException(TransactionExceptionCode.IO, "RPC Timeout", toe); } catch (RuntimeException rex) { - throw new TransactionException(TransactionExceptionCode.BranchReportFailed, "Runtime", rex); + throw new RmTransactionException(TransactionExceptionCode.BranchReportFailed, "Runtime", rex); } } diff --git a/server/src/main/java/io/seata/server/ParameterParser.java b/server/src/main/java/io/seata/server/ParameterParser.java index 033480718dc..15eb2b841f0 100644 --- a/server/src/main/java/io/seata/server/ParameterParser.java +++ b/server/src/main/java/io/seata/server/ParameterParser.java @@ -23,7 +23,7 @@ import io.seata.core.constants.ConfigurationKeys; /** - * The type parameter parser + * The type Parameter parser. * * @author xingfudeshi@gmail.com * @date 2019/05/30 @@ -31,15 +31,17 @@ public class ParameterParser { private static final String PROGRAM_NAME = "sh seata-server.sh(for linux and mac) or cmd seata-server.bat(for windows)"; private static final int SERVER_DEFAULT_PORT = 8091; - private static final String SERVER_DEFAULT_BIND_IP = "0.0.0.0"; private static final String SERVER_DEFAULT_STORE_MODE = "file"; private static final int SERVER_DEFAULT_NODE = 1; + /** + * The constant CONFIG. + */ protected static final Configuration CONFIG = ConfigurationFactory.getInstance(); @Parameter(names = "--help", help = true) private boolean help; - @Parameter(names = {"--host", "-h"}, description = "The host to bind.", order = 1) - private String host = SERVER_DEFAULT_BIND_IP; + @Parameter(names = {"--host", "-h"}, description = "The ip to register to registry center.", order = 1) + private String host; @Parameter(names = {"--port", "-p"}, description = "The port to listen.", order = 2) private int port = SERVER_DEFAULT_PORT; @Parameter(names = {"--storeMode", "-m"}, description = "log store mode : file、db", order = 3) @@ -47,15 +49,15 @@ public class ParameterParser { @Parameter(names = {"--serverNode", "-n"}, description = "server node id, such as 1, 2, 3. default is 1", order = 4) private int serverNode = SERVER_DEFAULT_NODE; + /** + * Instantiates a new Parameter parser. + * + * @param args the args + */ public ParameterParser(String[] args) { this.init(args); } - /** - * initialize the parameter parser - * - * @param args - */ private void init(String[] args) { try { JCommander jCommander = JCommander.newBuilder().addObject(this).build(); @@ -71,11 +73,6 @@ private void init(String[] args) { } - /** - * print the error - * - * @param e - */ private void printError(ParameterException e) { System.err.println("Option error " + e.getMessage()); e.getJCommander().setProgramName(PROGRAM_NAME); @@ -84,44 +81,45 @@ private void printError(ParameterException e) { } /** - * Gets host + * Gets host. * - * @return host + * @return the host */ public String getHost() { return host; } /** - * Gets port + * Gets port. * - * @return port + * @return the port */ public int getPort() { return port; } /** - * Gets store mode + * Gets store mode. * - * @return storeMode + * @return the store mode */ public String getStoreMode() { return storeMode; } /** - * is help + * Is help boolean. * - * @return help + * @return the boolean */ public boolean isHelp() { return help; } /** - * Gets server node - * @return server node + * Gets server node. + * + * @return the server node */ public int getServerNode() { return serverNode; diff --git a/server/src/main/java/io/seata/server/Server.java b/server/src/main/java/io/seata/server/Server.java index cdb5bc72b46..3496c99a354 100644 --- a/server/src/main/java/io/seata/server/Server.java +++ b/server/src/main/java/io/seata/server/Server.java @@ -62,8 +62,6 @@ public static void main(String[] args) throws IOException { System.setProperty(ConfigurationKeys.STORE_MODE, parameterParser.getStoreMode()); RpcServer rpcServer = new RpcServer(WORKING_THREADS); - //server host - rpcServer.setHost(parameterParser.getHost()); //server port rpcServer.setListenPort(parameterParser.getPort()); UUIDGenerator.init(parameterParser.getServerNode()); diff --git a/server/src/main/java/io/seata/server/coordinator/DefaultCoordinator.java b/server/src/main/java/io/seata/server/coordinator/DefaultCoordinator.java index ba8badb0b63..e078736f84c 100644 --- a/server/src/main/java/io/seata/server/coordinator/DefaultCoordinator.java +++ b/server/src/main/java/io/seata/server/coordinator/DefaultCoordinator.java @@ -31,6 +31,7 @@ import io.seata.core.constants.ConfigurationKeys; import io.seata.core.event.EventBus; import io.seata.core.event.GlobalTransactionEvent; +import io.seata.core.exception.BranchTransactionException; import io.seata.core.exception.TransactionException; import io.seata.core.model.BranchStatus; import io.seata.core.model.BranchType; @@ -113,6 +114,11 @@ public class DefaultCoordinator extends AbstractTCInboundHandler */ protected static final long UNDOLOG_DELETE_PERIOD = CONFIG.getLong(ConfigurationKeys.TRANSACTION_UNDO_LOG_DELETE_PERIOD, 24 * 60 * 60 * 1000); + /** + * The Transaction undolog delay delete period + */ + protected static final long UNDOLOG_DELAY_DELETE_PERIOD = 3 * 60 * 1000; + private static final int ALWAYS_RETRY_BOUNDARY = 0; private static final Duration MAX_COMMIT_RETRY_TIMEOUT = ConfigurationFactory.getInstance().getDuration( @@ -226,7 +232,7 @@ public BranchStatus branchCommit(BranchType branchType, String xid, long branchI branchSession.getClientId(), request); return response.getBranchStatus(); } catch (IOException | TimeoutException e) { - throw new TransactionException(FailedToSendBranchCommitRequest, branchId + "/" + xid, e); + throw new BranchTransactionException(FailedToSendBranchCommitRequest, String.format("Send branch commit failed, xid = %s branchId = %s", xid, branchId), e); } } @@ -253,7 +259,7 @@ public BranchStatus branchRollback(BranchType branchType, String xid, long branc branchSession.getClientId(), request); return response.getBranchStatus(); } catch (IOException | TimeoutException e) { - throw new TransactionException(FailedToSendBranchRollbackRequest, branchId + "/" + xid, e); + throw new BranchTransactionException(FailedToSendBranchRollbackRequest, String.format("Send branch rollback failed, xid = %s branchId = %s", xid, branchId), e); } } @@ -385,6 +391,10 @@ protected void handleAsyncCommitting() { } for (GlobalSession asyncCommittingSession : asyncCommittingSessions) { try { + // Instruction reordering in DefaultCore#asyncCommit may cause this situation + if (GlobalStatus.AsyncCommitting != asyncCommittingSession.getStatus()) { + continue; + } asyncCommittingSession.addSessionLifecycleListener(SessionHolder.getRootSessionManager()); core.doGlobalCommit(asyncCommittingSession, true); } catch (TransactionException ex) { @@ -459,7 +469,7 @@ public void init() { } catch (Exception e) { LOGGER.info("Exception undoLog deleting ... ", e); } - },0, UNDOLOG_DELETE_PERIOD,TimeUnit.MILLISECONDS); + }, UNDOLOG_DELAY_DELETE_PERIOD, UNDOLOG_DELETE_PERIOD, TimeUnit.MILLISECONDS); } @Override diff --git a/server/src/main/java/io/seata/server/coordinator/DefaultCore.java b/server/src/main/java/io/seata/server/coordinator/DefaultCore.java index 86b13fb80ae..06244dc9550 100644 --- a/server/src/main/java/io/seata/server/coordinator/DefaultCore.java +++ b/server/src/main/java/io/seata/server/coordinator/DefaultCore.java @@ -17,6 +17,8 @@ import io.seata.core.event.EventBus; import io.seata.core.event.GlobalTransactionEvent; +import io.seata.core.exception.BranchTransactionException; +import io.seata.core.exception.GlobalTransactionException; import io.seata.core.exception.TransactionException; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.BranchStatus; @@ -65,26 +67,28 @@ public Long branchRegister(BranchType branchType, String resourceId, String clie GlobalSession globalSession = assertGlobalSessionNotNull(xid); return globalSession.lockAndExcute(() -> { if (!globalSession.isActive()) { - throw new TransactionException(GlobalTransactionNotActive, - "Current Status: " + globalSession.getStatus()); + throw new GlobalTransactionException(GlobalTransactionNotActive, + String.format("Could not register branch into global session xid = %s status = %s", globalSession.getXid(), globalSession.getStatus())); } if (globalSession.getStatus() != GlobalStatus.Begin) { - throw new TransactionException(GlobalTransactionStatusInvalid, - globalSession.getStatus() + " while expecting " + GlobalStatus.Begin); + throw new GlobalTransactionException(GlobalTransactionStatusInvalid, + String.format("Could not register branch into global session xid = %s status = %s while expecting %s", globalSession.getXid(), globalSession.getStatus(), GlobalStatus.Begin)); } globalSession.addSessionLifecycleListener(SessionHolder.getRootSessionManager()); BranchSession branchSession = SessionHelper.newBranchByGlobal(globalSession, branchType, resourceId, applicationData, lockKeys, clientId); if (!branchSession.lock()) { - throw new TransactionException(LockKeyConflict); + throw new BranchTransactionException(LockKeyConflict, + String.format("Global lock acquire failed xid = %s branchId = %s", globalSession.getXid(), branchSession.getBranchId())); } try { globalSession.addBranch(branchSession); } catch (RuntimeException ex) { branchSession.unlock(); - LOGGER.error("Failed to add branchSession to globalSession:{}",ex.getMessage(),ex); - throw new TransactionException(FailedToAddBranch); + throw new BranchTransactionException(FailedToAddBranch, + String.format("Failed to store branch xid = %s branchId = %s", globalSession.getXid(), branchSession.getBranchId())); } + LOGGER.info("Successfully register branch xid = {}, branchId = {}", globalSession.getXid(), branchSession.getBranchId()); return branchSession.getBranchId(); }); } @@ -92,7 +96,7 @@ public Long branchRegister(BranchType branchType, String resourceId, String clie private GlobalSession assertGlobalSessionNotNull(String xid) throws TransactionException { GlobalSession globalSession = SessionHolder.findGlobalSession(xid); if (globalSession == null) { - throw new TransactionException(TransactionExceptionCode.GlobalTransactionNotExist, "" + xid + ""); + throw new GlobalTransactionException(TransactionExceptionCode.GlobalTransactionNotExist, String.format("Could not found global transaction xid = %s", xid)); } return globalSession; } @@ -103,10 +107,12 @@ public void branchReport(BranchType branchType, String xid, long branchId, Branc GlobalSession globalSession = assertGlobalSessionNotNull(xid); BranchSession branchSession = globalSession.getBranch(branchId); if (branchSession == null) { - throw new TransactionException(BranchTransactionNotExist); + throw new BranchTransactionException(BranchTransactionNotExist, String.format("Could not found branch session xid = %s branchId = %s", xid, branchId)); } globalSession.addSessionLifecycleListener(SessionHolder.getRootSessionManager()); globalSession.changeBranchStatus(branchSession, status); + + LOGGER.info("Successfully branch report xid = {}, branchId = {}", globalSession.getXid(), branchSession.getBranchId()); } @Override @@ -133,6 +139,7 @@ public String begin(String applicationId, String transactionServiceGroup, String eventBus.post(new GlobalTransactionEvent(session.getTransactionId(), GlobalTransactionEvent.ROLE_TC, session.getTransactionName(), session.getBeginTime(), null, session.getStatus())); + LOGGER.info("Successfully begin global transaction xid = {}", session.getXid()); return session.getXid(); } @@ -306,15 +313,14 @@ public void doGlobalRollback(GlobalSession globalSession, boolean retrying) thro switch (branchStatus) { case PhaseTwo_Rollbacked: globalSession.removeBranch(branchSession); - LOGGER.info("Successfully rollbacked branch " + branchSession); + LOGGER.info("Successfully rollback branch xid={} branchId={}", globalSession.getXid(), branchSession.getBranchId()); continue; case PhaseTwo_RollbackFailed_Unretryable: SessionHelper.endRollbackFailed(globalSession); - LOGGER.error("Failed to rollback global[" + globalSession.getXid() + "] since branch[" - + branchSession.getBranchId() + "] rollback failed"); + LOGGER.info("Failed to rollback branch and stop retry xid={} branchId={}", globalSession.getXid(), branchSession.getBranchId()); return; default: - LOGGER.info("Failed to rollback branch " + branchSession); + LOGGER.info("Failed to rollback branch xid={} branchId={}", globalSession.getXid(), branchSession.getBranchId()); if (!retrying) { queueToRetryRollback(globalSession); } @@ -322,7 +328,7 @@ public void doGlobalRollback(GlobalSession globalSession, boolean retrying) thro } } catch (Exception ex) { - LOGGER.error("Exception rollbacking branch " + branchSession, ex); + LOGGER.error("Exception rollbacking branch xid={} branchId={}", globalSession.getXid(), branchSession.getBranchId(), ex); if (!retrying) { queueToRetryRollback(globalSession); } @@ -336,6 +342,8 @@ public void doGlobalRollback(GlobalSession globalSession, boolean retrying) thro eventBus.post(new GlobalTransactionEvent(globalSession.getTransactionId(), GlobalTransactionEvent.ROLE_TC, globalSession.getTransactionName(), globalSession.getBeginTime(), System.currentTimeMillis(), globalSession.getStatus())); + + LOGGER.info("Successfully rollback global, xid = {}", globalSession.getXid()); } @Override diff --git a/server/src/main/java/io/seata/server/lock/DefaultLockManager.java b/server/src/main/java/io/seata/server/lock/DefaultLockManager.java index 9c9241584ff..68e1abe0a1c 100644 --- a/server/src/main/java/io/seata/server/lock/DefaultLockManager.java +++ b/server/src/main/java/io/seata/server/lock/DefaultLockManager.java @@ -15,14 +15,20 @@ */ package io.seata.server.lock; +import java.util.ArrayList; import java.util.List; import io.seata.common.util.CollectionUtils; import io.seata.common.util.StringUtils; +import io.seata.config.Configuration; +import io.seata.config.ConfigurationFactory; +import io.seata.core.constants.ConfigurationKeys; import io.seata.core.exception.TransactionException; import io.seata.core.lock.Locker; import io.seata.core.lock.RowLock; +import io.seata.core.store.StoreMode; import io.seata.server.session.BranchSession; +import io.seata.server.session.GlobalSession; /** * The type Default lock manager. @@ -34,8 +40,16 @@ public class DefaultLockManager extends AbstractLockManager { private static Locker locker = null; + /** + * The constant CONFIG. + */ + protected static final Configuration CONFIG = ConfigurationFactory.getInstance(); + @Override public boolean acquireLock(BranchSession branchSession) throws TransactionException { + if (branchSession == null) { + throw new IllegalArgumentException("branchSession can't be null for memory/file locker."); + } String lockKey = branchSession.getLockKey(); if (StringUtils.isNullOrEmpty(lockKey)) { //no lock @@ -52,19 +66,52 @@ public boolean acquireLock(BranchSession branchSession) throws TransactionExcept @Override public boolean releaseLock(BranchSession branchSession) throws TransactionException { - List locks = collectRowLocks(branchSession); - if (CollectionUtils.isEmpty(locks)) { - //no lock - return true; + if (branchSession == null) { + throw new IllegalArgumentException("branchSession can't be null for memory/file locker."); } + List locks = collectRowLocks(branchSession); try { - return getLocker(branchSession).releaseLock(locks); + return this.doReleaseLock(locks, branchSession); } catch (Exception t) { LOGGER.error("unLock error, branchSession:" + branchSession, t); return false; } } + @Override + public boolean releaseGlobalSessionLock(GlobalSession globalSession) throws TransactionException { + ArrayList branchSessions = globalSession.getBranchSessions(); + String storeMode = CONFIG.getConfig(ConfigurationKeys.STORE_MODE); + if (StoreMode.DB.name().equalsIgnoreCase(storeMode)) { + List locks = new ArrayList<>(); + for (BranchSession branchSession : branchSessions) { + locks.addAll(collectRowLocks(branchSession)); + } + try { + return this.doReleaseLock(locks, null); + } catch (Exception t) { + LOGGER.error("unLock globalSession error, xid:{}", globalSession.getXid(), t); + return false; + } + } else { + boolean releaseLockResult = true; + for (BranchSession branchSession : branchSessions) { + if (!this.releaseLock(branchSession)) { + releaseLockResult = false; + } + } + return releaseLockResult; + } + } + + private boolean doReleaseLock(List locks, BranchSession branchSession) { + if (CollectionUtils.isEmpty(locks)) { + //no lock + return true; + } + return getLocker(branchSession).releaseLock(locks); + } + @Override public boolean isLockable(String xid, String resourceId, String lockKey) throws TransactionException { List locks = collectRowLocks(lockKey, resourceId, xid); diff --git a/server/src/main/java/io/seata/server/lock/LockManager.java b/server/src/main/java/io/seata/server/lock/LockManager.java index 64e7bd7317e..27ecac5959a 100644 --- a/server/src/main/java/io/seata/server/lock/LockManager.java +++ b/server/src/main/java/io/seata/server/lock/LockManager.java @@ -17,6 +17,7 @@ import io.seata.core.exception.TransactionException; import io.seata.server.session.BranchSession; +import io.seata.server.session.GlobalSession; /** * The interface Lock manager. @@ -43,6 +44,15 @@ public interface LockManager { */ boolean releaseLock(BranchSession branchSession) throws TransactionException; + /** + * Un lock boolean. + * + * @param globalSession the global session + * @return the boolean + * @throws TransactionException the transaction exception + */ + boolean releaseGlobalSessionLock(GlobalSession globalSession) throws TransactionException; + /** * Is lockable boolean. * diff --git a/server/src/main/java/io/seata/server/lock/LockerFactory.java b/server/src/main/java/io/seata/server/lock/LockerFactory.java index 334d5e869cc..7e915af292f 100644 --- a/server/src/main/java/io/seata/server/lock/LockerFactory.java +++ b/server/src/main/java/io/seata/server/lock/LockerFactory.java @@ -92,9 +92,6 @@ public static synchronized final Locker get(BranchSession branchSession) { new Object[] {logStoreDataSource}); lockerMap.put(storeMode, locker); } else if (StoreMode.FILE.name().equalsIgnoreCase(storeMode)) { - if (branchSession == null) { - throw new IllegalArgumentException("branchSession can be null for memory/file locker."); - } locker = EnhancedServiceLoader.load(Locker.class, storeMode, new Class[] {BranchSession.class}, new Object[] {branchSession}); } else { diff --git a/server/src/main/java/io/seata/server/session/AbstractSessionManager.java b/server/src/main/java/io/seata/server/session/AbstractSessionManager.java index 8cce5790b8f..1cd7a6a2fc2 100644 --- a/server/src/main/java/io/seata/server/session/AbstractSessionManager.java +++ b/server/src/main/java/io/seata/server/session/AbstractSessionManager.java @@ -15,6 +15,8 @@ */ package io.seata.server.session; +import io.seata.core.exception.BranchTransactionException; +import io.seata.core.exception.GlobalTransactionException; import io.seata.core.exception.TransactionException; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.BranchStatus; @@ -96,7 +98,7 @@ public void addBranchSession(GlobalSession session, BranchSession branchSession) public void updateBranchSessionStatus(BranchSession branchSession, BranchStatus status) throws TransactionException { if (LOGGER.isDebugEnabled()) { - LOGGER.debug("MANAGER[" + name + "] SESSION[" + branchSession + "] " + LogOperation.GLOBAL_ADD); + LOGGER.debug("MANAGER[" + name + "] SESSION[" + branchSession + "] " + LogOperation.BRANCH_UPDATE); } writeSession(LogOperation.BRANCH_UPDATE, branchSession); } @@ -105,7 +107,7 @@ public void updateBranchSessionStatus(BranchSession branchSession, BranchStatus public void removeBranchSession(GlobalSession globalSession, BranchSession branchSession) throws TransactionException { if (LOGGER.isDebugEnabled()) { - LOGGER.debug("MANAGER[" + name + "] SESSION[" + branchSession + "] " + LogOperation.GLOBAL_ADD); + LOGGER.debug("MANAGER[" + name + "] SESSION[" + branchSession + "] " + LogOperation.BRANCH_REMOVE); } writeSession(LogOperation.BRANCH_REMOVE, branchSession); } @@ -148,7 +150,21 @@ public void onEnd(GlobalSession globalSession) throws TransactionException { private void writeSession(LogOperation logOperation, SessionStorable sessionStorable) throws TransactionException { if (!transactionStoreManager.writeSession(logOperation, sessionStorable)) { - throw new TransactionException(TransactionExceptionCode.FailedWriteSession); + if (LogOperation.GLOBAL_ADD.equals(logOperation)) { + throw new GlobalTransactionException(TransactionExceptionCode.FailedWriteSession, "Fail to store global session"); + } else if (LogOperation.GLOBAL_UPDATE.equals(logOperation)) { + throw new GlobalTransactionException(TransactionExceptionCode.FailedWriteSession, "Fail to update global session"); + } else if (LogOperation.GLOBAL_REMOVE.equals(logOperation)) { + throw new GlobalTransactionException(TransactionExceptionCode.FailedWriteSession, "Fail to remove global session"); + } else if (LogOperation.BRANCH_ADD.equals(logOperation)) { + throw new BranchTransactionException(TransactionExceptionCode.FailedWriteSession, "Fail to store branch session"); + } else if (LogOperation.BRANCH_UPDATE.equals(logOperation)) { + throw new BranchTransactionException(TransactionExceptionCode.FailedWriteSession, "Fail to update branch session"); + } else if (LogOperation.BRANCH_REMOVE.equals(logOperation)) { + throw new BranchTransactionException(TransactionExceptionCode.FailedWriteSession, "Fail to remove branch session"); + }else{ + throw new BranchTransactionException(TransactionExceptionCode.FailedWriteSession, "Unknown LogOperation:" + logOperation.name()); + } } } diff --git a/server/src/main/java/io/seata/server/session/BranchSession.java b/server/src/main/java/io/seata/server/session/BranchSession.java index d3ee02b6350..5dc55ec8368 100644 --- a/server/src/main/java/io/seata/server/session/BranchSession.java +++ b/server/src/main/java/io/seata/server/session/BranchSession.java @@ -375,6 +375,7 @@ private int calBranchSessionSize(byte[] resourceIdBytes, byte[] lockKeyBytes, by + 4 // lockKeyBytes.length + 2 // clientIdBytes.length + 4 // applicationDataBytes.length + + 4 // xidBytes.size + 1 // statusCode + (resourceIdBytes == null ? 0 : resourceIdBytes.length) + (lockKeyBytes == null ? 0 : lockKeyBytes.length) diff --git a/server/src/main/java/io/seata/server/session/GlobalSession.java b/server/src/main/java/io/seata/server/session/GlobalSession.java index e6cccff2d35..ef4b2b0fde4 100644 --- a/server/src/main/java/io/seata/server/session/GlobalSession.java +++ b/server/src/main/java/io/seata/server/session/GlobalSession.java @@ -25,12 +25,14 @@ import java.util.concurrent.locks.ReentrantLock; import io.seata.common.XID; +import io.seata.core.exception.GlobalTransactionException; import io.seata.core.exception.TransactionException; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.BranchStatus; import io.seata.core.model.BranchType; import io.seata.core.model.GlobalStatus; import io.seata.server.UUIDGenerator; +import io.seata.server.lock.LockerFactory; import io.seata.server.store.SessionStorable; import io.seata.server.store.StoreConfig; import org.slf4j.Logger; @@ -74,6 +76,7 @@ public class GlobalSession implements SessionLifecycle, SessionStorable { private GlobalSessionLock globalSessionLock = new GlobalSessionLock(); + /** * Add boolean. * @@ -173,9 +176,7 @@ public void end() throws TransactionException { } public void clean() throws TransactionException { - for (BranchSession branchSession : branchSessions) { - branchSession.unlock(); - } + LockerFactory.getLockManager().releaseGlobalSessionLock(this); } @@ -512,6 +513,8 @@ private int calGlobalSessionSize(byte[] byApplicationIdBytes, byte[] byServiceGr + 2 // byApplicationIdBytes.length + 2 // byServiceGroupBytes.length + 2 // byTxNameBytes.length + + 4 // xidBytes.length + + 4 // applicationDataBytes.length + 8 // beginTime + 1 // statusCode + (byApplicationIdBytes == null ? 0 : byApplicationIdBytes.length) @@ -611,7 +614,7 @@ public void lock() throws TransactionException { } catch (InterruptedException e) { LOGGER.error("Interrupted error", e); } - throw new TransactionException(TransactionExceptionCode.FailedLockGlobalTranscation); + throw new GlobalTransactionException(TransactionExceptionCode.FailedLockGlobalTranscation, "Lock global session failed"); } public void unlock() { @@ -631,4 +634,8 @@ public interface LockCallable { V call() throws TransactionException; } + + public ArrayList getBranchSessions() { + return branchSessions; + } } diff --git a/server/src/main/java/io/seata/server/store/db/DatabaseTransactionStoreManager.java b/server/src/main/java/io/seata/server/store/db/DatabaseTransactionStoreManager.java index fcdf6395090..52940bcee6b 100644 --- a/server/src/main/java/io/seata/server/store/db/DatabaseTransactionStoreManager.java +++ b/server/src/main/java/io/seata/server/store/db/DatabaseTransactionStoreManager.java @@ -188,14 +188,14 @@ public List readSession(SessionCondition sessionCondition) { if (StringUtils.isNotBlank(sessionCondition.getXid())) { GlobalSession globalSession = readSession(sessionCondition.getXid()); if (globalSession != null) { - List globalSessions = new ArrayList(); + List globalSessions = new ArrayList<>(); globalSessions.add(globalSession); return globalSessions; } } else if (sessionCondition.getTransactionId() != null) { GlobalSession globalSession = readSession(sessionCondition.getTransactionId()); if (globalSession != null) { - List globalSessions = new ArrayList(); + List globalSessions = new ArrayList<>(); globalSessions.add(globalSession); return globalSessions; } diff --git a/server/src/main/java/io/seata/server/store/file/FileTransactionStoreManager.java b/server/src/main/java/io/seata/server/store/file/FileTransactionStoreManager.java index 269f2140bfe..df89ff3b7f3 100644 --- a/server/src/main/java/io/seata/server/store/file/FileTransactionStoreManager.java +++ b/server/src/main/java/io/seata/server/store/file/FileTransactionStoreManager.java @@ -411,14 +411,14 @@ private void closeFile(RandomAccessFile raf) { } private boolean writeDataFile(byte[] bs) { - if (bs == null) { + if (bs == null || bs.length >= Integer.MAX_VALUE - 3) { return false; } ByteBuffer byteBuffer = null; - if (bs.length > MAX_WRITE_BUFFER_SIZE) { + if (bs.length + 4 > MAX_WRITE_BUFFER_SIZE) { //allocateNew - byteBuffer = ByteBuffer.allocateDirect(bs.length); + byteBuffer = ByteBuffer.allocateDirect(bs.length + 4); } else { byteBuffer = writeBuffer; //recycle diff --git a/server/src/main/resources/db_store.sql b/server/src/main/resources/db_store.sql index 85fb95e17a0..f1731d82ed2 100644 --- a/server/src/main/resources/db_store.sql +++ b/server/src/main/resources/db_store.sql @@ -6,7 +6,7 @@ create table `global_table` ( `status` tinyint not null, `application_id` varchar(32), `transaction_service_group` varchar(32), - `transaction_name` varchar(64), + `transaction_name` varchar(128), `timeout` int, `begin_time` bigint, `application_data` varchar(2000), diff --git a/server/src/main/resources/file.conf b/server/src/main/resources/file.conf index c8c3f25cdad..9f585d7ee09 100644 --- a/server/src/main/resources/file.conf +++ b/server/src/main/resources/file.conf @@ -127,4 +127,12 @@ metrics { # multi exporters use comma divided exporter-list = "prometheus" exporter-prometheus-port = 9898 +} + +support { + ## spring + spring { + # auto proxy the DataSource bean + datasource.autoproxy = false + } } \ No newline at end of file diff --git a/server/src/main/resources/nacos-config.txt b/server/src/main/resources/nacos-config.txt index 4f4f2eb8327..ea7236c7dae 100644 --- a/server/src/main/resources/nacos-config.txt +++ b/server/src/main/resources/nacos-config.txt @@ -19,6 +19,8 @@ service.max.rollback.retry.timeout=-1 client.async.commit.buffer.limit=10000 client.lock.retry.internal=10 client.lock.retry.times=30 +client.lock.retry.policy.branch-rollback-on-conflict=true +client.table.meta.check.enable=true store.mode=file store.file.dir=file_store/data store.file.max-branch-session-size=16384 @@ -28,6 +30,7 @@ store.file.flush-disk-mode=async store.file.session.reload.read_size=100 store.db.datasource=dbcp store.db.db-type=mysql +store.db.driver-class-name=com.mysql.jdbc.Driver store.db.url=jdbc:mysql://127.0.0.1:3306/seata?useUnicode=true store.db.user=mysql store.db.password=mysql @@ -52,4 +55,4 @@ metrics.enabled=false metrics.registry-type=compact metrics.exporter-list=prometheus metrics.exporter-prometheus-port=9898 - +support.spring.datasource.autoproxy=false diff --git a/server/src/main/resources/registry.conf b/server/src/main/resources/registry.conf index 6dbeb22bec5..b98f5704acf 100644 --- a/server/src/main/resources/registry.conf +++ b/server/src/main/resources/registry.conf @@ -4,7 +4,7 @@ registry { nacos { serverAddr = "localhost" - namespace = "public" + namespace = "" cluster = "default" } eureka { @@ -50,8 +50,7 @@ config { nacos { serverAddr = "localhost" - namespace = "public" - cluster = "default" + namespace = "" } consul { serverAddr = "127.0.0.1:8500" diff --git a/server/src/test/java/io/seata/server/coordinator/DefaultCoordinatorMetricsTest.java b/server/src/test/java/io/seata/server/coordinator/DefaultCoordinatorMetricsTest.java index 10699c324e5..e394212351a 100644 --- a/server/src/test/java/io/seata/server/coordinator/DefaultCoordinatorMetricsTest.java +++ b/server/src/test/java/io/seata/server/coordinator/DefaultCoordinatorMetricsTest.java @@ -40,8 +40,6 @@ * @author zhengyangyong */ public class DefaultCoordinatorMetricsTest { - - @Disabled("https://github.com/seata/seata/issues/1406") @Test public void test() throws IOException, TransactionException, InterruptedException { SessionHolder.init(null); @@ -70,7 +68,7 @@ public void test() throws IOException, TransactionException, InterruptedExceptio coordinator.doGlobalCommit(commitRequest, new GlobalCommitResponse(), new RpcContext()); //we need sleep for a short while because default canBeCommittedAsync() is true - Thread.sleep(1000); + Thread.sleep(200); measurements.clear(); MetricsManager.get().getRegistry().measure().forEach( @@ -101,7 +99,7 @@ public void test() throws IOException, TransactionException, InterruptedExceptio rollbackRequest.setXid(response.getXid()); coordinator.doGlobalRollback(rollbackRequest, new GlobalRollbackResponse(), new RpcContext()); - Thread.sleep(1000); + Thread.sleep(200); measurements.clear(); MetricsManager.get().getRegistry().measure().forEach( diff --git a/server/src/test/java/io/seata/server/session/db/DataBaseSessionManagerTest.java b/server/src/test/java/io/seata/server/session/db/DataBaseSessionManagerTest.java index 14b04c30b20..68b408bdeb6 100644 --- a/server/src/test/java/io/seata/server/session/db/DataBaseSessionManagerTest.java +++ b/server/src/test/java/io/seata/server/session/db/DataBaseSessionManagerTest.java @@ -76,6 +76,8 @@ public static void start() throws Exception { sessionManager = tempSessionManager; prepareTable(dataSource); + + logStoreDataBaseDAO.initTransactionNameSize(); } private static void prepareTable(BasicDataSource dataSource) { @@ -87,7 +89,7 @@ private static void prepareTable(BasicDataSource dataSource) { s.execute("drop table global_table"); } catch (Exception e) { } - s.execute("CREATE TABLE global_table ( xid varchar(96), transaction_id long , STATUS int, application_id varchar(32), transaction_service_group varchar(32) ,transaction_name varchar(32) ,timeout int, begin_time long, application_data varchar(500), gmt_create TIMESTAMP(6) ,gmt_modified TIMESTAMP(6) ) "); + s.execute("CREATE TABLE global_table ( xid varchar(96), transaction_id long , STATUS int, application_id varchar(32), transaction_service_group varchar(32) ,transaction_name varchar(128) ,timeout int, begin_time long, application_data varchar(500), gmt_create TIMESTAMP(6) ,gmt_modified TIMESTAMP(6) ) "); System.out.println("create table global_table success."); try { @@ -559,6 +561,44 @@ public void test_findGlobalSessions() throws TransactionException, SQLException } } + @Test + public void test_transactionNameGreaterDbSize() throws Exception { + + int transactionNameColumnSize = logStoreDataBaseDAO.getTransactionNameColumnSize(); + StringBuilder sb = new StringBuilder("test"); + for (int i = 4; i < transactionNameColumnSize; i++) { + sb.append("0"); + } + final String finalTxName = sb.toString(); + sb.append("1321465454545436"); + + GlobalSession session = GlobalSession.createGlobalSession("test", + "test", sb.toString(), 100); + String xid = XID.generateXID(session.getTransactionId()); + session.setXid(xid); + session.setTransactionId(146757978); + session.setBeginTime(System.currentTimeMillis()); + session.setApplicationData("abc=878s"); + session.setStatus(GlobalStatus.Begin); + + sessionManager.addGlobalSession(session); + + GlobalSession globalSession_db = sessionManager.findGlobalSession(session.getXid()); + Assertions.assertNotNull(globalSession_db); + + Assertions.assertEquals(globalSession_db.getTransactionName(), finalTxName); + + String delSql = "delete from global_table where xid= '"+xid+"'"; + Connection conn = null; + try{ + conn = dataSource.getConnection(); + conn.createStatement().execute(delSql); + }finally { + if(conn != null){ + conn.close(); + } + } + } diff --git a/server/src/test/resources/file.conf b/server/src/test/resources/file.conf index 6a8713f45e0..4ef0f9ebc08 100644 --- a/server/src/test/resources/file.conf +++ b/server/src/test/resources/file.conf @@ -36,11 +36,17 @@ store { query-limit = 100 } } + recovery { - asyn-committing-retry-delay = 1 - timeout-retry-delay = 1 + #schedule committing retry period in milliseconds + committing-retry-period = 100 + #schedule asyn committing retry period in milliseconds + asyn-committing-retry-period = 100 + #schedule rollbacking retry period in milliseconds + rollbacking-retry-period = 100 + #schedule timeout retry period in milliseconds + timeout-retry-period = 100 } - ## metrics settings metrics { enabled = true @@ -48,4 +54,12 @@ metrics { # multi exporters use comma divided exporter-list = "prometheus" exporter-prometheus-port = 9898 +} + +support { + ## spring + spring { + # auto proxy the DataSource bean + datasource.autoproxy = false + } } \ No newline at end of file diff --git a/spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java b/spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java index c6c3fe68641..293e2c84e24 100644 --- a/spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java +++ b/spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java @@ -15,6 +15,7 @@ */ package io.seata.spring.annotation; +import javax.sql.DataSource; import java.lang.reflect.Method; import java.util.HashSet; import java.util.Set; @@ -25,6 +26,8 @@ import io.seata.core.rpc.netty.ShutdownHook; import io.seata.core.rpc.netty.TmRpcClient; import io.seata.rm.RMClient; +import io.seata.rm.datasource.DataSourceProxy; +import io.seata.spring.annotation.datasource.DataSourceProxyHolder; import io.seata.spring.tcc.TccActionInterceptor; import io.seata.spring.util.SpringProxyUtils; import io.seata.spring.util.TCCBeanParserUtils; @@ -39,13 +42,18 @@ import org.springframework.aop.framework.AdvisedSupport; import org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.BeanUtils; import org.springframework.beans.BeansException; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.config.BeanPostProcessor; +import org.springframework.cglib.proxy.Enhancer; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.ConfigurableApplicationContext; +import static io.seata.core.constants.ConfigurationKeys.DATASOURCE_AUTOPROXY; + /** * The type Global transaction scanner. * @@ -54,7 +62,7 @@ */ public class GlobalTransactionScanner extends AbstractAutoProxyCreator implements InitializingBean, ApplicationContextAware, - DisposableBean { + DisposableBean, BeanPostProcessor { /** * @@ -190,7 +198,7 @@ private void initClient() { private void registerSpringShutdownHook() { if (applicationContext instanceof ConfigurableApplicationContext) { - ((ConfigurableApplicationContext)applicationContext).registerShutdownHook(); + ((ConfigurableApplicationContext) applicationContext).registerShutdownHook(); ShutdownHook.removeRuntimeShutdownHook(); } ShutdownHook.getInstance().addDisposable(TmRpcClient.getInstance(applicationId, txServiceGroup)); @@ -216,7 +224,7 @@ protected Object wrapIfNecessary(Object bean, String beanName, Object cacheKey) Class serviceInterface = SpringProxyUtils.findTargetClass(bean); Class[] interfacesIfJdk = SpringProxyUtils.findInterfaces(bean); - if (!existsAnnotation(new Class[] {serviceInterface}) + if (!existsAnnotation(new Class[]{serviceInterface}) && !existsAnnotation(interfacesIfJdk)) { return bean; } @@ -276,7 +284,7 @@ private MethodDesc makeMethodDesc(GlobalTransactional anno, Method method) { @Override protected Object[] getAdvicesAndAdvisorsForBean(Class beanClass, String beanName, TargetSource customTargetSource) throws BeansException { - return new Object[] {interceptor}; + return new Object[]{interceptor}; } @Override @@ -297,4 +305,22 @@ public void setApplicationContext(ApplicationContext applicationContext) throws this.setBeanFactory(applicationContext); } + @Override + public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { + if (bean instanceof DataSource && !(bean instanceof DataSourceProxy) && ConfigurationFactory.getInstance().getBoolean(DATASOURCE_AUTOPROXY, false)) { + if (LOGGER.isInfoEnabled()) { + LOGGER.info("Auto proxy of [" + beanName + "]"); + } + DataSourceProxy dataSourceProxy = DataSourceProxyHolder.get().putDataSource((DataSource) bean); + return Enhancer.create(bean.getClass(), (org.springframework.cglib.proxy.MethodInterceptor) (o, method, args, methodProxy) -> { + Method m = BeanUtils.findDeclaredMethod(DataSourceProxy.class, method.getName(), method.getParameterTypes()); + if (null != m) { + return m.invoke(dataSourceProxy, args); + } else { + return method.invoke(bean, args); + } + }); + } + return bean; + } } diff --git a/spring/src/main/java/io/seata/spring/annotation/datasource/DataSourceProxyHolder.java b/spring/src/main/java/io/seata/spring/annotation/datasource/DataSourceProxyHolder.java new file mode 100644 index 00000000000..b015a78de90 --- /dev/null +++ b/spring/src/main/java/io/seata/spring/annotation/datasource/DataSourceProxyHolder.java @@ -0,0 +1,78 @@ +/* + * 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 + * + * 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 io.seata.spring.annotation.datasource; + +import io.seata.rm.datasource.DataSourceProxy; + +import javax.sql.DataSource; +import java.util.concurrent.ConcurrentHashMap; + +/** + * the type data source proxy holder + * + * @author xingfudeshi@gmail.com + * @date 2019/08/23 + */ +public class DataSourceProxyHolder { + private static final int MAP_INITIAL_CAPACITY = 8; + private ConcurrentHashMap dataSourceProxyMap; + + private DataSourceProxyHolder() { + dataSourceProxyMap = new ConcurrentHashMap<>(MAP_INITIAL_CAPACITY); + } + + /** + * the type holder + */ + private static class Holder { + private static DataSourceProxyHolder INSTANCE; + + static { + INSTANCE = new DataSourceProxyHolder(); + } + + } + + /** + * Get DataSourceProxyHolder instance + * + * @return the INSTANCE of DataSourceProxyHolder + */ + public static DataSourceProxyHolder get() { + return Holder.INSTANCE; + } + + /** + * Put dataSource + * + * @param dataSource + * @return dataSourceProxy + */ + public DataSourceProxy putDataSource(DataSource dataSource) { + return this.dataSourceProxyMap.computeIfAbsent(dataSource, DataSourceProxy::new); + } + + /** + * Get dataSourceProxy + * + * @param dataSource + * @return dataSourceProxy + */ + public DataSourceProxy getDataSourceProxy(DataSource dataSource) { + return this.dataSourceProxyMap.get(dataSource); + } + +} diff --git a/test/src/test/java/io/seata/core/rpc/netty/v1/HeadMapSerializerTest.java b/test/src/test/java/io/seata/core/rpc/netty/v1/HeadMapSerializerTest.java index 0b41412fe6d..3fdcd166897 100644 --- a/test/src/test/java/io/seata/core/rpc/netty/v1/HeadMapSerializerTest.java +++ b/test/src/test/java/io/seata/core/rpc/netty/v1/HeadMapSerializerTest.java @@ -73,7 +73,7 @@ public void encode() throws Exception { public void testUTF8() throws Exception { HeadMapSerializer mapSerializer = HeadMapSerializer.getInstance(); String s = "test"; - // utf-8 和 gbk 英文是一样的 + // utf-8 and gbk same in English Assertions.assertArrayEquals(s.getBytes("UTF-8"), s.getBytes("GBK")); Map map = new HashMap(); @@ -84,8 +84,8 @@ public void testUTF8() throws Exception { Map newmap = mapSerializer.decode(byteBuf, bs); Assertions.assertEquals(map, newmap); - // 支持中文 - map.put("弄啥呢", "咋弄呢?"); + // support chinese + map.put("你好", "你好?"); bs = mapSerializer.encode(map, byteBuf); newmap = mapSerializer.decode(byteBuf, bs); Assertions.assertEquals(map, newmap); diff --git a/test/src/test/java/io/seata/core/rpc/netty/v1/ProtocolV1Client.java b/test/src/test/java/io/seata/core/rpc/netty/v1/ProtocolV1Client.java index 5b7f5815bf7..b4bdc5c8db2 100644 --- a/test/src/test/java/io/seata/core/rpc/netty/v1/ProtocolV1Client.java +++ b/test/src/test/java/io/seata/core/rpc/netty/v1/ProtocolV1Client.java @@ -153,8 +153,9 @@ public static void main(String[] args) { final int threads = 50; final AtomicLong cnt = new AtomicLong(0); + // no queue final ThreadPoolExecutor service1 = new ThreadPoolExecutor(threads, threads, 0L, TimeUnit.MILLISECONDS, - new SynchronousQueue(), new NamedThreadFactory("client-", false));// 无队列 + new SynchronousQueue(), new NamedThreadFactory("client-", false)); for (int i = 0; i < threads; i++) { service1.execute(() -> { while (true) { diff --git a/test/src/test/java/io/seata/core/rpc/netty/v1/ProtocolV1CodecTest.java b/test/src/test/java/io/seata/core/rpc/netty/v1/ProtocolV1CodecTest.java index 022f21511b2..d57b54c58b0 100644 --- a/test/src/test/java/io/seata/core/rpc/netty/v1/ProtocolV1CodecTest.java +++ b/test/src/test/java/io/seata/core/rpc/netty/v1/ProtocolV1CodecTest.java @@ -72,8 +72,9 @@ public void testAll() { final CountDownLatch cnt = new CountDownLatch(runTimes); final AtomicInteger tag = new AtomicInteger(0); final AtomicInteger success = new AtomicInteger(0); + // no queue final ThreadPoolExecutor service1 = new ThreadPoolExecutor(threads, threads, 0L, TimeUnit.MILLISECONDS, - new SynchronousQueue<>(), new NamedThreadFactory("client-", false));// 无队列 + new SynchronousQueue<>(), new NamedThreadFactory("client-", false)); for (int i = 0; i < threads; i++) { service1.execute(() -> { while (tag.getAndIncrement() < runTimes) { @@ -92,7 +93,7 @@ public void testAll() { }); } - cnt.await(10, TimeUnit.SECONDS); + cnt.await(); LOGGER.info("success {}/{}", success.get(), runTimes); Assertions.assertEquals(success.get(), runTimes); } catch (InterruptedException e) { diff --git a/test/src/test/resources/file.conf b/test/src/test/resources/file.conf index 5c0fe2f2cae..c4248651f8b 100644 --- a/test/src/test/resources/file.conf +++ b/test/src/test/resources/file.conf @@ -26,37 +26,6 @@ transport { serialization = "seata" compressor = "none" } -## transaction log store -store { - ## store mode: file、db - mode = "file" - - ## file store - file { - dir = "sessionStore" - - # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions - max-branch-session-size = 16384 - # globe session size , if exceeded throws exceptions - max-global-session-size = 512 - # file buffer size , if exceeded allocate new buffer - file-write-buffer-cache-size = 16384 - # when recover batch read size - session.reload.read_size = 100 - # async, sync - flush-disk-mode = async - } - - ## database store - db { - driver_class = "" - url = "" - user = "" - password = "" - } - -} - service { #vgroup->rgroup vgroup_mapping.my_test_tx_group = "default" @@ -76,8 +45,19 @@ client { } report.retry.count = 5 } - transaction { undo.data.validation = true undo.log.serialization = "jackson" + undo.log.save.days = 7 + #schedule delete expired undo_log in milliseconds + undo.log.delete.period = 86400000 + undo.log.table = "undo_log" +} + +support { + ## spring + spring { + # auto proxy the DataSource bean + datasource.autoproxy = false + } } \ No newline at end of file diff --git a/test/src/test/resources/registry.conf b/test/src/test/resources/registry.conf index 33dc34bdce7..a0c917f8c8d 100644 --- a/test/src/test/resources/registry.conf +++ b/test/src/test/resources/registry.conf @@ -4,7 +4,7 @@ registry { nacos { serverAddr = "localhost" - namespace = "public" + namespace = "" cluster = "default" } eureka { @@ -50,8 +50,7 @@ config { nacos { serverAddr = "localhost" - namespace = "public" - cluster = "default" + namespace = "" } consul { serverAddr = "127.0.0.1:8500" diff --git a/tm/src/main/java/io/seata/tm/DefaultTransactionManager.java b/tm/src/main/java/io/seata/tm/DefaultTransactionManager.java index 4e9eb2ae7f2..6904b742926 100644 --- a/tm/src/main/java/io/seata/tm/DefaultTransactionManager.java +++ b/tm/src/main/java/io/seata/tm/DefaultTransactionManager.java @@ -17,6 +17,7 @@ import java.util.concurrent.TimeoutException; +import io.seata.core.exception.TmTransactionException; import io.seata.core.exception.TransactionException; import io.seata.core.exception.TransactionExceptionCode; import io.seata.core.model.GlobalStatus; @@ -49,7 +50,7 @@ public String begin(String applicationId, String transactionServiceGroup, String request.setTimeout(timeout); GlobalBeginResponse response = (GlobalBeginResponse)syncCall(request); if (response.getResultCode() == ResultCode.Failed) { - throw new TransactionException(TransactionExceptionCode.BeginFailed, response.getMsg()); + throw new TmTransactionException(TransactionExceptionCode.BeginFailed, response.getMsg()); } return response.getXid(); } @@ -82,7 +83,7 @@ private AbstractTransactionResponse syncCall(AbstractTransactionRequest request) try { return (AbstractTransactionResponse)TmRpcClient.getInstance().sendMsgWithResponse(request); } catch (TimeoutException toe) { - throw new TransactionException(TransactionExceptionCode.IO, toe); + throw new TmTransactionException(TransactionExceptionCode.IO, "RPC timeout", toe); } } }