Skip to content
Snippets Groups Projects
Unverified Commit 9ffa2904 authored by jimin's avatar jimin Committed by GitHub
Browse files

release 0.8.1

parents 09456818 451bb01d
No related branches found
Tags v0.8.1
No related merge requests found
Showing
with 466 additions and 3343 deletions
......@@ -81,7 +81,7 @@ For more details about principle and design, please go to [Seata wiki page](http
## Maven dependency
```xml
<seata.version>0.8.0</seata.version>
<seata.version>0.8.1</seata.version>
<dependency>
<groupId>io.seata</groupId>
......
......@@ -21,7 +21,7 @@
<groupId>io.seata</groupId>
<artifactId>seata-all</artifactId>
<version>0.8.0</version>
<version>0.8.1</version>
<name>Seata All-in-one ${project.version}</name>
<url>http://seata.io</url>
......@@ -217,6 +217,11 @@
<artifactId>seata-codec-protobuf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-codec-kryo</artifactId>
<version>${project.version}</version>
</dependency>
<!-- spring -->
<dependency>
......@@ -400,6 +405,26 @@
<artifactId>protostuff-runtime</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.javakaffee</groupId>
<artifactId>kryo-serializers</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
......@@ -502,6 +527,7 @@
<include>io.seata:seata-tm</include>
<include>io.seata:seata-codec-seata</include>
<include>io.seata:seata-codec-protobuf</include>
<include>io.seata:seata-codec-kryo</include>
</includes>
</artifactSet>
<transformers>
......
......@@ -20,7 +20,7 @@
<groupId>io.seata</groupId>
<artifactId>seata-bom</artifactId>
<version>0.8.0</version>
<version>0.8.1</version>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
......@@ -69,7 +69,7 @@
<dubbo.version>2.7.0</dubbo.version>
<dubbo.alibaba.version>2.6.5</dubbo.alibaba.version>
<sofa.rpc.version>5.5.3</sofa.rpc.version>
<fastjson.version>1.2.58</fastjson.version>
<fastjson.version>1.2.60</fastjson.version>
<protostuff.version>1.5.9</protostuff.version>
<config.version>1.2.1</config.version>
<slf4j-api.version>1.7.22</slf4j-api.version>
......@@ -112,6 +112,8 @@
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<protobuf.version>3.7.1</protobuf.version>
<kryo.version>4.0.2</kryo.version>
<kryo-serializers.version>0.42</kryo-serializers.version>
</properties>
<dependencyManagement>
......@@ -367,16 +369,6 @@
<artifactId>caffeine</artifactId>
<version>${caffeine.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
......@@ -409,11 +401,32 @@
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!--only used for seata-server-->
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>${jcommander.version}</version>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<version>${kryo.version}</version>
</dependency>
<dependency>
<groupId>de.javakaffee</groupId>
<artifactId>kryo-serializers</artifactId>
<version>${kryo-serializers.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......@@ -485,4 +498,4 @@
</profile>
</profiles>
</project>
\ No newline at end of file
</project>
......@@ -31,6 +31,7 @@
<module>seata-codec-all</module>
<module>seata-codec-protobuf</module>
<module>seata-codec-seata</module>
<module>seata-codec-kryo</module>
</modules>
</project>
......@@ -36,5 +36,10 @@
<artifactId>seata-codec-protobuf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>seata-codec-kryo</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.seata</groupId>
<artifactId>seata-codec</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>seata-codec-kryo</artifactId>
<packaging>jar</packaging>
<name>seata-codec-kryo ${project.version}</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>seata-common</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>seata-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
</dependency>
<dependency>
<groupId>de.javakaffee</groupId>
<artifactId>kryo-serializers</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
/*
* 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 <T> 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> 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);
}
}
}
/*
* 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 <T> byte[] serialize(T t) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Output output = new Output(baos);
kryo.writeClassAndObject(output, t);
output.close();
return baos.toByteArray();
}
public <T> T deserialize(byte[] bytes) {
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
Input input = new Input(bais);
input.close();
return (T) kryo.readClassAndObject(input);
}
}
/*
* 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;
}
}
io.seata.codec.kryo.KryoCodec
\ No newline at end of file
/*
* 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());
}
}
......@@ -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);
......
// 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)
}
// 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 {
/**
* <code>.io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1;</code>
*/
boolean hasAbstractTransactionRequest();
/**
* <code>.io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1;</code>
*/
io.seata.codec.protobuf.generated.AbstractTransactionRequestProto getAbstractTransactionRequest();
/**
* <code>.io.seata.protocol.protobuf.AbstractTransactionRequestProto abstractTransactionRequest = 1;</code>
*/
io.seata.codec.protobuf.generated.AbstractTransactionRequestProtoOrBuilder getAbstractTransactionRequestOrBuilder();
/**
* <code>string xid = 2;</code>
*/
java.lang.String getXid();
/**
* <code>string xid = 2;</code>
*/
com.google.protobuf.ByteString
getXidBytes();
/**
* <pre>
**
* The Branch id.
* </pre>
*
* <code>int64 branchId = 3;</code>
*/
long getBranchId();
/**
* <pre>
**
* The Branch type.
* </pre>
*
* <code>.io.seata.protocol.protobuf.BranchTypeProto branchType = 4;</code>
*/
int getBranchTypeValue();
/**
* <pre>
**
* The Branch type.
* </pre>
*
* <code>.io.seata.protocol.protobuf.BranchTypeProto branchType = 4;</code>
*/
io.seata.codec.protobuf.generated.BranchTypeProto getBranchType();
/**
* <pre>
**
* The Resource id.
* </pre>
*
* <code>string resourceId = 5;</code>
*/
java.lang.String getResourceId();
/**
* <pre>
**
* The Resource id.
* </pre>
*
* <code>string resourceId = 5;</code>
*/
com.google.protobuf.ByteString
getResourceIdBytes();
/**
* <pre>
**
* The Application data.
* </pre>
*
* <code>string applicationData = 6;</code>
*/
java.lang.String getApplicationData();
/**
* <pre>
**
* The Application data.
* </pre>
*
* <code>string applicationData = 6;</code>
*/
com.google.protobuf.ByteString
getApplicationDataBytes();
}
// 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)
}
// 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 {
/**
* <code>.io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1;</code>
*/
boolean hasAbstractTransactionResponse();
/**
* <code>.io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1;</code>
*/
io.seata.codec.protobuf.generated.AbstractTransactionResponseProto getAbstractTransactionResponse();
/**
* <code>.io.seata.protocol.protobuf.AbstractTransactionResponseProto abstractTransactionResponse = 1;</code>
*/
io.seata.codec.protobuf.generated.AbstractTransactionResponseProtoOrBuilder getAbstractTransactionResponseOrBuilder();
/**
* <code>string xid = 2;</code>
*/
java.lang.String getXid();
/**
* <code>string xid = 2;</code>
*/
com.google.protobuf.ByteString
getXidBytes();
/**
* <code>int64 branchId = 3;</code>
*/
long getBranchId();
/**
* <code>.io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4;</code>
*/
int getBranchStatusValue();
/**
* <code>.io.seata.protocol.protobuf.BranchStatusProto branchStatus = 4;</code>
*/
io.seata.codec.protobuf.generated.BranchStatusProto getBranchStatus();
}
// 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)
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment